Author Topic: Websocket version of plugin for Hub version 206 and up.  (Read 1656 times)

Offline Chelseagroup

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +2/-0
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #15 on: December 22, 2018, 10:08:37 pm »
How to upload the file?
The one on my vera is: L_Harmony.lua.lzo
not L_Harmony.lua

Offline Wally

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #16 on: December 22, 2018, 10:12:41 pm »
I have 2 harmony hubs. One was no longer taking external commands. I assume it got update to the 206 firmware. Downloaded the patch from here,  Went to apps --> Develop--> and uploaded to vera. it uploaded as L_Harmony.lua ( .lzo is a compressed archive). Restarted Vera and it worked like a charm.
Well done Rene !
« Last Edit: December 22, 2018, 10:16:39 pm by Wally »

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1700
  • Karma: +94/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #17 on: December 22, 2018, 11:29:04 pm »
Just got home and upgraded my three harmony hubs to the 210 version (dev version) which gets XMPP back. Is there any advantage to moving to web socket?
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline vannpaul

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #18 on: December 23, 2018, 08:47:38 am »
new lua worked fine. thx heaps

Offline reneboer

  • Moderator
  • Hero Member
  • *****
  • Posts: 1549
  • Karma: +109/-31
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #19 on: December 23, 2018, 02:28:32 pm »
As a user it does not matter what interface. The websocket one has a tiny bit less overhead and for me as a coder is simpler to use.

I have updated the plugin to the websocket one now so you do not need to do any workaround. At the same time it seems that Logitech has stated that the XMPP version will become the local one to use for third party integration. I'll believe that when they make the API details public. Maybe then it is time to switch back.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline Supermilk

  • Sr. Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #20 on: December 23, 2018, 03:24:45 pm »
Thank you a lot for the quick fix.  :)

Offline Cor

  • Hero Member
  • *****
  • Posts: 1235
  • Karma: +8/-4
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #21 on: December 24, 2018, 01:25:44 am »
Thank you very much for your fast work Rene!

Cor

Offline millamation

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #22 on: December 26, 2018, 08:18:07 pm »
I have two harmony hubs and after updating the L_Harmony file only one at a time seems to work.  Any issues with having multiple harmony hub plugins activated at once?  I get the hub connection set-up failed error on one of them.  I have checked my ip address, username and password multiple times.  If I disable one of the plugins, the other one will work but I can't get both towork at once. 

Offline reneboer

  • Moderator
  • Hero Member
  • *****
  • Posts: 1549
  • Karma: +109/-31
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #23 on: December 27, 2018, 05:36:03 am »
I have two harmony hubs and after updating the L_Harmony file only one at a time seems to work.  Any issues with having multiple harmony hub plugins activated at once?  I get the hub connection set-up failed error on one of them.  I have checked my ip address, username and password multiple times.  If I disable one of the plugins, the other one will work but I can't get both towork at once.
Hi,

I can have multiple instances to a single hub (as I only have one). There is a small bug in 2.28 when you add a new Hub to your setup. You have to then go into the plugin variables, change the UIVersion value, for example to 1 and then reload luup and refresh your browser.

Let me know if this does not help. If not please set logging to debug and share some of the log file.

Cheers Rene
« Last Edit: December 27, 2018, 06:39:49 am by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline millamation

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #24 on: December 27, 2018, 11:15:45 am »
Thank you Rene!  That worked perfectly, I changed the UI version number in the advanced field of the plugin for the second plugin and now bother instances are working great.

Thanks again for your hard and fast work to get this plugin working after Logitech made the change.

-Matt

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1700
  • Karma: +94/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #25 on: December 27, 2018, 01:04:27 pm »
Hi Reneboer,

I just saw your version log. Can you elaborate on what improved for 2.29 regarding the websocket connection vs 2.28?

Edit: I just looked up on Github. Seems like some refactoring. I am still getting a new device when I upgrade though.

Edit2: Looks like you forgot to update the version number in the HData, It is still at 2.28. FYI.
« Last Edit: December 27, 2018, 01:36:57 pm by rafale77 »
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline reneboer

  • Moderator
  • Hero Member
  • *****
  • Posts: 1549
  • Karma: +109/-31
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #26 on: December 28, 2018, 05:23:55 am »
Hi Reneboer,

I just saw your version log. Can you elaborate on what improved for 2.29 regarding the websocket connection vs 2.28?

Edit: I just looked up on Github. Seems like some refactoring. I am still getting a new device when I upgrade though.
When opening a web socket connection there is a key exchange for security. That is what I added as I initially couldn't get that to work on Vera due to lack of some bit operations.
The new device is an openLuup thing. Due to the nature of the plugin some new device files get created for the specific configuration. On openLuup this is not detected as on a Vera and a new instance gets created on an update as it is a new install. The Multiswitch plugin has the same problem and it would require some openLuup changes to correct this. Or more complex logic in my plugin. I can add it to the to-do list, but I have higher priority items to do first. I will also contact akbooer on this.
Edit2: Looks like you forgot to update the version number in the HData, It is still at 2.28. FYI.
I indeed missed that one. I'll fix that.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #27 on: December 28, 2018, 10:35:57 am »
Rene, you're the BEST!!!

Uploaded your file as suggested, both harmony plugins (Living & Bath) are now working like a champ. You make it so very simple for us all. These Harmony hubs are a vital part of AV integration. Without your help, so many of us would be up the creek and using our expensive harmony remotes as paddles  :P

A sincere THANK YOU for all your efforts in the past and for sticking with the community to address these issues as they arise!!

Please be sure to give Rene a nice Karma bump folks. He absolutely deserves our support.

Offline jadragescu

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #28 on: December 28, 2018, 03:53:37 pm »
Rene,

Thank you for so quickly patching Logitech's "lovely" decision regarding "security"  I believe this whole community is grateful for your all your support!!!

I ran into an issue as I have 4 instances of the plugin (4 different remotes).

I get the following in the blue banner: "Harmony Control: Hub connection set-up failed.  Check IP Address, email and password"

I verified that the IP address, email and password are correct on all 4 remotes...

Typically a Luup Reload fixes this, but also another random Luup Restart also occasionally brings up this blue banner option, and not communication to Vera.  Any ideas of fixing this?  Is the fix as you mentioned with UIVersion in previous post?  Perhaps a timing setting needs to be changed???

Thanks again!!!

Offline reneboer

  • Moderator
  • Hero Member
  • *****
  • Posts: 1549
  • Karma: +109/-31
Re: Websocket version of plugin for Hub version 206 and up.
« Reply #29 on: December 29, 2018, 05:52:36 am »
Rene,

Thank you for so quickly patching Logitech's "lovely" decision regarding "security"  I believe this whole community is grateful for your all your support!!!

I ran into an issue as I have 4 instances of the plugin (4 different remotes).

I get the following in the blue banner: "Harmony Control: Hub connection set-up failed.  Check IP Address, email and password"

I verified that the IP address, email and password are correct on all 4 remotes...

Typically a Luup Reload fixes this, but also another random Luup Restart also occasionally brings up this blue banner option, and not communication to Vera.  Any ideas of fixing this?  Is the fix as you mentioned with UIVersion in previous post?  Perhaps a timing setting needs to be changed???

Thanks again!!!
Hi,

Yes, for version 2.28 you have to tinker with the UIVersion variable, or you get the 2.29 version that corrects this. See the Veriosn thread for details.

And, creating this plugin was the best way to learn Vera programming. I'm a big user my self (of course) and just happy many others enjoy it as well. Who knows what Vera will do with Harmony in 2019, but until that happens and is better than this (and runs on openLuup) I keep this one active.

Cheers for a wonderful 2019.

Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.