Home Automation with Alexa on Raspberry PiFollow article
Everybody has some experience with missing IR remote controllers, especially when you cannot find your remote control for the air conditioner on a hot summers night, this is painful. Nowadays we have an AI assistant like Alexa and Google Assistant with capabilities for home automation, but you still need to buy new home appliances which support these “assistants”.
For those legacy home appliances without support for home automation, we have developed a simple project with Raspberry Pi, that enables us to control them with Alexa voice assistant.
To begin with, you will need to install LIRC on the Raspberry Pi, also an IR sensor and emitter. We have recorded IR commands from the original remote with the LIRC and written a configuration file to mimic those commands from Raspberry Pi. And we have built a backend API to allow triggering IR command with HTTP POST.
Next step is to install AVS Device SDK on Raspberry Pi, you don’t need to buy an Amazon Echo, but a microphone and speaker is still needed to have the Raspberry Pi function properly.
Finally, we have developed a custom Alexa skill with the Alexa Skill Kits and AWS Lambda. The basic mechanism is that the Alexa on Raspberry Pi recorded voice, is sent to Amazon for recognition with the Skill Kits, then the Skill Kits invokes a relevant AWS Lambda function, then the Lambda function sends a request back to Raspberry Pi to issue IR commands. Also, we have made an Android application with a similar mechanism.
We have successfully tested the system with our air conditioner, TV and LED lights. You can see for yourself with the demo videos below.
Voice Control Test