Jump to content

Amazon Echo and ISY


madmartian

Recommended Posts

Posted (edited)

I have just posted a new version (5.0.21) of the HUE Emulator Configuration program (AWS_Config.exe) on my web site (www.the-gordons.net).  

 

This version is the only valid version if you are using the Harmony Hub. It will only work with version 1.0.7 of the HA Bridge from BWS Systems (www.bwssystems.com). The ini file must have a valid Harmony Hub section i.e. [Harmony Hub] must exist in the ini file. The Restful-Harmony Java application is not needed, just the HA Bridge Java application.

 

If you are not using the Harmony Hub and have removed the Harmony Hub section ([Harmony Hub]) from the ini file It will work with the older versions of the HA Bridge (versions 0.4.x).

 

This version requires a complete install. It is compatible with the data bases of prior versions of the HA Bridge and will load them properly.

 

This version has been tested with an actual Harmony Hub by a Harmony user and found to work properly. I do not have a Harmony Hub so I could not test it properly.

 

If you discover any errors, have questions or issues, please contact me by email. I am barry and I own the domain the-gordons.net so my email should be obvious. If you feel the application is not working properly and need my help you must send me a copy of the "AWS_Config.log" file which will be found in the same directory as "AWS_Config.exe". The Debug line in the ini file should say 'All', i.e. the line in the ini file should be "Debug=All" (without the quotes).

 

If you need information about the BWS Systems HA Bridge application, this link should help:

https://github.com/bwssytems/ha-bridge

I suggest you read all of the material

 

The following link will download the HA Bridge application version 1.0.7:

https://github.com/bwssytems/ha-bridge/releases/download/v1.0.7/ha-bridge-1.0.7.jar

 

I run all of the HA Bridge programs on a single Raspberry Pi, changing the start line for each instance to have a different port number (8081 to 8084 for the 4 instances I run) . I have a folder /home/pi/echobridge with sub-folders logs and data.  In the following sample things in <...> need to be your values. Although I show it on multiple lines it is all on one line with a space between parameters. The following is a typical start line from rc.local:

 

nohup java -jar (space) 

-Dvera.address=<IP address of ISY994> (space)

-Dupnp.config.address=<IP address of Raspberry Pi> (space)

-Dserver.port=808x  (space)

-Dupnp.response.port=5000x  (space)

-Dupnp.device.db=/home/pi/echobridge/data/device84.db  (space)

-Dharmony.address=<IP address of your Harmony Hub/remote> (space)

-Dharmony.user=<your harmony account userid>  (space)

-Dharmony.pwd=<your Harmony account password>  (space)

/home/pi/echobridge/ha-bridge-1.0.7.jar > /home/pi/echobridge/logs/log84.txt 2>&1 &

Edited by barrygordon
Posted

Hello everyone,

 

Another quick update: Izzy it shall be!

 

With kind regards,

Michel

 

Yay!  Does that mean it is ready to publish or are we waiting for another approval cycle from Amazon?

 

Any estimate on when the portal will be released in non-Beta form?

Posted (edited)

 

I have Barry's conf app working.  For some reason echo can not find anything when i have it discover.

Here is my Database file

[{"id":"1353288794","name":"Couch Lamps","deviceType":"Dimmer","offUrl":"http://username:password$@192.168.X.X:80/rest/nodes/21%2093%2076%201/cmd/DOF","onUrl":"http://username:password$@192.168.X.X:80/rest/nodes/21%2093%2076%201/cmd/DON/${intensity%20byte}"},{"id":"2055389976","name":"Fan Light","deviceType":"Dimmer","offUrl":"http://username:password$@192.168.X.X:80/rest/nodes/31%209D%2096%201/cmd/DOF","onUrl":"http://username:password$@192.168.x.x:80/rest/nodes/31%209D%2096%201/cmd/DON/${intensity%20byte}"}]

This is the cmd i run on the pi to start emulator

 

nohup java -jar -Dvera.address=192.168.x.x -Dupnp.config.address=$_IP -Dserver.port=8081 -Dupnp.response.port=50001 -Dupnp.device.db=/home/pi/echobridge/data/device81.db /home/pi/echobridge/ha-bridge-1.0.7.jar > /home/pi/echobridge/logs/log81.txt 2>&1 &

This is the emulator log file

 

nohup: ignoring input
[main] INFO com.bwssystems.HABridge.HABridge - HA Bridge (v1.0.7) starting setup....
[main] INFO com.bwssystems.HABridge.devicemanagmeent.DeviceResource - HABridge device management service started.... 
[Thread-0] INFO spark.webserver.SparkServer - == Spark has ignited ...
[Thread-0] INFO spark.webserver.SparkServer - >> Listening on 0.0.0.0:8081
2015-05-14 01:29:46.594:INFO:oejs.Server:Thread-0: jetty-9.0.z-SNAPSHOT
2015-05-14 01:29:47.049:INFO:oejs.ServerConnector:Thread-0: Started ServerConnector@1b06361{HTTP/1.1}{0.0.0.0:8081}
[main] INFO com.bwssystems.HABridge.hue.HueMulator - Hue emulator service started....
[main] INFO com.bwssystems.HABridge.upnp.UpnpSettingsResource - Hue description service started....
[main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener starting....
[main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener running and ready....

 

 

I am curious, for the $_IP, did you use the lines to define that variable first?  Maybe just use the actual IP of your Pi rather than the $_IP variable just for testing.

 

Also, are you using Wired or Wireless for the Pi?  There have been issues where one or the other just will not work.  I think due to some uPnP issues that crop up.  Try both (one at a time) to see if one works.  

 

Here is the rc.local that is in the /etc directory on my Pi, set to chmod 777.  Note that I am using Harmony integration, so remove those fields if not needed.  Also, I am running 2 copies because I have so many devices being controlled. Finally, I create log files so that I can go back in and see what is going on.  

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi
#The following is for multiple emulators on the same machine
#echo "Starting the Echo Bridge Emulators"

nohup java -jar -Dvera.address=192.168.1.145 -Dupnp.config.address=$_IP -Dharmony.address=192.168.1.127 -Dserver.port=8081 -Dupnp.response.port=50001 -Dupnp.device.db=/home/pi/echobridge/data/device81.db -Dharmony.user=XXXXXX -Dharmony.pwd=XXXX /home/pi/echobridge/ha-bridge.jar > /home/pi/echobridge/logs/log81.txt 2>&1 &

nohup java -jar -Dvera.address=192.168.1.145 -Dupnp.config.address=$_IP -Dharmony.address=192.168.1.127 -Dserver.port=8080 -Dupnp.response.port=50000 -Dupnp.device.db=/home/pi/echobridge/data/device80.db -Dharmony.user=XXXXX -Dharmony.pwd=XXXXX /home/pi/echobridge/ha-bridge.jar > /home/pi/echobridge/logs/log80.txt 2>&1 &

exit 0


Finally, try playing with the uPnP variables in the command line for the program.  My feeling is that this could be a uPnP issue.  

-Dupnp.strict=<true|false>

Upnp has been very closed on this platform to try and respond as a hue and there is now a setting to control if it is more open or strict, Add -Dupnp.strict=<true|false> to your command line to have the emulator respond to what it thinks is an echo to a hue or any other device. The default is upnp.strict=true.

-Dtrace.upnp=<true|false>

Turn on tracing for upnp discovery messages. The default is false.

See my signature below for my current software config, but at this time it is:

 

ISY994IR Pro Z-wave 5.02

ELK M1 Gold 5.3.8

Echo integration

 - HA-Bridge v1.0.7 (Hue emulator w/ Harmony support by BWS Systems) on RPi2 

 - ISYnnode.js (NEST bridge by xKing) on RPi2

 - AWS-Config 5.0.21 (Configuration tool by Barry Gordon) on Win7 laptop for setup

Edited by blueman2
Posted

Yay!  Does that mean it is ready to publish or are we waiting for another approval cycle from Amazon?

 

Any estimate on when the portal will be released in non-Beta form?

I have everything ready to put together the emulator/bridge solution that is being discussed here but if the "official" support is coming in a couple days I will continue to hold off.

 

Having a timeline would be very helpful, though not sure if that is possible.

Posted

Themlruts,

 

Well, now I am starting to have your issue.  First time ever.  I have 2 emulators running, and the Echo will only discover one of them.  If I re-do discovery enough, it will eventually find the other, but never both of them at same time.  Good news is that once it discovers, the commands from Echo will work, even if it does not discover that emulator next time.  Not sure why this is suddenly happening. Can't be related to Barry's code since that is not even running during discovery.  Must be something that showed up in HA-bridge 1.0.7 but I just never noticed because I had not been doing a lot of discoveries.  

Posted (edited)

Interesting.  I am running 4 emulators, all 1.0.7 with a total of 93 devices defined.  The Echos (I have two) find all 93 devices and the Alexa app reports the same thing, 93 devices. The spread is 31, 35, 22, 5. The bridge with only 5 devices on it is for working with my own controller for handling my Pool and my Theater. The other 88 devices on the three emulators are all ISY devices.

 

Do you have Amazon forget all your devices before discovering them?  I always do that, and do it because when I first started with Echo if I did not do that it did not reliably find my devices. By forgetting before discovery it appears to be 100% reliable in the discovery process.

Edited by barrygordon
Posted

Hello everyone,

 

We have to go through recertification. Hopefully it's not going to be as long since we only have minimal issues to resolve.

 

With kind regards,

Michel

Just out of interest, how long were the last recertification cycles?

 

Michael.

Posted (edited)

Themlruts,

 

Well, now I am starting to have your issue.  First time ever.  I have 2 emulators running, and the Echo will only discover one of them.  If I re-do discovery enough, it will eventually find the other, but never both of them at same time.  Good news is that once it discovers, the commands from Echo will work, even if it does not discover that emulator next time.  Not sure why this is suddenly happening. Can't be related to Barry's code since that is not even running during discovery.  Must be something that showed up in HA-bridge 1.0.7 but I just never noticed because I had not been doing a lot of discoveries. 

192.168.10.116 is my echo.  Not sure why this is not working. See attached log.  

Just to make sure -Dvera.address should be the local IP of the PI correct?

log81.txt

Edited by themlruts
Posted (edited)

themlruts,

 

No -Dvera is the address of the ISY994

 

I posted this a few posts back:

 

I run all of the HA Bridge programs on a single Raspberry Pi, changing the start line for each instance to have a different port number (8081 to 8084 for the 4 instances I run) . I have a folder /home/pi/echobridge with sub-folders logs and data.  In the following sample things in <...> need to be your values. Although I show it on multiple lines it is all on one line with a space between parameters. The following is a typical start line from rc.local:

 

nohup java -jar (space) 

-Dvera.address=<IP address of ISY994> (space)

-Dupnp.config.address=<IP address of Raspberry Pi> (space)

-Dserver.port=808x  (space)

-Dupnp.response.port=5000x  (space)

-Dupnp.device.db=/home/pi/echobridge/data/device84.db  (space)

-Dharmony.address=<IP address of your Harmony Hub/remote> (space)

-Dharmony.user=<your harmony account userid>  (space)

-Dharmony.pwd=<your Harmony account password>  (space)

/home/pi/echobridge/ha-bridge-1.0.7.jar > /home/pi/echobridge/logs/log84.txt 2>&1 &

Edited by barrygordon
Posted

themlruts,

 

No -Dvera is the address of the ISY994

 

I posted this a few posts back:

 

I run all of the HA Bridge programs on a single Raspberry Pi, changing the start line for each instance to have a different port number (8081 to 8084 for the 4 instances I run) . I have a folder /home/pi/echobridge with sub-folders logs and data.  In the following sample things in <...> need to be your values. Although I show it on multiple lines it is all on one line with a space between parameters. The following is a typical start line from rc.local:

 

nohup java -jar (space) 

-Dvera.address=<IP address of ISY994> (space)

-Dupnp.config.address=<IP address of Raspberry Pi> (space)

-Dserver.port=808x  (space)

-Dupnp.response.port=5000x  (space)

-Dupnp.device.db=/home/pi/echobridge/data/device84.db  (space)

-Dharmony.address=<IP address of your Harmony Hub/remote> (space)

-Dharmony.user=<your harmony account userid>  (space)

-Dharmony.pwd=<your Harmony account password>  (space)

/home/pi/echobridge/ha-bridge-1.0.7.jar > /home/pi/echobridge/logs/log84.txt 2>&1 &

Thanks must have missed that.  Still doesn't work.  Here is some from my log file.  .116 seems to want to talk on por 50000 but my bridge is set for 50001

 
[main] INFO com.bwssystems.HABridge.upnp.UpnpListener - Traceupnp: SSDP packet from 192.168.10.116:50000, body: M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: 15
ST: urn:schemas-upnp-org:device:basic:1
Posted

themlruts,

 

I am now totally confused by the multiple posts, so lets start over.

 

What is the problem?

1) The configuration tool does not find the ISY

2) The configuration tool does not find the bridge?

3) The Echo does not find the Devices you have configured?

4) The bridge does not find the Harmony Device on your LAN?

 

 

 

I will need the answer to the above Plus:

 

1) The IP address of the ISY

2) The IP address of the Raspberry Pi

3) A copy of the full Config program log (AWS_Config.log)

4) A copy of your rc.local file from the Pi

5) A copy of the Bridge's log file

 

I suggest you reboot the Pi as that will re-initialize the Bridge's log file, or you can just erase it.

 

Take all the information requested, it will all be textual, and put it into a zip archive. The answers to the questions can just be in a small text file. send the archive to me at my email address. My name is barry and I own the domain the-gordons.net so my email address should be obvious.

Posted

Hi MWareman,

 

They usually take between 10 to 20 days.

 

With kind regards,

Michel

 

That'd be a great holiday gift to myself.

 

Hi Michel,

 

Will the portal support two Echos?

Posted

Modified this slightly to add couple other 'x's that need to be adjusted for multiple emulators:

 


nohup java -jar (space) 

-Dvera.address=<IP address of ISY994> (space)

-Dupnp.config.address=<IP address of Raspberry Pi> (space)

-Dserver.port=808x  (space)

-Dupnp.response.port=5000x  (space)

-Dupnp.device.db=/home/pi/echobridge/data/device8x.db  (space)

-Dharmony.address=<IP address of your Harmony Hub/remote> (space)

-Dharmony.user=<your harmony account userid>  (space)

-Dharmony.pwd=<your Harmony account password>  (space)

/home/pi/echobridge/ha-bridge-1.0.7.jar > /home/pi/echobridge/logs/log8x.txt 2>&1 &

Posted

I've been combing through this and have an Echo in my Cart, and just purchased the ISY portal but 40 pages on this thread is a bit much, and i've combed through over half...

Questions:

 

1. Is the RPi required?  What if you actually own a Harmony Hub?

2. Will setup be more streamlined with the portal integration (final certification) we have our fingers crossed for?

3. Looking at Bluemans signature it appears I need to be running at least 3 software pieces, 2 on the RPi, and 1 on a windows computer, will this be consolidated?

 

This is an exciting topic, and i've been gone for a couple months and I can't believe how much stuff i've missed!  Just catching up now and looking forward to a lot more automating :)

 

Thanks,

Posted

I've been combing through this and have an Echo in my Cart, and just purchased the ISY portal but 40 pages on this thread is a bit much, and i've combed through over half...

Questions:

 

1. Is the RPi required?  What if you actually own a Harmony Hub?

2. Will setup be more streamlined with the portal integration (final certification) we have our fingers crossed for?

3. Looking at Bluemans signature it appears I need to be running at least 3 software pieces, 2 on the RPi, and 1 on a windows computer, will this be consolidated?

 

This is an exciting topic, and i've been gone for a couple months and I can't believe how much stuff i've missed!  Just catching up now and looking forward to a lot more automating :)

 

Thanks,

Big517-

 

Answers depend on your route.  Currently, you can set up the WeMo or Hue emulators using info found in this thread.  That method does require a middleman computer like a Pi or an always on Windoze box.  This method does not require the portal.

 

If you wait for the ISY Connected Home/Skill to be approved, then you will need the portal but there won't be a need for a middleman computer or any of the emulators and mapping tools in this thread and setup is expected to be very straight forward using the Spoken name field for scenes/devices and program names all taken straight from the ISY.

 

For the going the Pi route, I believe there is only one REQUIRED piece (The emulator).  The mapping tool while not REQUIRED, does make set up MUCH easier.  The mapper is not running full time - just used for configuration via a Windoze box.  The emulator runs full time on either Windoze or a Pi.

 

Hope that helps.

 

-Xathros

Posted

themlruts,

 

I was having the same issue with newer versions of the HA bridge, I was able to fix the problem by going to Windows firewall and allowing all connections for the correct Java version. Not sure why this changed, I didn't have this issue with previous versions of the HA bridge. I also tried the UPNP setting but it didn't help.

Posted

Tungsten's comment is interesting.  I do not run a windows firewall.  I prefer to keep my LAN open to all interior (non WWW) traffic.  I safeguard the LAN through my router which a Mikrotik unit which I can not say enough about.

 

The following is a bit off-topic:

Since I already had WAP's installed I purchased the Mikrotik router without the built in WAP, But I just did my grandsons new house and there I installed a Mikrotik router with a 1000 mw radio and no external antennas. It covers his whole house, a small house, from the basement. The mikrotik routers are very small (5"x5"x1") and very programmable through a windows app Mikrotik supplies called Winbox. IIRC the basic router is $59.95 and the router with the radio is $69.95. tehir support is almost as good as that of UDI. It is not a device for non network savy folk, although its basic OOTB configuration will work for 90% of the simple user configurations. 

Posted (edited)

Hi Barry,

 

I think I found something funny with the ha-bridge 1.07.  I know your not responsible for that part of the equation but still you mention you have good communication with BWS Systems.  I found out that if the harmony hub is Off, disconected from the network or for what ever other reason is not found the ha-bridge ver 1.07 does not load up.  It just failes to run leaving not just the harmony hub out but also the ISY functions out.  Can there be a way that it runs even if it does not find the Harmony hub on the network.  I know this seems kind of weird to ask for but the reason for this request is that I disconect the power from all the equipment were the harmony hub is located to save energy.  So when the Raspberry Pi reboots for some reason while the harmony hub is off the network it fails to run the ha-bridge.  Think something like this can be done?  

Edited by rdavidowski

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      371.5k
×
×
  • Create New...