Student: Draghici Andrei
Master: ACES
proiect_iot.zip
The purpose of this project is to develop a smart RGB lamp that can be controlled with Google Assistant commands or it can change the color and intensity by itself based on the weather. For this project i used an ESP32 board, an 8 bit 2812 RGB led strip, OpenWeatherMap API, Adafruit.IO platform and IFTTT.
The hardware components needed for this project are:
Electrical schematic:
The application was developed using Arduino IDE. In order to control the led bar, we have to download and import FastLED library. Each led can be individually changed, but i opted for all to have the same color. For automatic mode, i used the API from OpenWeatherMap. An account is needed, and with a simple request we can receive every information needed about the weather (temperature, wind, etc).
The Google Assistant API is not public and easily accessible. In order to use it, a good option is IFTTT ( if this than that). On this platform we can integrate our requests for G. Assistant and send the wanted data from request to another platform that can store it.
To connect the ESP32 to IFTTT, i used the Adafruit.IO platform, that can store all the requests and send any modifications to the board via MQTT protocol. On the Adafruit platform i created 3 channels: Color, Intensity and Automatic_Mode, in order to exchange information for the light with the ESP board
When automatic mode is on, the lamp will change the color and intensity based on the outside weather following the next conditions:
The intensity will be mapped according to the temperature. The min and max values are -10* and 40*. If the temp will be lower or higher, it will be limited to the maxed mentioned earlier.
Flow diagram:
For a demonstration use the following link: https://youtu.be/_8bi6cdD2bI
In conclusion this project is an interesting way to learn how IoT works, how it can be used every day for different activities, and how different API requests work and the differences between communication protocols. The main purpose of this project is to create a smart RGB lamp that can be controlled with Google Assistance commands or it can change the color and intensity based on the outside weather.