Adding Voice Control to Vera Z-Wave systems using Amazon Echo

Interested in adding Amazon Echo voice control to your Vera Z-Wave system?
You need to first have a server or NAS, or even a Rasberry Pi capable of running Java 8 and you want it up and running on a static IP on your LAN.  This is a must, basically you are fooling the Echo into thinking your little server running Java and a special app by Arm that it’s a Phillips Hue gateway.   I’m using a Windows server I have running all the time for my Squeezebox media, shared files so I used that.

 

Here are a few links and things to help you get started integrating the Vera and Amazon Echo using a Windows server:

* Using Windows you’ll need to make sure that the Windows Firewall is allowing the proper ports, and that the SSDP Discovery service may also cause issues using port 1900 UDP required by Arms Java gateway fooler app.

  1. Purchase an Amazon Echo
  2. Download the Java SDK 8 for your server and install it
  3. Go to GitHub and get the Java code
  4. Make sure you have the Firewall and SSDP issues reviewed
  5. Start the Java app using this code:
    java -jar -Djava.net.preferIPv4Stack=true amazon-echo-bridge-0.1.1.jar --upnp.config.address=192.168.15.213

    (where the IP Address listed is the IP of the server, not Vera and not Echo)

  6. test the server with your browser – preferably from another machine on your network
     http://192.168.15.213:8080/api/devices
  7. Make a list of your devices/scenes in Vera, planning this out makes it easier. Write down device #’s and Scene #’s
  8. Get http://www.swensensoftware.com/im-only-resting software – this helps you POST, DELETE devices from the Java app
  9. Edit this code for each SCENE, where as SceneName would be whatever you want to say to the Echo such as Kitchen Lights, etc.  Edit your scene numbers for your ON and OFF scene.  The IP is the IP of your Vera system – This should be set to a Static IP on your LAN. Mine is at 192.168.15.250″
    {
    "name" : "scenename",
    "deviceType" : "switch",
     "onUrl" : "http://192.168.15.250:3480/data_request?id=action&output_format=json&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=200",
     "offUrl" : "http://192.168.15.250:3480/data_request?id=action&output_format=json&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=201"
    }
  10. Edit this code for each DEVICE, where as DeviceName would be whatever you want to say to the Echo such as Office Lamp, etc.  Edit your device numbers for your ON and OFF scene – using a device you keep the same device number since Echo knows OFF and ON.  The IP is the IP of your Vera system – This should be set to a Static IP on your LAN. Mine is at 192.168.15.250
    {
    "name" : "devicename",
    "deviceType" : "switch",
     "onUrl" : "http://192.168.15.250:3480/data_request?id=action&output_format=json&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1&DeviceNum=499",
     "offUrl" : "http://192.168.15.250:3480/data_request?id=action&output_format=json&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0&DeviceNum=499"
    }
  11. Now  you are ready to post these to your server.  Run the I’m Only Resting software. Paste in the Header code below into the header box, Paste your device or scene code into the Body area, set your server properly (in this case I was testing at 192.168.15.199) set the method to POST and hit submit. You can do this up to 10 times for a total of 10 devices. Try adding more, not sure what happens.Header code:
    X-Application-Context: application:8080
     Transfer-Encoding: chunked
     Date: Thu, 30 Apr 2015 2:20:44 GMT
     Server: Apache-Coyote/1.1
     Content-Type: application/json; charset=UTF-8
    
    

    Amazon-Echo-HA-device-ImOnlyRestingm

  12. Test your server has stored the items by trying  STEP 6 again, it should show each device with an ID. You can use this ID later to DELETE items using the rest software above. Select DELETE instead of post for method.  Use http://192.168.15.213:8080/api/devices/DEVICEID as your server URL when deleting, changing the device ID to what you wish to delete.
  13. Once you have added all the items. you are ready to use your Amazon Echo app or the Echo itself.   Simply tell Echo (alexa in my house) to “discover my devices” or use the Echo app under settings you’ll find the connected home config.
  14. That’s it!  Thanks to Arm and some of the other smart guys on the Vera forums. Here is the thread I used to gather all of this data.  Have fun and if things don’t work, try resetting your Echo, reboot your server and rerun the app, checking the IP’s, testing as described above will save you pain.  Windows Firewall and SSDP listener will also bite you, so do some searches on how to configure this stuff properly.  It works, see the videos I made for more info and to see the Echo in action with my Z-Wave system

 

no images were found