Create a IoT device that can be controlled by Alexa, have a pretty local web server to interact with the switch and also MQTT to interact with the internet (Currenlty using Adafruit IO)
- 1 ESP8266 web enabled microcontroller (with USB serial and power)
- 1 Relay board
- 1 Power supply
- 1 Four gang extension lead
Based on other of my projects: https://github.com/nahog/esp8266-web-mqtt-io-demo
The code uses the flash file system to store the internal web page (using milligram and normalize as a pretty but light web framework). The internal web server is also Apple Web App compatible, this means that you can create a shortcut in an iOS device and it will behave as an app.
The switch can be seen or controlled from the internal web page (that uses a lightweight local REST API that could also be called with simple json message) or from MQTT pubs and subs to Adafruit IO, this allow to link it to other things using the Adafruit IFTTT channel.
The switch can be discovered and controlled from an Amazon Echo (aka Alexa)
This project uses (as of 2016-12-14) the dev version of the esp8266 arduino hardware components (required by the fauxmo library). For more details of the fauxmo library see (https://github.com/makermusings/fauxmo)
- Use secure MQTT
- Clean up the code