HomeGenie: Turning Things On and Off with Alexa

At first I didn’t think that HomeGenie was compatible with Alexa, but there’s a hack! It makes use of HA bridge, which acts as a “Philips Hue Hub” web server – and this IS compatible with Amazon Echo.

It requires a bit of configuration, but it’s easy.

The video

Get the Hardware!

I’ve been using the Amazon Echo and it’s amazing. It’s not just used to control light switches and order stuff from Amazon, it can hook up to your Bluetooth system and play music (“Alexa, play classical music”). Here’s a search for all Echo Devices (The ones I recommend are the Echo and the Echo Dot (a small size version) – the Echo Tap is not always listening). Amazon Affiliate Note: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. The products will not be marked up if you use my links, but if you did not find my article helpful, you don’t have to use them.

In-wall Switch (GE): http://amzn.to/2coOrzO
In-wall Switch Add-On (GE): http://amzn.to/2dayiwD
Plug-in Switch: http://amzn.to/2cxQCif

Use Amazon Home Services to save time on the installation

Configure the software!

  • Download Java and HA bridge (I installed it on the same machine as HomeGenie, but you can install it on any machine in the same network):
    Get the .jar file: from https://github.com/bwssytems/ha-bridge/releases [ctrl click for new tab].
    java -jar nameOfJar.jar
  • Secondly, navigate to the HA bridge server (http://localhost:8080/) and click the ‘Manual Add’ button at the top.
    Configure the name (which is what you’ll say to Alexa) and the ON and OFF URLs.
    To figure out the node number, go to your HomeGenie dashboard and look for: ZWave #.

    getthenodenumber

    Getting the node number – which is 2

    In my case, the node number is ‘2’.
    Here are the HomeGenie URLs for On and Off:
    http://localhost/api/HomeAutomation.ZWave/[node number]/Control.On
    http://localhost/api/HomeAutomation.ZWave/[node number]/Control.Off(if you are running the ha-bridge software on a different computer, replace ‘localhost’ with the IP address of your HomeGenie server)If you have a username and password configured in HomeGenie, you’ll need to get the Authorization Header and put it into the following string – see the video:
    [{"name":"Authorization","value":"Basic ABCDEFG123456"}] – Note that your password can be decoded from this string
    Here’s what the page looks like for me:

    setupthedeviceinhabridge

    Setting up the device

    Click on “Add Bridge Device” when you’re done.
    In the Bridge Devices tab, click on the Test ON and Test OFF buttons to see if it works.

  • Now go to your Alexa app on your smartphone and have it discover devices (note that Alexa must be on the same WIFI network as your HA Bridge)

    alexa discover devices

    alexa discover devices

  • Finally, just say “Alexa, turn [lightswitch name] on”

Special Thanks to…

Thanks to leonowski for pointing this out in the forums: http://www.homegenie.it/forum/index.php?topic=1064.msg9714#msg9714
Thanks to BWSSystems for releasing it open source: https://github.com/bwssytems

Bonus: Talk to Alexa (control your lights) from anywhere

There is an app you can get on your phone to issue commands to Alexa (Roger Talk)- so you don’t need to be at home to tell Alexa to turn the lights on or off. Go to http://efficienthacks.com/roger to hook up your Alexa to the app.