I've created a project that integrare Amazon Echo with ESP8266. The result is shown below:
To build this project you need the following libraries:
You can install these two libraries in the same way you did for fauxmoESP.
Registering a device:You have to click on “Add new device” and then:
Finally, the Alexa starts looking for new connected devices
That’s all. The device now is connected to Amazon Echo. As you have noticed, using a few lines of code we have connected our ESP8266 to Amazon Echo through Alexa.
Now, we are able to send commands to Amazon Echo:Alexa, turn on the <device_name>Alexa, turn off the <device name>
These two commands turn on and off the devices.
Do you know you can control RGB LEDs using Firebase realtime database?
How to use Amazon Alexa, ESP32 and Amazon Echo to control LEDsNow we know how to interact with our ESP8266 using voice commands exploiting the Amazon Alexa capabilities to understand our language. Now we can build a more complex Smart Home project supposing we want to control two different LED strips:
- A NeoPixel LED Ring
- A NeoPixel LED Strip
In this project, we want to control them independently, so it is necessary to register two different devices to Amazon Echo.
ESP8266 schematicBefore diving into the details about how to control these two different devices using Amazon Alexa, ESP8266 and Amazon Echo, it is useful to have an overview of how to connect these devices with ESP8266. The schematic below shows how to do it:
The connections are quite simple, the only interesting aspect is that ESP8266 uses D1 and D2 to control the LEDs.
Let us start the discovering process again:
Now we can use these commands with Alexa:
Alexa, turn on the ring:
If you want to turn on the strip led, then the command to use is:
Alexa, turn on the strip:
The picture below shows both devices turned on or off:
In the picture below, all the LEDs strips are turned on:
As you have seen, it is very simple to use ESP8266 or ESP32 with Alexa. There are more interesting projects you can build:
- How to use Cayenne IoT with ESP8266 + MQTT: Step-by-step practical guide
- Device Power Management in IoT
This post described how to integrate ESP32 with Alexa using Amazon Echo. Using them, it is possible to control some LEDs using voice commands. The project demonstrated how easy it is building a smart home project based on ESP8266, Alexa and Amazon Echo.
Comments