Tuesday, February 4, 2020

ESP32 IoT Project using Alexa Google Home app 2022

The ESP32 WROVER kit exposes two USB tty devices, and it will be the second one that shows device logs. Thread Network API Allow your Android apps to share Thread network credentials using Google Play services. The circuit of this ESP32 home automation project is very simple. Now login to the Google app with the same Google account and access to Google assistant. Say the phrases to turn on and off your electrical appliances. This is the final step where we will connect our Google assistant to ESP32 via the Blynk server using IFTTT webhooks service.

google home esp32

I will really appreciate it if you share your valuable feedback. Also if you have any query please write in the comment section. Thus, all the devices from Sinric Pro will be added to Google Home Account. First, download the code & install all the required libraries mention in the code. APP SECRET for the account, which will be required in the code.

Step One Blynk App:

Or you can also use a custom-designed PCB for this project. When the command is made to switch the light off it indeed switches off completely. I've tried this setup and code with an LED with resistor from the output pin to ground.

google home esp32

Wi-Fi will be automatically connected to the ESP32 if the network is available. And the GPIO D13, D12, D14, D27, D33, D32, D15 & D4 are connected with switches to control the relay module manually. The problem is that I can't find a way to add this device into the google home app, to control it alongside my other smart switch. You can also use a selector switch to control the fan speed manually if the WiFi is not connected.

Add Devices in Sinric Pro account

Adafruit-IO is actually a cloud storage space that you can connect to through internet. You can use it to connect to a microcontroller like an ESP32 and control its pins. You can actually use it to communicate with any microcontroller in an internet cloud space. So, if you like controlling electrical devices of your home remotely through your cell phone, this tutorial can be so useful for you.

Please take proper safety precautions while working with high voltage. During this time the ESP32 should be connected with the WiFi. In this step, we willconnect our Google Assistant to the Adafruit IO MQTT Brokerto allow us to control the lights with voice commands. If the Wi-Fi is not connected, still you can control relays with the IR remote. Control Fan Speed with AlexaControl Fan Speed with ESP RainMakerControl the speed of the ceiling fan from anywhere in the world from the Blynk IoT App. If the WiFi is connected, you can also monitor the real-time feedback in the Blynk.

Configure the FREE Sinric Pro account

Find code that will connect Adafruit with your board. I will not explain this step but a good example is adafruit_14_neopixel from the Adafruit IO Arduino library. With this ESP RainMaker home automation project, you can also monitor the real-time feedback on the ESP RainMaker app. In this article we will useGoogle Assistant with Adafruit IO to control Home Appliances with ESP32.

Please refer to the above circuit diagram to connect all the AC appliances and switches with the PCB. After uploading the code to ESP32, please refer to the following article to add the devices with the ESP RainMaker app. In the code, I have used Preferences.h library to remember the last states of all the GPIO connected with relays. Please refer to the following article on the ESP32 Preferences library.

Google API for home automation with Raspberry pi/arduino/esp32

In this ESP32 project, I have explained how to make a practical ESP32 IoT project using ESP RainMaker with ESP32, sensors. To control relays and fan speed from Alexa, Google Home, IR remote, and manual switches. If the ESP32 is connected to Wi-Fi, you can ask Alexa, to turn on the light [“Alexa, Turn ON Room Light“].

google home esp32

By following all these steps, you can now use Google Assistant and Alexa to control your appliances. I have covered all the following steps in the tutorial video. Now, If you use pushbuttons instead of switches, then refer to the following circuit. Create your first applet, click on create then select “If This” condition, and then select Google assistant.

It also supports buying, sending money and identifying songs. Google Assistant is an AI assistant developed by google that is mainly available in almost all smart devices. Unlike the previous version, the new version of the Google Assistant can participate in two-way conversations. It can recognize words better than any other device and respond to your commands quickly.

google home esp32

With Alexa App, you can control appliances like lights, fans, etc. through voice commands, and also monitor the real-time feedbacks from anywhere in the world. If the internet is not available, then you can control the home appliances from manual switches. During the article, I have shown all the steps to make this smart home system. You can also control the appliances with manual switches and control fan speed with the rotary selector switch. Control your home lighting and fans using this Google Assistant based home automation system. This is very easy to set up, simple to operate, and a cost-effective system for your home residence and even offices.

In the “Then That” section select webhooks and configure it accordingly. Download IFTTT mobile application or go to the website sign up to IFTTT with your email or Google account and get started. Connect the relay Module to the ESP32 Board at pin 25 and 26. Now choose the ON state to 0 and OFF state to Logic 1, this is an active-low logic signal. Select the mode to switch instead of the push-button. Click on the “+” icon and add a button from widgets, here you will find various types of widgets.

google home esp32

In this tutorial, we will be using an ESP32 board as our microcontroller. Also test this code before the next step to see if your Adafruit is connected with your board. If the ESP32 is connected to Wi-Fi then it will send real-time feedback to the IoT server . You can ask Alexa to control appliances from anywhere in the world through the internet.

The Video of the Steps in IFTTT Website

I have used a 5V 5Amp mobile charger to supply the circuit. I have used the INPUT_PULLUP function in Arduino IDE instead of using the pull-up resistors with each push button.

google home esp32

D27 connected with switches to control the 4 relays manually. In this IoT project, I have shown how to make an IoT-based Smart Home with Google Assistant & Alexa using ESP32 to control 3 home appliances with voice commands. We also used another popular android application“Blynk” for controlling the ESP32 GPIO using Smart phone.

No comments:

Post a Comment

Career Explainer: What Does a Graphic Designer Do?

Table Of Content Is Graphic Design a Good Career? What I Wish I Knew BEFORE Becoming a Graphic Designer ... Learn Adobe Photoshop Are graphi...