With Amazon Echo you can control your devices through voice commands. In this tutorial we will use an ESP8266, making Alexa recognize it with a compatible device, and with no configuration (incredible no?!?!).
For this we will use the OpenDevice library and enable the option to emulate a protocol compatible with Alexa.
The additional advantage to other similar tutorials is that we have all the benefits of OpenDevice, can connect via MQTT or receive commands via TCP
Download and Install library: https://github.com/OpenDevice/opendevice-lib-arduino
You can all install using Arduino Library Manager.
And uncomment the line: #define ENABLE_ALEXA_PROTOCOL 1
Import this Sample (provided in library):
Configure Wifi SSID and PASSWORD
NOTE: ODEV_API_KEY, is optional, only if you need integrate with OpenDevice Server
Upload and you must see in terminal:
Now Speak: Alexa, discover the devices
In the end, she should say that she found two devices.
Now you can talk: Alexa, turn ON the TV
This approach exposes some security issues (even disabling discovery). In a next step I will implement an Alexa Skill, which integrates with OpenDevice on the cloud (https), if you are interested, please contact me.