Welcome

Over the last several years I've been dealing with various stages of disability thanks to ALS. My goal is to share solutions and review various products/tools/devices that I have found particularly helpful.

Wednesday, 9 January 2013

Home Automation, the 3rd Attempt

Introducing the "Jarvis Mod"

Wow. The Christmas holiday season can really get in the way of any plans you have for personal projects. I actually had the autohotkey script done at in early December, but all the obligations for this season and having the family around really slowed me down. Not that I am about that quickly anyway ;-)

Now I'm back to it. Introducing, the Jarvis mod for your Vera home automation system. But first a little back story.

We've talked before about how I'm starting to rely more and more on voice control for my computer. But that doesn't really help me out for the rest of my environment, so I started wondering if there was a way I could use voice to have some control over my environment. Ideally with minimal cost and using tools that are ready have.

The particular problem I was hoping to address was to be able to run my home automation system through my iPhone using Siri. I mean really, who would not want to be able to walk into their house speak a few instructions and have your environment respond to you in a similar way to what you see on Star Trek the next generation, or Jarvis (hence the name) from the movie Ironman.
Well, it turns out that there is!

Obviously, it's not going to be anywhere near as powerful as what you see in Star Trek or Ironman. However I can use Siri's existing functionality to send a message to my Vera Zwave home automation system. This is by definition a hack as it does use some digital duct tape and bailing wire to get this to work. But for my needs, it works very well. Check it out…
video
So how did I get this to work? As you can see from the video, I use the Siri to send a message to my computer via (a secret) e-mail. Microsoft outlook receives the mail, recognizes it and fires a rule to create a text file in a specific directory containing the contents of the e-mail. There is an auto hotkey script running on my PC which waits for this text file, parses its contents and then sends the appropriate notifications to my Z wave system.

It's probably easiest to visualize in the following chart.
The Jarvis script is at its core very simple. It is a simple text parser which reads the text for key phrases such as: "turn on the family room light". It doesn't use any fancy heuristic to figure out the meaning of the sentence. It simply looks for keywords in a sentence. In this case those words would would be "light", "on" and "family room". It doesn't care about the order, just their presence. I can however send multiple instructions via one e-mail using Siri. Each sentence is interpreted as one instruction. So I can have several sentences to fire several different devices. The script looks for the "." As a separator between instructions.

It is very easy to add more commands. Commands presently are:

  • turn on/off the basement/living room light
  • lock/unlock the door
  • run scene <scene name>

Now obviously this is going to reason some security questions. As I for sure do not want some stranger firing an e-mail to my house and operating my devices. So I do have some security protocols built in. Outlook requires the message to be from a certain e-mail which will remain secret ;-) it is also easy enough to integrate a password requirement into the autohotkey  Script. This will be a simple day password (not yet implemented) where if it is absent from the script, Jarvis will not operate. It is also very easy to detect multiple, repeated attempts.

Also, I only activate my Jarvis script when I expect to need it.

Some might also ask why I chose to use autohotkey  n this way as opposed to simply firing the instructions via Outlook. While this is possible to do via the integrated VBScript in Outlook I would have to duplicate the same code into the Microsoft speech macros to get the same functionality. I.e. doubling my maintenance requirements. Any change to one would have to be made to both. In This Way, Outlook and the speech macros simply messengers. Any changes, modifications or updates are simply done in the Jarvis script only. Also by using autohotkey  it is very easy to add additional functionality to interface with any other system running on my computer. For example it would be easy enough to add commands to start iTunes and play music over my airplay system.

Unfortunately however, this Jarvis mod has been written to operate with my z wave system and PC set up. This means that unfortunately it will not be immediately portable into your environment. My intention here was to share the methods and show that it can be done. That said I will be including the text file with some additional instructions on how to do so. You will however require a basic autohotkey knowledge to know where to make the appropriate changes to your script.

Okay, I'll admit it… I just
wanted to use this picture ;-)
You can grab the Jarvis files here: the Z wave Jarvis Mod however the Windows speech macros are not yet included. Functionally, they will be nearly identical to the VBScript for Outlook.

(Update: as of 14/1/2013 speech macros are included and functional)

I will be working on a tutorial on how to properly set this up in improving the provided instructions.

So I think it's safe to say that the myth you can't extend Siri functionality or improve on your voice control functionality is pretty much busted ;-)That being said, I really should point out will once again that this script is more of a first functional prototype or a proof of concept rather than a final product. And by definition, is not really modifying the function of Siri or any of the other systems, but extending the functionality by tying them together through another script… By definition to me, this is a hack ;-) I will be periodically updating or reworking the script.

10 comments:

  1. Smart Home Chicago has held many different things regarding home automation. It has changed home in a different way that the owner can't imagine. Helping them out on simple things regarding with their lights, temperature and other things that they include in their automation.

    http://www.tunnel1.com/

    ReplyDelete
  2. Home Automation

    Home automation systems integrate electrical devices in a home with each other. The methods used in home automation include those in building automation as well as the control of customary activities, such as home theatre systems, houseplant and lawn watering, changing home “scenes” for different events (such as romantic dinners or loud parties), pet feeding, and the control of domestic robots.

    ReplyDelete
  3. Great Blog nice to see your post great points about and nice video about home automation and that chart also giving good information and how the automation system will work......Thanks for sharing your experiment...Contact Thasmai for Home Automation Bangalore

    ReplyDelete
  4. Congratulations guys, quality information you have given!!! www.homeinvasion.co/

    ReplyDelete
  5. your topics are a little scary to me. While that type of technology is great if you need it, I find it pretty invasive.
    home cinema installation sydney

    ReplyDelete
  6. Thanks for your beyond belief blogs stuff. Visit This Link

    ReplyDelete
  7. Totally unique stuff is here really amazing!!! Visit This Link

    ReplyDelete
  8. The methods used in home automation include those in building automation as well as the control of customary activities, such as home theatre systems.It is pressure from automation operations employees to make the finest parts possible that will become parts of the finest products ever produced.


    Weighbridge & Scales Suppliers Qatar

    ReplyDelete
  9. I agree that it would create some security questions. I agree that you would never want a stranger sending emails to your house and operating your devices. I'll have to look into something like this for my own home as I don't want this either. Thanks for the great tips and sharing your experience! http://www.highcaliberalarm.com/home-automation.html

    ReplyDelete
  10. Nice it seems to be good post... It will get readers engagement on the article since readres engagement plays an vital role in every blog.. i am expecting more updated posts from your hands.
    Home Automation in Chennai
    smart home in Chennai
    Home security in Chennai
    Burglar alarm in Chennai
    Door sensors Chennai

    ReplyDelete