[Release] Logitech Harmony Hub Driver v0.1.20230311

When I look through the driver code, clicking SAVE simply calls the “updated()” routine. The only thing of interest in that routine is that it calls the “initialize()” routine, which connects to the Harmony hub.

If the hub detects that the webSocket connection to the Logitech hub is lost, their is code which attempts to reconnect automatically. This code also calls the “initialize()” routine.

Thus, I really have no idea why clicking SAVE on the Parent device would do anything differently from allowing the automatic reconnect logic to run. :thinking:

Not yet. I'm waiting for it to fail again.

1 Like

I’m trying to track down a bug that causes the symptoms you’re describing. Logs would help to determine if it’s the same problem.

As mentioned above, I did try using webCoRE to run the initialize command when the hub showed that it was no longer present. That didn't seem to help. But if I opened the app after the hub showed that it was not present the home control buttons would immediately go back to working.

As soon as it fails again I'll post the logs.

Also curious, do you use a mesh wifi?

Yeah, I have two Linksys AX1500 routers connected over Ethernet backhaul. I have two hubs set up to work with the home control buttons and both are connected to the same node. One has worked flawlessly for months and this one fails literally every 3-4 days. Both have static IPs.

Very similar setup to me! I have two Harmony hubs, one work great, one disconnects a lot. I also have a mesh wifi, thought a different system (3 Unifi APs). When I notice is the Harmony disconnects from the network in some kind of weird way where I can still interact with it from the Harmony App, but the Hubitat logs say no route to host. Lots of posts online about how Harmony doesn't like mesh networks unfortunately :frowning:

Okay, here's the info from the log when it is NOT working:

dev:16802021-11-07 10:44:13.944 am infoUnhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:13.941 am debug[type:control.button?pressType, data:[type:short]]
dev:16802021-11-07 10:44:13.938 am debugparsed: {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:13.047 am infoUnhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:13.044 am debug[type:control.button?pressType, data:[type:short]]
dev:16802021-11-07 10:44:13.041 am debugparsed: {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:11.347 am infoUnhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:11.344 am debug[type:control.button?pressType, data:[type:short]]
dev:16802021-11-07 10:44:11.341 am debugparsed: {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:10.116 am infoUnhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:10.113 am debug[type:control.button?pressType, data:[type:short]]
dev:16802021-11-07 10:44:10.110 am debugparsed: {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:09.093 am infoUnhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:09.091 am debug[type:control.button?pressType, data:[type:short]]
dev:16802021-11-07 10:44:09.088 am debugparsed: {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:06.646 am infoUnhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:06.643 am debug[type:control.button?pressType, data:[type:short]]
dev:16802021-11-07 10:44:06.638 am debugparsed: {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:00.060 am infoUnhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}
dev:16802021-11-07 10:44:00.054 am debug[type:control.button?pressType, data:[type:short]]
dev:16802021-11-07 10:44:00.051 am debugparsed: {"type":"control.button?pressType","data":{"type":"short"}}

And this time clicking "save preferences" didn't work. I had to open the Harmony app before the home control buttons would work. Here are the logs with the buttons working:

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:33.309 am [debug](http://192.168.50.247/device/edit/1680)Socket Button 2 was 'pushed'

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:33.306 am [debug](http://192.168.50.247/device/edit/1680)Socket 2 Changed to 100

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:33.303 am [debug](http://192.168.50.247/device/edit/1680)[type:automation.state?notify, data:[a848d104-7dc7-48ce-b6ec-38dd6c061b1e:[status:1, brightness:254, on:true]]]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:33.300 am [debug](http://192.168.50.247/device/edit/1680)parsed: {"type":"automation.state?notify","data":{"a848d104-7dc7-48ce-b6ec-38dd6c061b1e":{"status":1,"brightness":254,"on":true}}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:32.696 am [info](http://192.168.50.247/device/edit/1680)Unhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:32.693 am [debug](http://192.168.50.247/device/edit/1680)[type:control.button?pressType, data:[type:short]]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:32.690 am [debug](http://192.168.50.247/device/edit/1680)parsed: {"type":"control.button?pressType","data":{"type":"short"}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:31.410 am [debug](http://192.168.50.247/device/edit/1680)Socket Button 1 was 'pushed'

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:31.408 am [debug](http://192.168.50.247/device/edit/1680)Socket 1 Changed to 90

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:31.405 am [debug](http://192.168.50.247/device/edit/1680)[type:automation.state?notify, data:[783ed1c5-49e7-4c46-aca2-b01230f0dce6:[status:1, brightness:228.34343434343, on:true]]]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:31.402 am [debug](http://192.168.50.247/device/edit/1680)parsed: {"type":"automation.state?notify","data":{"783ed1c5-49e7-4c46-aca2-b01230f0dce6":{"status":1,"brightness":228.34343434343,"on":true}}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:30.705 am [info](http://192.168.50.247/device/edit/1680)Unhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:30.702 am [debug](http://192.168.50.247/device/edit/1680)[type:control.button?pressType, data:[type:short]]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:30.699 am [debug](http://192.168.50.247/device/edit/1680)parsed: {"type":"control.button?pressType","data":{"type":"short"}}

[dev:1198](http://192.168.50.247/logs#dev1198)2021-11-07 10:47:30.667 am [info](http://192.168.50.247/device/edit/1198)Bedroom Ceiling Fan was set to low [digital]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:30.056 am [debug](http://192.168.50.247/device/edit/1680)Bulb Button 2 was 'pushed'

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:30.053 am [debug](http://192.168.50.247/device/edit/1680)Bulb 2 Changed to 90

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:30.050 am [debug](http://192.168.50.247/device/edit/1680)[type:automation.state?notify, data:[ddfcea83-78a7-4fc1-a1e3-bcc19e226806:[status:1, brightness:228.34343434343, on:true]]]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:30.047 am [debug](http://192.168.50.247/device/edit/1680)parsed: {"type":"automation.state?notify","data":{"ddfcea83-78a7-4fc1-a1e3-bcc19e226806":{"status":1,"brightness":228.34343434343,"on":true}}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:29.451 am [info](http://192.168.50.247/device/edit/1680)Unhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:29.448 am [debug](http://192.168.50.247/device/edit/1680)[type:control.button?pressType, data:[type:short]]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:29.445 am [debug](http://192.168.50.247/device/edit/1680)parsed: {"type":"control.button?pressType","data":{"type":"short"}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:28.013 am [debug](http://192.168.50.247/device/edit/1680)Bulb Button 1 was 'pushed'

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:28.011 am [debug](http://192.168.50.247/device/edit/1680)Bulb 1 Changed to 80

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:28.008 am [debug](http://192.168.50.247/device/edit/1680)[type:automation.state?notify, data:[8195a2b9-77fd-46ea-9938-1f3b90021493:[status:1, brightness:205.25252525253, on:true]]]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:28.005 am [debug](http://192.168.50.247/device/edit/1680)parsed: {"type":"automation.state?notify","data":{"8195a2b9-77fd-46ea-9938-1f3b90021493":{"status":1,"brightness":205.25252525253,"on":true}}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:27.363 am [info](http://192.168.50.247/device/edit/1680)Unhandled data from Harmony Hub. json = {"type":"control.button?pressType","data":{"type":"short"}}

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:27.360 am [debug](http://192.168.50.247/device/edit/1680)[type:control.button?pressType, data:[type:short]]

[dev:1680](http://192.168.50.247/logs#dev1680)2021-11-07 10:47:27.357 am [debug](http://192.168.50.247/device/edit/1680)parsed: {"type":"control.button?pressType","data":{"type":"short"}}

So, when it is Not Working, it appears the Harmony Hub is not sending the required data for the Hubitat Hub to parse into the Button Pushed/Held events. Thus, that sounds 100% like a Harmony hub issue, not a Hubitat hub driver issue. The Harmony Hub receives its "Button" configuration data from its own integrations with SmartThings, Lutron Caseta, or Philips Hue. The Hubitat hub simply eavesdrops on the data the Harmony hub sends out on its webSocket. If the Harmony Hub doesn't send that data, there is nothing my integration can do about it.

1 Like

I guess my next question is what is it that opening the app does to cause it to start working and is there anything that can be done in the driver to simulate that action?

I really do not know. My guess is that doing so causes the Harmony Hub to re-synch its configuration from the Logitech Cloud or App on your phone.

Not that I know of. Without an official integration with Logitech (which will never happen now that the product is officially dead), there is no way that I have found to configure 3rd party smart home devices to those buttons on the remote.

Oh well. Maybe I'll just use Tasker on my phone to open / close the app when Hubitat says the hub is not present. Or maybe I'll retrain my brain to use the Google Assistant button on the other remote and just ask Google to turn things on and off like "normal" people do. I'm not sure why I'd rather push a button but whatever... I guess that's the old in me.

Anyway, thanks for the integration and for taking the time to help troubleshoot.

1 Like

I have the same issue. Wonder if it has to do with Unifi. Have you figured out any settings to change in Unifi that helped?

I setup an AP group that only includes the nearest AP then setup a 2.4Ghz SSID for that one AP. It’s been working much better.

2 Likes

Another option with the new Unifi interface is to go to the Harmony Hub and turn on "Lock to Access Point" under settings.
Thanks for getting me to this point @jasonp9 and @dman2306

1 Like

Yup. They added this feature recently. I noticed when my hubs dropped they were jumping to other AP's. The hub is sitting right next to an AP but jumping to an AP on the other side of the house. Locking it to an AP has stopped the disconnections from happening. Not sure why this started happening recently though.

1 Like

Doing this didn't work from me. As I understand it, all this AP lock feature does is, when the device says "let me disconnect from AP A and try to connect to AP B", AP B refuses the connection. So the disconnect from AP A still happens, it will just then, more quickly, reconnect to AP A rather than ever getting on AP B. That's why I setup an extra SSID.

Hi, I just got Govee strip light for the tv. They have already been integrated into my HE and also the Harmony driver is set up. (I have a harmony elite remote).
How can I make the lights go on/off when I switch the tv on/off?

Has adding the SmartThings integration gone the way of the dinosaurs w/Logitech's abandonment of Harmony remotes? Can SmartThings still be integrated?

I can get to my SmartThings devices in Harmony, select the four virtual dimmers I created (and that's all that's selected) select Authorize, return to the Harmony app, but get stuck on this screen.

When I click on "Click here..." at the bottom of the screen after waiting 15-20s, I get a failure message and the SmartThings devices don't show up on my Devices page in the Harmony app. Clicking Try Again button on the screen below takes me through the same flow/failure. What am I missing/doing wrong?

image