Jump to content

Amazon Echo and ISY


madmartian

Recommended Posts

Posted (edited)

OK, I can confirm that something odd has happened recently.  Indeed, the Echo is not finding some of my Harmony activities for ON command, but does work fine with OFF.  Give me some time to track down what is going on, and I will work with Barry to give him feedback.  

 

EDIT: OK, I found the issue!!  AWS-config is inserting the Friendly Name (what you tell Alexa to call it) into the JSON data field, rather than the DeviceID (What the harmony calls it).  I have let Barry know.  The reason I did not find this is that I mostly had the same DeviceID and Friendly name, so it never was an issue!  Also, be default, the friendly name is the DeviceID, but I (like you probably) changed the Friendly name to something more, uh, Friendly.  That is where the bug rears its ugly head.  

Edited by blueman2
Posted

Actually, According to BWS Systems, that field can contain either the deviceID or friendly name. I chose to use the friendly name but will change it to the deviceID to see if it helps. 

Posted (edited)

Actually, According to BWS Systems, that field can contain either the deviceID or friendly name. I chose to use the friendly name but will change it to the deviceID to see if it helps. 

 

Yes, this confused me too.  Harmony has 2 ways to identify the device: a deviceID number, and a harmony 'friendly name'.  Either can be used.  But then we also have a totally different Echo 'friendly name' that Echo uses for recognition.  

 

If you use the Harmony friendly name and keep it separate from the Echo friendly name, we are fine.  The problem in the code was not an issue of Harmony DeviceID vs Harmony Friendly name, it was an issue of Harmony Friendly Name vs Echo Friendly Name.  

 

However, there is an advantage to using the DeviceID number.  That number does not change if you decide to later change the name of an activity in the Harmony App.  Whereas if you use the Harmony friendly name in the JSON field, the user will have to 'update' that device in your program after making the change in the Harmony App.  Downside of using DeviceID is that it is less 'readable' for users.  If that matters.    

Edited by blueman2
Posted

Hi Barry

 

Just got back from work.  Did you got around to change the friendly name for the device id on the configurator app? Just wanted to test if that makes the difference.

 

Bluman2, I did test having the same friendly name  for the echo and harmony hub and it does work more consistently.  Now if I change the friendly name on the configurator app for the echo and make it different to the harmony hub friendly name it just stops working.  Off command always work.  So I can confirm that I have the exact same behavior you observed.

 

Thanks

Posted (edited)

yes, the reason the off always works is that there is only 1 off command for Harmony.  It never changes, so cannot go wrong.  I think Barry is working on an update.   There is also a new version of HA-Bridge software that combines Harmony and Hue Bridge into one .jar file.  Hold off on using that for now, though.  We need to confirm it all works with Barry's tool.  

Edited by blueman2
Posted (edited)

Barry has been working pretty much all day on updating his app!   Given that he does not even own a Harmony, the amount of effort he has put into making his app fully integrate with Harmony is just epic. He is a huge contributor to this community!  I did test a version for him and it appears to resolve all the issues.  I am guessing he will make it public tomorrow sometime.  

Edited by blueman2
Posted

Just wondering if anyone has guide to get this running on the pi.  I will just have my router give my pi a static.  But where does the jar file have to be placed? Anything else i need to worry about?

Thanks
Mike

Posted

thermiruts, 

 

Let me spend some time tonight documenting what I have set up so that others can follow it.  It is rather hard to read through 38 pages of posts to figure this stuff out!!!

Posted

I use a standard layout on the Pi.  I define a directory under /home/Pi named echobridge. ergo ther is a structure on my Pi that is /home/pi/echobridge.

I place all jar file (i run 4 emulators on one Pi since I have a lot of devices), but only one JAR file is needed. I keep prior versions in that directory also.  In the echobridge directory, I have two sub directory, one named logs, and one named data..  The logs directory will hold all the log files that the JAR produces, The data holds all of the data files.

 

In the directory /etc there is a file named rc.local. It is a bash script that is run at startup.  It is where the 4 instances of the emulator are started. I am pretty sure I documented the exact contents of that file as it stands on my system in an earlier post in this thread. Basically there are 4 lines each of which start an instance of the emulator with slightly different command line parameters.  The differences being the specific name of the log file to be used by a specific instance of the JAR and the specific name of the data.db file that that instance of the emulator is to read when it starts.  The 4 lines in my rc.local look like:

 

nohup java -jar -Dvera.address=192.168.1.229 -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-0.4.10.jar > /home/pi/echobridge/logs/log81.txt 2>&1 &
 
nohup java -jar -Dvera.address=192.168.1.229 -Dupnp.config.address=$_IP -Dserver.port=8082 -Dupnp.response.port=50002 -Dupnp.device.db=/home/pi/echobridge/data/device82.db /home/pi/echobridge/ha-bridge-0.4.10.jar > /home/pi/echobridge/logs/log82.txt 2>&1 &
 
nohup java -jar -Dvera.address=192.168.1.229 -Dupnp.config.address=$_IP -Dserver.port=8083 -Dupnp.response.port=50003 -Dupnp.device.db=/home/pi/echobridge/data/device83.db /home/pi/echobridge/ha-bridge-0.4.10.jar > /home/pi/echobridge/logs/log83.txt 2>&1 &
 
nohup java -jar -Dvera.address=192.168.1.229 -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG -Dupnp.config.address=$_IP -Dserver.port=8084 -Dupnp.response.port=50004 -Dupnp.device.db=/home/pi/echobridge/data/device84.db /home/pi/echobridge/ha-bridge-0.4.10.jar > /home/pi/echobridge/logs/log84.txt 2>&1 &
 
The last line is a little different as it has debugging turned on.  The IP address is stated as $_IP which is a variable that is set up earlier in the rc.local file by the following:
 
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi
 
Hope that helps.
 
I will post the next version of the configuration system either late tonight or early tomorrow.
 
There is a new JAR available from BWS Systems that integrates the restful harmony system directly into the HA Bridge. I need to check that one out for compatibility with the Configuration system, and then make any necessary revisions. 
Posted (edited)

None that I can see.

 

I don't see any reason why between 4.1 and 4.10 you would need to rebuild your devices but . . .   You can always save a copy of the Emulators data base and then restore it.  Just remember that you need to restart the emulator after restoring the changed data base as the emulator only reads it on startup.  I normally just reboot the Pi if I need to do that.

Edited by barrygordon
Posted (edited)

I just uploaded a new version of the AWS_ Configuration program. This version, 5.0.10 will work with the Harmony emulator (Restful Harmony) as a separate java program or integrated in the HA Bridge. For the Harmony capability to operate you must have the .ini file modified to include a Harmony Hub section with two entries as Follows:

 

[Harmony Hub]
Emulator             = 192.168.1.82:8081    ' if integrated into the bridge, make the same as the bridge
Antonyms           = Up/Down, Left/Right, On/Off, Forward/Backward, ToStart/ToEnd, BackToTick/ForwardToTick, FastForward/Rewind, Play/Pause, 16:9/4:3
 
Please read the word document that is included in the install. An Install is required as this version uses two icons (lock and unlock) to protect the Harmony URLs which generally should not be modified.
 
If there are any issues or bugs discovered please contact me at my email I am barry and own the-gordons.net so my email should be obvious. Include the log file (AWS_CONFIG.log) with the Debug parameter in the system section of the .ini file set to 'All' that is, "Debug=All" without the quotes. I generally resolve issues and respond the same day, providing you send me the log file.
 
Have fun!!
Edited by barrygordon
Posted (edited)

Hi, Barry

 

I installed the new combined Harmony and HA-Bridge ver 1.0.7 and your new configurator ver. 5.0.10 (although it still identifies as ver. 5.0.9). Everything insteon works 100% but the Harmony part just does not respond. Alexa always comes back with "Your device could not respond please .......".  It does not matter if my Friendly name is the same as the name for the activity or if their different it just does not work.  I tried diferent conbinations and nothing seems to work.  Are you using the id # now for the call to the harmony hub or still using the name?  I can see that now you have the harmony id # identified on the bottom of the app when a harmony activity is selected but I do not seem to be able to do anything with it. Also if I place the Unlocked status on the URL it still does not let me make any change.  You can type anything on the URL space when unlocked but it does not make anything permanent or have an effect on the outcome.

 

Any help I can provide you with to get this working, I am available.

 

Thanks for all your effort.

Edited by rdavidowski
Posted (edited)

I The latest version of the Configuration system with support for the Harmony hub is on my web site.   When you have an issue PLEASE follow the instructions on my web page.  It is important that you send me the log file after the running of the program. Without the Log File I can't do much.

Edited by barrygordon
Posted

rdavidowski,

 

 

Hi, Barry

 

I installed the new combined Harmony and HA-Bridge ver 1.0.7 and your new configurator ver. 5.0.10 (although it still identifies as ver. 5.0.9). Everything insteon works 100% but the Harmony part just does not respond. Alexa always comes back with "Your device could not respond please .......".  It does not matter if my Friendly name is the same as the name for the activity or if their different it just does not work.  I tried diferent conbinations and nothing seems to work.  Are you using the id # now for the call to the harmony hub or still using the name?  I can see that now you have the harmony id # identified on the bottom of the app when a harmony activity is selected but I do not seem to be able to do anything with it. Also if I place the Unlocked status on the URL it still does not let me make any change.  You can type anything on the URL space when unlocked but it does not make anything permanent or have an effect on the outcome.

 

Any help I can provide you with to get this working, I am available.

 

Thanks for all your effort.

 

 

The new version should help you as I solved some of your issues. After making a change to the URL's for the harmony you must do an update to have it take effect on the HA Bridge.  The Harmony ID is just shown for informational purposes.  It can not be changed as it is used by the HA Bridge when talking to the Harmony device. The friendly name is only used by Alexa when it tries to find the device in its content.

Posted (edited)

Hi Barry

 

Tested new configurator ver. 5.0.12. And still a no go with combined Ha-Bridge 1.0.7.  I set the harmony activity in the configurator to "Home Theater" and it does not do anything but complain. Neither On or Off work.

Edited by rdavidowski
Posted

Hello everyone,

 

Not so good news: "Home" cannot be used. A little more good news: most everything else passed. So, back to Izzy. We have sent them an email asking them whether or not Izzy works. Let's all pray!

 

Thanks so very much for your patience.

 

With kind regards,

Michel

Posted

Thanks for the update.  Fingers crossed!

 

-Xathros

Posted

Barry,

 

Just started playing around with this stuff, great little app.  I ran into a problem with getting devices to dim which I was able to work through.  It appears your program (I'm using 5.0.12) creates on URLs for devices with "${intensity%20byte}".  Looking at the emulator documentation (I'm using 1.0.7), it appears that it wants "${intensity.byte}" in the URL, note the period instead of %20.  I changed the %20s in the in the URL to dots and it's working great.  Thanks for the program!

Posted

apnar,  

 

I escaped the entry but it seems I do not need to. I will fix it in the next release.  This version, while working with the HA Bridge you are using (1.0.7) is having problems getting the Harmony stuff correct.  If you are not using the Harmony remote no issue.  I am working on getting the Harmony issues resolved today.

Posted

apnar,  

 

I escaped the entry but it seems I do not need to. I will fix it in the next release.  This version, while working with the HA Bridge you are using (1.0.7) is having problems getting the Harmony stuff correct.  If you are not using the Harmony remote no issue.  I am working on getting the Harmony issues resolved today.

Thanks Barry.  If I'm not mistaken the %20 is a space though, not a period.  I also meant to say the %20 in the device ID work just fine so you can leave those as is, just need to adjust the one in the intensity byte.

Posted

The entry was being escaped incorrectly.  It is fixed for the next release. The escape should only have been on the ISY address as the ISY wants to see the address that way. 

Posted

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....

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.


×
×
  • Create New...