I thought the The Alexa and Arduino Smart Home Challenge was exceptionally cool and wanted to contribute even though I couldn't compete. So, I grabbed an Arduino YÚN that I had available and purchased the absolute cheapest NeoPixel compatible light array and went to work.
The sample project uses an Arduino YÚN with an Alexa Smart Home Skill to provide voice control to LED lights. The sample also implements an Amazon Web Services (AWS) IoT thing to represent the state of the light and MQTT to communicate that state with the Arduino YÚN. On the Arduino YÚN, a Python client listens for state changes and communicates those to a running sketch via the Bridge. The sketch uses the Adafruit NeoPixel Library to control LED lights in various colors and levels of brightness.
Code is available on GitHub at https://github.com/mikemaas-amazon/alexa-smarthome-arduino-yun.
EXPANDED TECHNICAL DETAILS
Voice-Controlled Cloud Automation
This bridge project demonstrates the integration of the Arduino YÚN with the Amazon Alexa Ecosystem for sophisticated residential lighting control.
- AWS IoT Connectivity: The YÚN's Linux processor handles the secure MQTT communication with AWS IoT Core. It uses a Shadow document to track the current state of physical lights.
- Lambda-Driven Logic: An AWS Lambda function acts as the skill fulfillment logic, translating Alexa's spoken commands (e.g., "Alexa, turn on the kitchen light") into digital signals sent to the YÚN's ATmega32p microcontroller.
Hardware Hub
- Redundant Control: Features a physical override switch; the Arduino monitors the switch state independently of the cloud, ensuring lights can be toggled even in the event of an internet outage.