Understand the flow

It is important to understand the flow of Quick IoTs.

 

SENSOR DATA FLOW 

  • Device get data from sensors, send to MQTT server
  • App server get data from MQTT server
  • User use web browser, mobile to view data sent from sensors

 

GATEWAY DATA FLOW (IR, RF...) 

  • Users use  web browser, mobile to send IR,RF.. code
  • App server send these code to MQTT server
  • Device get data from MQTT server, convert to IR code, RF code...
  • IR code, RF code... send to other devices like TV, fans, light bulb to control. Eg, turn on/off

 

MQTT SERVER 

  • MQTT like a big chatroom, devices send and receive message in a sub chatroom
  • The best MQTT server is Mosquitto , download and install here.
  • Default user and Password of Mosquitto is blank

 

APP SERVER 

  • Supply user interface to web browser, mobile
  • Base on Node-RED, we have Prebuilt Project to make a beautiful App for User in TWO click
 

Quick start #1

Quick start #2

What I need to begin

To begin, you need to buy these thing

A device: NodeMCU ESP8266, NodeMCU ESP32... Price and every info you need about device is here
Module: A sensor, Gateway.. To understand, lets begin with:


- First: Using Temperature and Humidity Sensor: DHT11 
- Second: Using IR Receiver and Emitter, so you could control TV
Cable to connect device and modules: You should buy all 03 type: Male-Male, Male-Female and Female-Female
A breadboard so we could put device and module on and most important is to share power. Because the limit of VCC,GND on device (2 - 3), if we cannot share VCC and GND, we only could plug maximum 2 - 3 module. In short, breadboard work likes a mini Power outlet
Learn how to use breadboard here. However when starting, if you are so confusing, just forget breadboard and connect cable directly from device to module

What is PIN, OUT, GND, VCC and How I plug/connect module

Understand PIN, GND, VCC... help you plug modules, sensors to device in 5 seconds.

Temperature sensor (DHT11) with VCC,GND, OUT connect to device through breadboard 

How do I send data from device to internet and display data in web/mobile

In flow, we use MQTT server to exchange data from device to user.

What is I2C

Many modules include "I2C" in name, so what are they. Some modules have a lot of pins that we must use many cable to connect module to device. I2C (Inter-Intergrated Circuit)  is a lifesaver now. In short, it work as a middle device between module and your device, so you plug module to I2C, and I2C only has 2 pins, connect them device is more simple.