Sunday, 5 January 2014

Meet Rosie (Automating the lights at home part 3)

Meet Rosie
Introducing Rosie, my assistant. She manages my lights for me.


I can make a request of Rosie and, providing she understands it, she completes it.

Example:

Me: Rosie
Rosie: Yes Sir
Me: Living Room and Kitchen On
Rosie: Turning the Kitchen and Living Room lights on
Action: The lights come on!

Background

Rosie has existed for a while, only she had no name. I initially went with Ralf but then a couple of factors made me decide to go with female and Ralf no longer worked. I decided I wanted to increase the amount my lighting system could do and look to branch out from lighting control... and a name seemed like a good place to start!

How she works...

Beforehand...

As mentioned, Rosie has existed for a while. So let me recap on how she works.

Rosie is made up of:

A Raspberry Pi - Essentially, this is Rosie.
An RF Transmitter - This is used to switch the lights on and off
WiringPi - A really neat package that allows each control of the GPIO pins on the Raspberry Pi.
Strogonanoff - A great project I used which transmits the right signals to the Remote Control Sockets
Remote Control Sockets - The remote control sockets the lights are plugged into
Apache 2 - HTTP web server Software
PHP 5 - The programming language for the interface
MySQL - The database technology I like to use. This holds a database of lights, the schedule and groups them into programs.


That's all been working reliably for several months now, so it was time to extend the functionality a little bit.

The new components are:

VoiceCommand - Created by Steven Hickson, this amazing tool utilises Google's Text to Speech API allowing voice recognition to be used on the Raspberry Pi
Logitech Webcam - A webcam with built-in microphone so that Rosie can hear me
Portable speaker - A speaker so that I can hear Rosie

When I say Rosie, she responds with "Yes Sir?" (this is the default but can be configured). I can now say any command and Rosie will try to interpret it. With VoiceCommand I can choose whether I search Google for a result or look inside the config file. I've chosen to stick with the config file for now. I've added phrases for my lights and can ask Rosie to turn them on or off. 

For now, she's restricted to on and off commands but I'll be adding features to incorporate delays (Turn living room off in 10 minutes for example) and scheduling in future.

She's working pretty well but I'll be working on improving her in future. She's also currently restricted to about a 6 foot radius as the microphone and speaker only reach so far... so that needs thinking about too.

Of course there are times when I don't want to talk to Rosie or times when there is a lot of noise (TV on for example), so I still have the web interface which I access on my Phone, iPad or computer.

No comments:

Post a Comment