-
-
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
[upnpcontrol] Device goes offline with device not registered error #16638
Comments
From my review of the code, we see a new device arrive via the output from UpnpControlDiscoveryParticipant.java and then a communication lost output from UpnpHandler.java at line 414. I am not a Java developer, so that's my best understanding of what is happening. Is it possible that the binding is trying to add a new thing when the thing already exists and that is what is causing the error? |
Here is the output after disabling and enabling the thing. If I restart openhab the device will come back online for awhile before seeing the error above.
==> /var/log/openhab/events.log <==
|
Same problem here with my arylic devices. ( don't have any other so I don't know if its specific to arylic. ). I've noticed openhab/jupnp responding with a http 501 on the call back urls:
|
Digging a bit further the registration times out.
https://www.jupnp.org/docs/advanced#maximum-age-of-remote-devices seems relevant. Looking at https://github.com/jupnp/jupnp/blob/a623216048d60e02d0b9f8d3e68f47c7c69a8432/bundles/org.jupnp/src/main/java/org/jupnp/OSGiUpnpServiceConfiguration.java#L322C20-L322C48 this method returns null which means to trust the device's timeout. However I don't see the arylic device sending any alive messages. |
Interesting observations. Certainly fits with what I am seeing. When I restart this bundle openHAB Core :: Bundles :: Configuration jUPnP from the console, the devices come back on line. |
Yes, as a workaround i have now a curl script in a cronjob that triggers a scan every 15 minutes.
Potentionally this could also be the fix, to issue a search request from the binding. |
Not that familiar with the upnp protocol. But this sounds like a specific issue with theses devices. Do you consider this a bug in the binding or in the device's handling? Also don;t understand why the device goes offline as the active and the newly discovered device are the same device with the same UDN. The representation proeprty is properly set, so for openHAB concerns they are the same device. |
I just picked up a few WiiM streamers, which are manufactured directly by LinkPlay. They OEMs their hardware / software to other companies, including Arylic, the device @mjcumming is having issues with ( i think) . I am also facing the same issue, so its likely related to this vendor. i'll look into a fix for this. |
So also something interesting, i'm seeing
|
I think i have a fix built against 4.3.1 if people want to try it out, my device has been online for about an hour so far. https://github.com/digitaldan/openhab-addons/releases/tag/upnp-keep-alive See: |
I'm testing it |
Mine stayed online over night 👍 |
@digitaldan Great you have been able to solve this. I assume you will create a PR. |
I will, was just waiting to confirm it works. |
Here it went down unfortunately. Also no route to host. Will try to debug it after Christmas. Happy holidays nonetheless :) |
So i only saw that the one time, not sure if its relevant or not. The good news is my device has not gone offline once yet, so definite improvement. |
Since the initial failure it has been up as well. So definitely an improvement. |
I am openHAB 4.2.0-SNAPSHOT - Build #4031
When starting OpenHAB, the UPNP service connects to my UPNP player and works fine. After 20-30 minutes, the binding loses connection with the device with a "Device Not Registered" error. Trace level output is below. Output is from startup to connection lost. It looks like to me the discovery service (very.UpnpControlDiscoveryParticipant) is finding the device a second time which then cause the device to go offline with a device not registered error.
The text was updated successfully, but these errors were encountered: