Amazon Alexa devices, along with Google Assistant, have become a popular addition to the smart home. The integration of voice commands simply makes the complexities of a smart home much simpler to control. Unfortunately, both Amazon and Google have limited the integration capabilities of their respective voice assistants; which can be frustrating.
While voice commands can be used to control integrated third party equipment, such as lighting, thermostats, and more, the integration is not a two way street. There is nothing a third party smart home processor/hub can do to control an Alexa or Google Assistant device. For example:
- Music is playing on Alexa or Google Assistant devices in various rooms of the house. You set the alarm system in the home, which is integrated with a smart home processor/hub, to “Away” mode. There is nothing the smart home system can do to turn off the music that is currently playing. The only way to turn it off is to issue voice commands at each voice assistant device or to use music groups to override the currently playing music and then shut down the music group. In either case, there is nothing convenient about this process.
- The new Amazon Guard is a nice feature that leverages Alexa devices around the home to listen for the sound of broken glass, smoke detectors, or carbon monoxide detectors. If an Alexa device detects one of these sounds while the home isn’t occupied then it will send an alert to your phone. Unfortunately, the only way to enable, or disable, Amazon Guard is with voice commands or through the Alexa app on your smart phone.
- The new Amazon Alexa feature that allows a user to delete that day’s voice interactions could automatically be triggered every evening at 11:59 PM.
- There are many events in the home where it would be convenient to play a message on the Alexa, or Google Assistant, devices around a home. For example, if your garage door was left open for more than five minutes you would like a reminder to close it. Or, you might have a sensor on your mailbox that detects when the mail has been delivered. It would be nice to have a message played on the voice assistant devices around the home to let you know when the mail has been delivered. Unfortunately, neither Amazon nor Google have opened up any ability to automate a message being played on their devices.
With the above in mind I set out to figure out a way to work around the barrier put in place by Amazon and Google limiting third party control of their voice assistants. I set out to find a way to work around these problems in my own home where I use Alexa devices for music streaming and to control my Crestron automation system. My solution cost me a little over $100 and consists of:
- Arduino Uno Wi-Fi Rev 2 open source, easily programmable, single board computer – $44.48 on Amazon
- Power Supply for the Arduino Uno – $8.60 on Amazon
- Parallax EMIC 2 text to speech circuit board – $59.99 on Amazon
- Breadboard Wires – $6.98 on Amazon
- Inexpensive set of computer speakers – In my case they were rescued out of a closet but these are readily available on Amazon, eBay, or even at a thrift store if you really want to save money.
- Small Plastic Project Box – I had one on hand but something like this would also work – $7.99 on Amazon
I then wrote the code for the Arduino board to accept strings sent to it over Wi-Fi using industry standard UDP protocol, send them to the EMIC board for conversion from text to speech, and the verbal commands are played over the cheap computer speakers that are placed next to an Amazon Echo in my home. The software even does some simplistic encryption of the strings being sent to make it a little harder for someone that gains access to the network to hack this system. The encryption I used is very simplistic. If desired, there are plenty of code examples on the internet of much more complex encryption algorithms that could be ported to this system.
Wiring is very simple and doesn’t require any soldering. The power supply for the Arduino simply plugs into the Arduino board. Similarly, the EMIC 2 board has a 1/8” (3.5mm) audio jack that is compatible with almost any pair of computer speakers. Finally, there are only four wires needed to connect the EMIC 2 board to the Arduino. These connections are made using the push on terminations of the breadboard wires I’ve specified above.
- Make a connection from the pin marked 5V on the Arduino to the pin marked 5V on the EMIC 2
- Make a connection from the pin marked GND on the Arduino to the pin marked GND on the EMIC 2
- Make a connection from Digital Pin 2 on the Arduino to the pin marked SOUT on the EMIC 2.
- Make a connection from Digital Pin 3 on the Arduino to the pin marked SIN on the EMIC 2.
Arduino single board computers are relatively simple to program and all the code for this project, along with the example program I wrote for a Crestron automation processor is available for free download from my GitHub. While I wrote the example program for a Crestron processor there isn’t any reason it couldn’t be easily ported to another platform.
To turn off streaming music on all your Alexa devices there is some additional setup required:
- On your computer go to the Amazon Music web site here.
- Search for “Silent Meditation” and add the album “Silence, Album by Silent Meditation, No Sound Pause Breaks to “My Music.”
- On the Alexa app, create a “Speaker Group” named “Everywhere” that contains all your Alexa devices.
- The example Crestron program will send the command “Alexa, Play Silence 1 Minute on Everywhere.” This will cause all the Alexa devices to start playing a one minute track that consists of nothing but silence. If there is music playing on various echo devices in the home this will interrupt that playback and replace it with the group track that consists of nothing but silence. Once it is complete there is no music left playing on any Alexa device.
Shown above is the final assembly of the project. I took leveraged a small plastic jar to house an Echo Dot, cut a hole in the top, and glued the speaker in place. The plastic jar allowed me to isolate the sound so it is almost impossible to hear the speaker annunciating the commands to the Echo Dot.
Also included in the Crestron example program is an illustration of how a message can be played on all the Alexa devices in a home using the Alexa announcement feature. The example program instructs the Aruduino/Emic to say “Alexa, Announce Mail Has Arrived.”
Hopefully, this simple project introduces you to the easy to use Arduino platform and gives you a tool to help break through the barriers that Amazon and Google have put in people’s way that want to truly integrate voice assistants into their smart homes.