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.

Want to write HomeGenie programs? Here’s how you get started.

Hello Internet Neighbours! So I’ve recently figured out how to programmatically tell my light switch to turn on when the door sensor is triggered. If you missed the first post on HomeGenie, here it is. It’s basically a Home Automation web application that can control all your ZWave devices. You just need to buy a […]

How to set up a home security system without Cloud services or monthly fees

Hello Neighbors

Recently, I’ve been looking at setting up home security systems that require no contracts.

I ended up using 2 systems:
A DIY home security system (using z-wave compatible devices with HomeGenie) – pretty much an Internet of Things system that does not require a cloud service. Also, it does not require that your devices be exposed to the Internet.

  • you can get the texts notifications for free, however if your computer turns off for whatever reason, nothing will work (which is why I decided to also get a more reliable system)
  • HomeGenie also shows images from your IP Cameras (if you have a URL for it. Usually it’s something like: http://[ipAddr]/snapshot.cgi)
  • you can set it up so that it is only accessible in your internal home network – You can use TeamViewer (free for personal use) to remotely control your HomeGenie computer from the Internet.
  • Another advantage to using TeamViewer to access your computer on your home network is that you don’t have to expose your IP cameras to the Internet.
  • [todo: figure out how to make a heartbeat system to tell whether the computer is on].
  • [todo: figure out how to use a cell phone to send SMS instead of having the computer email it (in case of power failure)].

In case of a power outage, I also got Simplisafe – which is more well known.

  • Will work even if the power is out because it uses cell towers to send notifications to the monitoring center, but you’ll have to pay for that.
    which have optional plans of:

    • $15 (call your phone, police dispatch)
    • $25 (remote monitoring on cell phone)
    • $0 – you still get the siren sound.
  • DIY Zwave Simplisafe
    Arm/disarm system Web page/phone – can do so remotely Keypad w/PIN / keychain (no PIN)
    Sensors Many vendors (check if they support Zwave) Simplisafe sensors only
    Connectivity Requires Internet to be up. Computer needs to be powered on. Uses cell towers.
    Notifications Free Email notification Must pay for monthly interactive plan for email notifications/remote control.

    The video

    After watching the video, be sure to check out the addendums at the bottom of the shownotes. One thing I forgot to mention is that you have to set up an email account to send the email from. Also, I remember that installing the drivers for the z-wave controller on Win10 wasn’t straightforward. If you run into an issue, let me know and I’ll post a video showing how to install the driver.

    The hardware

    I’d greatly appreciate it if you’d use the affiliate links (just need to click one of them – you can add more items to cart directly from amazon.com)

    Z-Wave Controllers

  • Z-Wave stick S2 (used in this video)
  • The new version of the stick – supports Z-Wave Plus devices
  • Note: Other Z-Wave controllers cost 90-150

    Motion/Door/Tilt Sensors

  • [Amazon search: “Ecolink Z-Wave”]
  • I used Ecolink, but you can use other z-wave compatible sensors as well.

    Other Z-Wave Gadgets

  • Siren
  • Energy Switch
  • Low powered computers

  • [Amazon search: “raspberry pi”]
  • [Amazon search: “stick computers”]
  • These ones have good reviews:
    Quantum Access w/LAN ($140)
    AWOW Intel Atom Z3735f ($100)

     

    Addendum [Email setup]

    Click the Configure > Go down to the Messaging and Social section > Expand “E-Mail Account”
    From here, you’ll have to Google the smtp settings for your service provider.
    Here are the SMTP servers for the common providers:

      Gmail – smtp.gmail.com
      Yahoo! – smtp.mail.yahoo.com
      Hotmail – smtp.live.com

    SMTP username – Put your full email address
    For SMTP Port: Use 587 or 465

    Addendum [Notes on Security]

    Set a password for your HomeGenie dashboard

      Go to Configure > Maintenance > Expand “HTTP Settings” > Click the ‘Set’ button on the right

    I don’t recommend buying zwave locks in case the protocol is hacked. Here is a YouTube link of a security researcher unlocking a z-wave lock without knowing the key combo.
    On your wireless router, make sure you are using WPA-2 and have a secure password.
    Use 2FA on your TeamViewer account.