I figured I'd post something for those who want to test this out. This is just a collection of the steps I did to get this to work in my Windows environment. Many thanks to Arm for sharing this with us.
1. Download the JAR file. https://github.com/armzilla/amazon-echo-ha-bridge/releases
2. Of course, make sure your machine is ready for this. In my case, Windows and make sure it has the correct Java version installed.
3. (Optional) You can do some advanced troubleshooting on Windows. From a CMD prompt, run netstat -ano | find "8080"
, netstat -ano | find "1900"
, netstat -ano | find "50000"
. You want the response to come up blank. If it comes up with something else, the number in the last column is the process ID of whatever has that port. You can use Tasklist to try to find it and shut that service down. SSDP Discovery could be one of them.
4. From a CMD Prompt, start the program with this (obviously with your own server's IP address):
java -jar -Djava.net.preferIPv4Stack=true amazon-echo-bridge-0.1.0.jar --logging.level.com.armzilla.ha.upnp=DEBUG --logging.file=ha.log --upnp.config.address=192.168.0.X >log.txt
the --logging and the >log.txt are optional and just pump out some log files.
5. Make sure you don't have any firewall issues blocking these ports. Troubleshooting that is outside of this scope.
6. Make sure things are running by trying to browse to http://192.168.0.X:8080/api/devices
. You should just get some text as a response (but not an error message).
7. Then, you need to upload your instructions for your Vera devices. I found this tool here to help with that: http://www.swensensoftware.com/im-only-resting
In that tool, the URL field is just http://192.168.0.X:8080/api/devices
and Method is post.
I found I had to populate the header box so I just put in this:
Date: Sat, 25 Apr 2015 21:14:21 GMT
Content-Type: application/json; charset=UTF-8
Then in the Body, I put this (you will need your Vera IP, a name you use for the device on the Echo, and the device number (found on the Advanced tab of the device in Vera):
"name" : "kitchen light",
"deviceType" : "switch",
"onUrl" : "http://Vera_IP:3480/data_request?id=action&output_format=json&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1&DeviceNum=126",
"offUrl" : "http://192.168.0.70:3480/data_request?id=action&output_format=json&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0&DeviceNum=126"
8. Once you've done this and it was submitted correctly, then "Alexa, discover my devices" and then you can say "Alexa turn off kitchen light".
9. You can use the Vera app on your phone to trigger discovery, or forget previously discovered devices if you have a collision.