Lec11 IoT Project, LED on/off in smartphone and device, Python lambda program, RDS, RTL8720DN.

preview_player
Показать описание
The initially planned project had two goals.
First, when you turn it on/off on your smartphone, the device turns on/off.
Second, when you turn it on/off on the device, the information is pushed to your smartphone.
We will implement both of these today and end the lecture.
If you have any questions, please leave a comment and I will respond as much as possible.

00:00 Register the Lambda program with AWS.
02:29 Download the device program image.
02:48 Control the device with your smartphone.
07:09 Turn the device's LED on/off using your smartphone.
09:13 Turns the LED on/off on the device.

This concludes the IoT Project program lecture using RTL8720.
I will share the changed device program and Lambda program through links.
The database makes its structure public, and Id and password are not shared.
The AWS settings used here will be available for you to use for the time being.
However, if AWS usage fees become high, I will stop using it.
Thank you.

Open Source

How to set up a database in RDS on AWS
======================================
1. RDS - database - Create database
- MySQL
- Free tier
- rtl8720-dbinstance
- admin
- password
- Publice access : YES
- Additional configuration : CLICK
- Additional configuration : DB_RTL8720

2. EC2 - Security Groups
- Inbound rules - Edit inbound rules
. Add Tpye: MYSQL/Aurara, Source: ::/0
. Add Tpye: MYSQL/Aurara, Source: 0.0.0.0/0
- Inbound rules
. MySQL/Aurora TCP 3306 ::/0
. MySQL/Aurora TCP 3306 0.0.0.0/0
- Outbound rules
. All traffic All All 0.0.0.0/0

My SQL Database Table
=====================
CREATE TABLE `Owner` (
`id` int NOT NULL AUTO_INCREMENT,
`user` varchar(100) NOT NULL COMMENT 'email',
`password` varchar(200) NOT NULL COMMENT 'Fernet encrypt and decrypt',
`token` varchar(100) NOT NULL,
`phone_type` varchar(20) NOT NULL DEFAULT '' COMMENT 'android or ios',
`push_key` text NOT NULL,
`verify_code` varchar(10) NOT NULL COMMENT 'verigication code',
`register_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`login_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `user` (`user`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb3

CREATE TABLE `Gateway` (
`id` int NOT NULL AUTO_INCREMENT,
`owner_id` int NOT NULL,
`serial_no` varchar(30) NOT NULL COMMENT 'gateway : things_no, device : serial_no',
`nickname` varchar(100) NOT NULL DEFAULT '',
`fw_version` varchar(10) NOT NULL DEFAULT '1.00' COMMENT '1.00',
`used_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`online` tinyint NOT NULL DEFAULT '0' COMMENT 'Last Will and Testament',
`onoff_r` tinyint NOT NULL DEFAULT '0',
`onoff_g` tinyint NOT NULL DEFAULT '0',
`onoff_b` tinyint NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `serial_no` (`serial_no`),
KEY `owner_id` (`owner_id`),
CONSTRAINT `Gateway_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `Owner` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=518 DEFAULT CHARSET=utf8mb3

#IoTProgramming, #IoTProject, #WhatIsIoT, #internetofthings
Рекомендации по теме
Комментарии
Автор

Hello. Good videos. I would like to measure temperature using sensor connected to gpio and send it via push https using wifi5Ghz. Is it possible using this card or I need to get more hardware? Thanks

GuiLhermo-zd
visit shbcf.ru