DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

17 Jul 2018, 13:41

Home Automation with Alexa on Raspberry Pi

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

App Test

Master's student at University of Tsukuba.

17 Jul 2018, 13:41

Comments

August 2, 2018 09:30

Oh dear! Mating legacy IR-controlled devices (by their nature line-of-sight) to a web-based voice-control system using Raspberry Pi, looks very much like a solution looking for a problem. There a large number alternative solutions, including Mobile-phone based applications that will do this job. DesignSpark - are you short of news?

0 Votes

July 30, 2018 14:42

Clever system and it certainly works, too slow for me to want to have one. Light switches are usually placed near the door of a room and I flick mine on or turn the dimmer knob as I walk into the room.

0 Votes