This IoT project shows how to create a smart home with Google Assistant using NodeMCU ESP8266 and Sinric Pro. This NodeMCU ESP8266 project allows you to control 3 relays with Google Assistant and manual switches. You can also control the relay from anywhere in the world via Google Home. If internet is not available, you can control the relay module via manual switch. Plus, this voice-controlled home automation project doesn't require a Google Nest device. This smart home project allows you to control and monitor Google Home relay inputs in real-time from anywhere in the world. If WiFi is available, NodeMCU will automatically connect to WiFi. All the tools we use are free, so you just need to follow the steps.
NodeMCU Home Automation Circuits Very simple circuits.I control a 4 channel relay module using GPIO D1, D2, D6. The GPIOs D7, SD3, D5, and RX are also connected to the manual switch to control the relay module manually. Rather than using pull-up resistors on each switch, I used the Arduino IDE's INPUT_PULLUP function. According to the source code, when the control pin of the relay module receives a LOW signal, the corresponding relay is turned on, and when the control pin receives a HIGH signal, the relay is turned off. I used a 5V 2 amp cell phone charger to power the circuit.
**If SD3 are grounded during boot, booting will fail.
Therefore, manual switches S1 and S2 must be turned off when starting the NodeMCU. If you want to use push buttons, just connect them to the GPIO and GND pins, not to the switch.
Setting up a free Sinric Pro accountI used a free Sinric Pro account for this smart home project.First, you need to add three devices to your Sinric Pro account.
NodeMCU program with Arduino IDE- Update the Preferences –> Aditional boards Manager URLs: https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json
- Then install the ESP8266 board from the Board manager
- Download the required libraries from the following links:
- Sinric Proby Boris Jaeger (Download Sinric Pro examples for ESP8266 & ESP32)
- WebSocketsby Markus Sattler (minimum Version 2.3.5)
- ArduinoJsonby Benoit Blanchon (minimum Version 6.12.0)
**Don't forget to replace the APP KEY and APP SECRET with your personal ones.
Comments