I’ve always been enamored with the idea of home automation. It seems so obtainable with a little dedication and some know how. I’ve done lot’s of research and actually posted awhile back about what I was planning. Well I’ve moved the idea along a bit further and actually have the basic infrastructure setup. Not to long ago I “finished” my basement. Installed a bar, pool table room, projector, the works! Now that I have a real life movie theater room, I wanted to toy with the ability to control the entire setup from my phone…with my voice. Below outlines the basic composition of software and hardware I’m using to achieve this.
It’s a simple mashup of technologies that made it pretty easy to quickly throw together. I repurposed my media PC as the controlling machine for the whole system. I even reused my old CRT. I knew I kept it for a reason.
The Android app is a very, very basic Speech to Text implementation that utilizes the RecognizerIntent. It simply translates the voice to text and passes it along to my web server. On my web server I’m running DynDns to ensure that I have a consistent URI to target. This means I can push commands to my house from anywhere.
The WebAPI is nothing more than a pass through. Since I need the actual controller to run in a full user’s desktop and not the service desktop, I have IIS push the command through to the WCF endpoint.
The controller itself is pretty simple and is primarily tasked with composing the numerous modules that do the actual work. Each module is composed of zero to many Feedback, Task or InputSensor implementations that handle the three types of I\O the system can generate or receive. Each module can determine if it can process a particular type of input and then provide feedback or execute a task based on that input. One of the more interesting modules is the IR module.
The IR module’s purpose is to transmit IR messages to different pieces of stereo equipment in the basement. With a simple voice command I hope to control the receiver, projector, DirecTV and bluray player. For instance, it would be great to say “I want to watch the SciFi channel.” This would turn on the projector, receiver and DirectTV box and change the channel to 244, set the volume to a reasonable level and dim the lights.
Inside the IR Module
The IR module consists of two pieces of third-party software and one piece of hardware. The hardware is an IguanaWorks USB Transceiver.
It can translate and emit IR signals. The idea is that the transceiver can record remote control button presses and then create a map of the remote that it can then playback programmatically. The first piece of software that is required is the driver for the transceiver and “IR Daemon”. They allow Windows to correctly communicate with the transceiver. I had to reach out to the guys at IguanaWorks to get a test version of their Windows 8 driver but it worked like a charm.
Next, I needed to install WinLIRC. WinLIRC is a port of the Linux Infrared Remote Control project. It is what actually translates the IR data into a map of remote control commands and provides the functionality to play back those button presses through the transceiver. My IR module will communicate with WinLIRC to press the correct button combinations to control the various devices in the basement.
Inside the Insteon Module
Another important module is the Insteon module. Insteon makes power line-based home automation controls. This type of home automation device uses existing power lines to communicate commands to the different nodes. Think of light switches or outlets. There is no need to run additional wires since the commands will be coming through the very wires delivering power. Insteon’s communication mechanism is more robust than the older X10 protocol that uses the same facility. I hope that the newer power lines in my basement will provide adequate noise protection so that communication doesn’t get scattered which can happen with older power lines.
The Insteon module will harness the FluentDwelling project by SoapBox Automation. This C# API interfaces with Insteon to provide easy access to the devices hooked up the system. I hope to be able to dim, turn on and off the lights. I could also check from my phone whether I left the lights on in the basement!
Currently, I only have the IR module controlling a small TV in my office. I need to mount the transceiver and begin controlling the different components in the basement. I also need to install the Insteon controller and light switch when they arrive.
When I feel like splurging, I am considering buying a Nest thermostat or something similar. This will allow me to manage the temperature in my house from wherever I am.
Finally, I think it’s pretty important I write a PowerShell module to control and debug the system.