Fascinating Home - Computer Lights! - Voice controlled Home Automation VoxCommando - Fascinating Tech Magazine

Go to content

Main menu:

Fascinating Home - Computer Lights! - Voice controlled Home Automation VoxCommando

Older Issues > Summer 2014 Issue

Imagine this scenario. You enter your apartment closing the door behind you. It is twilight and although a few dimmed lights have come on automatically you want a bit more light on.

"Computer Lights"  you say and the main lights come on.

You walk into the lounge.  

"Welcome back." says a disembodied but friendly voice, "Would you like to listen to some music".  
"No thanks"
"OK how about a movie then",
"Sounds Good",
"OK I’ll put up a few  suggestions you haven’t watched"
"Pleased to help".

The curtains draw, lights dim, the TV and surround amp turn on and the PC offers a list of suitable movies.

Sounds like science fiction but I just did exactly that scenario (minus the curtains drawing but I would soon be able to add that)

I’ve always wanted voice control for my home since watching science fiction on TV as a child. Being able to tell it what to do seemed a lot easier than pressing a button or flicking a switch. However it hasn’t proved that easy. Microsoft do have a pretty good computer control system known as SAPI built into most versions of Windows but its vocabulary is limited to opening windows (the computer kind not the ones with curtains) and controlling them. It isn’t easily expanded without writing code.

The other limiting factor is the actual home automation equipment. Whilst this has been available in the UK for ages it wasn’t always reliable or affordable – often being the realm of High-end installers.

One early standard for the masses X10 which sent signals over the power lines suffered huge reliability issues when coupled with the poor wiring in many UK homes. It also din't look particularly good with bulky devices you plugged between your sockets and the appliance. This put a lot of people off and the market fairly stagnated until the emergence of Energy Saving concerns gave a push in the UK for turning devices fully off rather than leaving on Standby.

This saw a resurgence of remote controlled switches such as ByeByeStandBy and the, at one point, B and Q stocked Byron Home Easy Range. Both of these used radio technology rather than X10s power-line technology.  Over a short – to midrange these proved very reliable and could be coupled with signal boosters to push the range limits around the average home. Although quite successful they didn’t totally set the market alight partially I think because of the cost of entry. This finally lead to B and Q no longer stocking the HomeEasy range and ByByeStandBy also disappearing from a lot of shelves.

In a way though for the enthusiast this actually led to a new golden age as prices of HomeEasy kit dropped rapidly and some time back I was able to pick up a starter kit of controllable power sockets and remote controls for less than a tenner. Prices have recovered a little since that hey-day but are still reasonable. Other competitors have now entered the market and the LightWaveRF technology seems to be doing well and is on B and Qs shelves. In the States Home Automation seems to becoming mainstream and one of their big players Insteon has also recently entered the UK market.

For our tale let’s stick to HomeEasy/ByeByeStandBye. I’ve combined them because I soon found out they used very compatible technology and indeed they for the main could control each other’s technology.
I soon discovered that they were part of a family of HomeAutomation devices throughout Europe that are controlled on the 433mhz frequency.

This lead to the next discovery the Tellus Tellstick. This device that looks like a USB stick plugs into your computer and when combined with their commander software allows you to send commands to your 433mhz devices.

The basic Tellstick only sends commands – it does not receive them but that was good enough for what I originally had in mind which was to turn some lights on automatically just before dusk.

The basic Tellstick is at the time of writing available for under £20 which is an absolute bargain.

Tellus also have online software that allows you to control the TellStick and includes scheduling of events – so I didn’t have to do any programming but it did also have an extensive programming interface so I could have done if I wanted to.

Which got me back to thinking about my voice control dream. Could I write some software to use Microsoft’sspeech interface to control the tellstick. Turns out I didn’t have to go that far.

During my research for this project I came across a video showing almost exactly what I wanted to do. It used a program called VoxCommando and another called EventGhost. The voice control part was handled by VoxCommando.  Written by the amazing JitterJames, as he is known on the forums, does exactly what I was thinking of and extends the Microsoft Voice Recognition system to do other commands but it does a whole lot more.

I soon realised that VoxCommando could become the hub of a whole windows based home automation system

Out of the box it comes with a number of plugins to allow you to literally talk to other services and programs. For example in my recent whole home audio article I mentioned JRiver Media Center as my music player of choice, well one of the choices I had when installing VoxCommado was to set it up with a sample configuration to control JRiver. This was great and I was soon able to issue commands like Play Artist Bastille and have it play that artist in JRIver. Very cool stuff. The way VoxCommando does this is to pre-scan the JRiver library and produce a custom dictionary of acceptable Artists and Titles it will accept. This greatly enhances the ability to recognise these despite some of the Microsoft Voice recognition software’s limitations.

Voice recognition is not perfect at the moment and sometimes similar words can be misinterpreted. This can be exasperated by accents and microphone quality. One counter intuitive tip from VoxCommando is that it can be better to turn your microphone sensitivity down to improve recognition quality.

Actually having an open air microphone can lead to lots of false positives. Taking my lights on example that is a phrase that could come up in conversation normally when you don’t want to turn the lights on or  even something similar could trigger it (‘You have a light tan’ for example might be interpreted as light on). What is worse even a knock or tap can sometimes be interpreted as a word.

VoxCommando helps with this in two ways – firstly you can tell it to stop listening and then pay attention but I found this could get tiresome. Alternatively you can use a prefix. A prefix is just a word VoxCommando has to hear before it interprets something as a command. It should be something that isn’t going to be said in normal conversation – VoxCommando might be a good choice ‘VoxCommando turn lights on’.  I would avoid, like I did, choosing a character from one of your favourite TV series as the prefix and then watching that TV programme – lots of accidental false positives there.

One of the things I learned early on is that open microphone is not always the best idea. Sometimes you want more control. Enter the Amulet devices remote control. This was originally designed to work with Windows Media Center and has infrared controls for that which could be useful if you are running one of the many applications that are compatible with the Windows Media Center remote. One word of warning though it is very fussy on infrared receivers and we would recommend using an original Media Center IR receiver.

Where the Amulet comes into its own, and has seen it gain a new lease of life in the Voice control community, is that it has a built in microphone which is only activated when the controller is raised up. This is connected wirelessly to the PC and is absolutely great for VoxCommando.

VoxCommando can respond to events and there are a sample set of commands on the VoxCommando forum to allow you to trigger VoxCommando to start listening when you pick up the Amulet and stop when you put it down – brilliant.

In practice this works perfectly and the microphone in the Amulet is perfect for voice recognition – I haven’t had a false positive using this.

Some people only use the Amulet to control VoxCommando I’ve used it in a combination where if I’m just moving around the house I have open Microphones but once I’m sat down watching TV it switches to the Amulet.

This brings us to the real power of VoxCommando the flexibility of its command system.

Using a very visual scripting system it is very easy to set-up if I say this then do that scenarios. VoxCommando does this by having commands that look for phrases. Phrases can be hard coded "How are you" or have what VoxCommando calls Payloads.

A Payload is a basically a set of phrases to choose from. These could be simple choices like On or Off or as in the JRiver example above could be more complex lists of possible choices.

Now this might sound a bit complicated, a bit like programming and it is true that setting up home scenarios often involves some scripting. However VoxCommando have sort to make that process as simple as possible whilst still allowing the more intrepid to concoct really complex control scenarios.

One of the cleverest things they did early on was to allow scripts to be shared in their forum. The forum itself is brilliant with lots of very helpful people. There is also very good documentation, a very helpful Wiki and some detailed videos to guide you through the process – I recommend looking at these before posting in the forum.

Back to the sharing of scripts – this was genius – and allowed me very quickly to find sample scripts to control my TV, with a bit of tweaking My TiVo and my AV receiver.  I can now say Computer let me watch TV  and I have my TV turnon if off switch to the right source, have my TiVo power on and switch to Live TV and have my AV amp turn on on the right input.

I was also able to find fun scripts to allow me to ask what the weather is and also what the time was. This first one ended up becoming one of the biggest benefits of VoxCommando and it wasn’t even automated. Basically I hooked this script into another one I had where I could say Computer Good Night and get it to turn off lights etc.  What I did was extend this to check the overnight and morning temperatures.

Now my apartment has old storage heaters that I can’t change and cost a small fortune to run. During the winter they normally get left on all the time because if they haven’t got stored heat when you need it then it is a pain. With this new script I was able to get VoxCommando to tell me if I actually needed to turn the Heaters on overnight.

I reckon this saved me several hundred pounds over the recent mild winter. I’m not but If I was allowed to change the wiring on these heaters I could have fully automated the process without voice interaction – VoxCommando would allow for this for its scripting is not limited to just voice command it can also react to other events such as timers and take actions. This is what takes it beyond just being a Voice Control system to being a pretty powerful Home Automation hub.

What I really like about VoxCommando is its plugin system. These are add-ins that let you write VoxCommando commands to talk to and do other things. I already mentioned JRiver but there are also plugins for Windows Media Center, Media Monkey and XBMC to name just a few. At the time of writing the complete list taken from the VoxCommand Wiki is:

Actions to List and Select the default audio output device used by the Windows OS.
Translation tools provided by the Microsoft Bing web based API. All actions require an internet connection. You must aquire your own developer key and specify it in the Bing plugin settings.
DirectX keyboard emulation. Some applications (such as games) do not respond to InputKeys, or Sendkeys actions. In these cases, you can try to use DirectX keyboard emulation, using the actions provided by this plugin.
Access data on your Google Calendar(s). You can create calendar events, get a list of events, and automatically trigger timed events in VoxCommando that correspond to your calendar events. A number of things need to be set in the GgCal plugin settings for these actions to work.
Send notification messages to Growl for Windows. http://www.growlforwindows.com/gfw/
Send commands to HALi Home Automation controller. Utilities to learn and store codes are available. The base url for halx is defined in plugin settings.
Commands to communicate with the HOME in touch HitServer http://www.homeintouch.com
Generates events for certain keyboard combinations. See plugin settings to select which keys will generate events.
Commands to control iTunes and to retrieve information about currently playing media. Various playback lt events are generated
Control plugin for JRiver Media Center
Send buttons codes to MediaPortal
Scan MediaPortal Database and generate Payload Xml files
Send buttons codes to MediaPortal via the plugin WifiRemote
Actions to create and control an MsAgent character
Control Onkyo network-enabled receivers using ISCP commands.
By leveraging the power of Iron Python, the "PY" plugin allows us to run python scripts in VoxCommando. Scripts can interact with VoxCommando, reading and settings variables, triggering events and executing other actions.
RoboBrowser (RoboB for short) allows you to automate a web browser contained within a VoxCommando window. A new RoboBrowser is created using the "Select" Action.
The window can be hidden. There are several ways to manipulate the browser to load, edit, and interact with web pages. You can "click" on items based on position and sometimes by ID etc. To really use this plugin to create new uses, it will help if you know a bit about html / css / javascript etc.
Commands to perform various actions with Skype, including placing voice calls, sending text messages, answering, hanging up, etc.
Send and Receive packets on TCP sockets
Typically used with VoxWav, TcpMic allows another device to stream a short piece of audio to VoxCommando. There are no actions associated with the plugin yet, but you can set various plugin settings. More information can be found here: http://voxwav.wikispaces.com/Other+Settings#TcpMic
IR received will generate an Event. IR codes are sent using the "Pronto" code format. Learning mode allows Pronto codes to be learned and stored
Home automation for the VeraLite and Vera3 devices provided by http://www.getvera.com/
Gets weather from the Weather Underground. Powerful formatting options are available.
Sends commands to X10 Home Automation devices. Can also generate events based on X10 events. Tested with CM15A USB transceiver. Requires installation of the ActiveHome Pro SDK: http://www.activehomepro.com/sdk/
Actions for interacting with XBMC version 12 - Frodo (or later?).
Most actions communicate with XBMC through the JSON protocol. Some simple actions use the event client (UDP). Some actions require the installation of the XBMC addon called VoxTools.
Used to create payloadXML files by querying the XBMC mySQL database. Custom queries can be defined in the plugin settings.
Used to create payloadXML files by scanning the XBMC sqlite ".db" files. Custom queries can be defined in the plugin settings.

One omission there was my Tellstick but I soon realised I could use the built in VoxCommando command to execute an external program to call the command line program  Telldus supplied, to control my lights. 15 minutes later I had a script running and could either turn specific lights on or off by saying Turn Lounge Light on or toggle all lights on or off by saying just my prefix and Lights. The really good news is that my script is available in the VoxCommando forums. I should say James wouldn't recommend just Lights as a command as it is short and could lead to false positives but I only ever use it with the prefix which seems to work.

There are a few gotchas in this sphere. Things like the aforementioned open microphone false positive issue can certainly bite but perhaps less obvious is the way automation can take away expected functionality.

For example for my control of my main lights,
through the Telstick and HomeEasy Light Socket, to work  the main physical light switch has to be on. This is not the expected functionality for visitors as they are not familiar with the system and leads to much hilarity.

It is possible to get HomeEasy friendly replacements for the main switch but being a rented property this is not something  I can change. I’ve compromised by having clearly marked stick on Wireless Switches nearby (tip use command strips to stick them on so they can be easily removed) and labelling the other switch do not turn off.

I’ve also extended the system with PIR detectors that automatically turn certain lights on. However this has led me to a limitation in my TellStick being the base model it as I mentioned only sends. Unfortunately this means that it has no idea that one of the wireless buttons has been pressed or the PIR has tripped. This in turn means VoxCommando doesn’t know the state of the lights controlled by those external switches which confuses it when responding to my Computer Lights command.

My next stage is to use a more advanced TellStick. There are two models the Tellstick Duo, which looks like my current model but receives as well as sends, and the TellStick Net which as it name suggests sits on the network and doesn’t need to be plugged directly into the PC – in fact doesn’t need to have a PC turned on. Both of these also allow the use of Weather Stations as an input making it possible to trigger something like a fan based on temperature or humidity.

Wherever I choose to go next with this though I am pretty sure VoxCommando will keep up with me. James is constantly updating it with Version 2 introducing support for a different Microsoft Voice recognition system that is better for non-english speakers, amongst a lot of other features.

All in all I cannot recommend VoxCommando highly enough if you want to get into the wonderful world of Voice Control. Coupled with the Amulet Remote you will get very reliable control of just about whatever type of HomeAutomation you want to use.


Back to content | Back to main menu