Smart Home with Google Assistant & Alexa using NodeMCU ESP8266 (Manual + Voice) | IoT Projects 2021

Tech StudyCellAbout 4 min readFeb 15, 2025Watch original
THE SUMMARYAI-generated

Key Concepts:

  • Home Automation
  • NodeMCU
  • Google Assistant
  • Alexa
  • Sinric Pro (IoT platform)
  • Relay Module
  • Manual Switches/Push Buttons
  • PCB (Printed Circuit Board)
  • IoT (Internet of Things)

1. Project Overview and Functionality

  • The project demonstrates a home automation system using NodeMCU to control appliances via Google Assistant, Alexa, and manual switches.
  • Real-time status monitoring of appliances is available in the Google Home and Alexa apps.
  • The system works even without internet connectivity, allowing manual control via switches.
  • The project doesn't require dedicated Alexa or Google Home devices; their Android apps suffice.

2. Demonstration of Functionality

  • Voice commands like "Hey Google, turn on all lamps" and "Alexa, turn off night lamp" are used to control appliances.
  • Manual control via physical switches is demonstrated, showing the system's responsiveness.
  • The system's behavior with and without internet connectivity is showcased. Without internet, only manual switch control is possible with a slight delay.

3. Hardware Components and Circuit Diagram

  • Required components: NodeMCU, 4-channel relay module, and existing switchboard or push buttons.
  • The circuit diagram involves connecting switches/push buttons to GPIO pins and ground.
  • AC circuit connections (LIVE and Neutral) to the relay module require safety precautions.
  • Specific circuit diagrams are provided for both switch and push button configurations.

4. PCB Design and Manufacturing (JLCPCB)

  • A custom PCB was designed for a professional look and ordered from JLCPCB.
  • The process involves uploading a Gerber file, selecting parameters (quantity, masking color), and placing the order.
  • JLCPCB is highlighted for its affordable price and premium quality.

5. Sinric Pro Account Configuration

  • Sinric Pro (sinric.pro) is used as the IoT platform for integrating with Google Assistant and Alexa.
  • Account creation involves providing details on the Sinric Pro website.
  • Rooms and devices are created within the Sinric Pro dashboard.
    • Example: Creating a "Living Room" and adding devices like "Room Light" (device type: Switch).
  • Each device is assigned a unique ID, which is crucial for the code.
  • The free version of Sinric Pro allows a maximum of 3 devices.

6. NodeMCU Code and Configuration

  • The code can be downloaded from iotcircuithub.com.
  • Required libraries: "SinricPro," "ArduinoJson," and "WebSockets."
  • Configuration steps:
    • Enter Wi-Fi credentials (SSID and password).
    • Enter "APP KEY" and "APP SECRET" from the Sinric Pro "Credentials" page.
    • Enter the device ID for each device from the Sinric Pro "Devices" page.
    • Comment/uncomment a line of code depending on whether switches or push buttons are used.
  • GPIO pins used for the project are specified in the code.
  • The code is uploaded to the NodeMCU using the Arduino IDE, ensuring the correct board ("NodeMCU 1.0") and port are selected.

7. Amazon Alexa App Configuration

  • In the Alexa app, the Sinric Pro skill is enabled.
  • Sinric Pro credentials (email and password) are entered to link the accounts.
  • The Alexa app discovers the devices connected through Sinric Pro.

8. Google Home App Configuration

  • A new home is created in the Google Home app (e.g., "Smart Home").
  • The "Works with Google" option is used to link Sinric Pro.
  • Sinric Pro credentials are used to sign in.
  • The Google Home app discovers the devices connected through Sinric Pro.

9. Hardware Setup and Restrictions

  • Four lamps are connected to the relay module according to the circuit diagram.
  • A 5V supply is connected to the NodeMCU.
  • Restriction when using switches: Switch-2 must be turned off during the NodeMCU booting process. This restriction does not apply when using push buttons.

10. Conclusion

  • The project demonstrates a functional and useful smart home system.
  • The free version of Sinric Pro limits the number of controllable devices to 3.
  • The presenter encourages viewers to join the Telegram channel "Tech StudyCell" for more home automation ideas.

Notable Quotes:

  • "Thus, you can easily control appliances from anywhere in the world, using the Google Assistant and Alexa."
  • "You don't need any Alexa device like echo dot or Google home for this project. you can just use their Android app."
  • "Please take proper safety precautions while connecting these appliances with the relay module."
  • "As I am using the free version of Sinric Pro account so I can control maximum 3 devices with Google home and Alexa app."

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.