-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[harmonyhub] "Failed communicating with Harmony Hub" with firmware 4.15.206 #4411
Comments
Logitech responded to the ongoing discussion and released a beta firmware which reenables the XMPP API. They plan to release a normal firmware update for all users in january. Disclaimer: I haven't tested the beta firmware as I already downgraded my hub. |
Very good! I've updated my first comment so it summarizes all the latest information. |
So what do we think? Do we want to stay with XMPP or switch to using a lighter weight websocket impl? I have something working (its crude , so don't judge :-) which would not be tough to swap out at this point. I only worry they shut down using websockets and we are back to XMPP. |
Many thanks for working on this @digitaldan! With the total U-turn Logitech made my mind says XMPP (support, already working well, no additional time to invest) whereas my heart says Websockets (maintainability, readability). I'll have a look at your code anyhow. Do you think ultimately the Websockets would allow for the same features as the XMPP API? It would be nice if Logitech retires the XMPP API within a few years (with heads up notice) and from then on only supports the Websockets API. AFAIK they currently use the Websockets with the iPhone App. |
The code looks good! Some other advantages of the Websocket approach are:
|
Thanks @wborn , its still a bit rough, but all the pieces are there. My use of Futures is a bit off, i need to clean that up and the error handling is not very robust, but over all its not in bad shape.
Right, GSON and Jetty are the only two dependencies , so it's really light when used in openhab .
This is maybe the most compelling part, the smack library is extremely complex and when something breaks, it's down somewhere deep in a complex web of code and threads that I honestly have a hard time understanding, much less debugging. Using a single websocket with jetty and GSON is very straight forward. |
@wborn I could not leave it alone :-) I have our binding working against the new websocket library, changes were fairly limited, The new websocket library needs some minor cleanup, logging and use of futures mostly, but is in good shape. I ported over the shell classes from the original library if people want to try out the command line version (see readme) https://github.com/digitaldan/harmony-client/ I have a 2.5 snapshot jar I can post on my clone if anyone is interested |
Thanks @digitaldan ! Looks like it now supports all features while the bundle got reduced from 2 MB to just 92 kB. 👍 After testing it a bit I found the following minor issues compared to the existing implementation:
Other than that, it already seems to be a nice drop in replacement. 🙂 |
Fixed.
Yep, I was sending press twice instead of sending press then release, fixed. |
Can you post the .jar, so that we can try it out? Thanks. |
Thanks for fixing the issues @digitaldan! I've been using the websocket changes for several days without any other issues with the 4.15.206 FW. Here's a org.openhab.binding.harmonyhub-2.5.0-SNAPSHOT.jar I just compiled with the latest bugfixes @NickWaterton . |
I just tried the 2.5 snapshot version but it's not working for me. the binding detects the hub and can add is a thing in paperUI, but the status is always offline - communication error the openHAB log is getting spammed with this:
|
here is my latest jar
Can you turn on debug logging for the harmony jar, like Also can you try using the test command line client: and run it like But of course with the IP of your HUB. |
Also I will also look at increasing the buffer size if this is indeed the actual issue. @NicoVermeir does your Hub have a lot of devices? I'm wondering if the config coming back is really really big, or if its something else. |
@digitaldan my hub has 6 devices tried both from an rpi and a Windows 10 pc |
sorry, the command should be I had a extra "target" in there can you try https://github.com/digitaldan/openhab2-addons/releases/download/harmony-websocket-1.0/org.openhab.binding.harmonyhub-2.5.0-SNAPSHOT.jar? I just uploaded a new version which sets the buffer size to 1mb. Please download again if you had downloaded it earlier. |
I had posted the wrong link above originally, it should be |
removed the previous 2.5 snapshot jar, downloaded the new one, restarted openhab2, getting the same message. |
@digitaldan |
Thanks for the jar. I tried the last jar you linked and get:
Is there any way to configure the message size maximum? |
I just tried it also, and got the same message (but with a value of 103724, not 79924). |
Just wondering if there were any updates on this? Would be nice to get a harmony websockets binding working. |
Thanks, @digitaldan - the binding works for me! |
@NickWaterton , @NicoVermeir , i have just compiled digitaldan's code with the fixes provided by wborn. The add-on binding jar file is in this zip. It works for me, maybe it also works for you. org.openhab.binding.harmonyhub-2.5.0-SNAPSHOT.zip |
I have to ask a stupid question: Where to put the *.jar, or will there be some official update some time? |
It is always advisable to read docs or search before asking questions: |
@vbier @NickWaterton @NicoVermeir |
I can confirm that the 2.5.0 version is working as well |
Hi all, sorry i was on other things, but i'm back. @wborn I just merged you settings into my branch. I have been running this over the xmpp version without issues. I think we should go ahead and pursue this as a replacement. I will get it fired up today and start preparing it for a PR . @wborn is there anything missing that you can see from it? |
Thanks for merging my PR. The code is feature complete and works very well @digitaldan. 👍 |
I'm not able to connect to my hub using the new binding. When trying the command line test client, it seems like it's being disconnected with HTTP error 417
|
@mattstocum Logitech also change the signature of the websocket instance with the new firmware released in the last 48 hours :-( Fortunately I have a fix waiting for review https://github.com/openhab/openhab2-addons/pull/4938 |
I seem to have gotten the firmware update, too. The binding can no longer connect and does now make openHAB unresponsive after some time. The number of HTTPClient threads increases every minute until the process is blocked. After a while I have more than a thousand threads like these:
Uninstalling the binding stops the thread count from increasing, so it seems to be caused by the binding. @digitaldan, is this something you know or can fix? Or is this fixed in the new version? Or shall I open a new issue? |
@vbier did this get resolved for you with the new version? |
Snapshot after #4938 fixed the issue I was seeing. Hub was discovered immediately and worked with zero config on my part, beyond installing the snapshot binding. |
The thing is not if the next version connects to the hub (as it already has been reported to be working), but what happens if the next version can no longer connect to the hub because of new firmware or other reasons. Does it then still hang the complete application? The hanging openHAB completely blocked my eBUS, resulting in my heating unit warming up my house to 27 degrees celsius over night. There most likely are even more serious problems that could arise from the hanging application. @digitaldan, it would be nice if you could fake connection problems and see if you can reproduce and fix the problem. |
@Viber my latest open pr does address this issues |
That's great. I will update in the coming days. Thanks for your work on this. |
👍 |
As part of a "security related fix" Logitech has closed access to the undocumented XMPP API on port 5222 of their Hub with firmware 4.15.206:
As a result the binding is no longer able to communicate with Hubs running the 4.15.206 firmware.
For example the following exception is logged due to this issue:
These are the known workarounds for keeping the XMPP API enabled:
To remain on the 4.15.193, 4.15.201 versions internet access (or specific servers) has to be blocked to those Hubs). As a result some functionality of the Phone Apps will no longer work.
As a workaround we might be able to use another undocumented Websocket API.
See also:
(includes "developer" 4.15.210 firmware instructions)
The text was updated successfully, but these errors were encountered: