-
Notifications
You must be signed in to change notification settings - Fork 779
[Tradfri] Connection gets lost on reboot of OpenHAB server #6748
Comments
I am experiencing the same trouble for many months. |
Thanks for reporting this issue. It is already known. Duplicate of #6065. |
Is it an exact duplicate? |
@cweitkamp: Thanks; indeed the issue is discussed here and in the community forums at several points and several times it was assumed the issue is resolved (e.g. #6193) . My last understanding was that an update of ESH to version 0.11 should solve the issue, but I tested this version as part of OH 2.4 final release without success. Thus, I opened this topic. In case you can open #6193 again, I can close here. What is the relation between #6193 and However, if there is something I can do or test, please let me know. |
@olemr Yes, I am pretty sure that both issues have the same cause. @Tobster77 #6193 was a pull request. It cannot be reopened. Unfortunately nobody has a clue what causes this problem. Currently it is still present. I observe it in my environment too. Every time - no, not every time, but most of the times - I am rebooting my system. I such case I have to reboot the TRADFRI gateway afterwards. |
@cweitkamp What I usually do after an openHAB reboot is to go into karaf console and restart the tradfri binding, which fixes the problem (actually, sometimes up to 3 restarts of the binding are necessary). So it is possible to do it without the tradfri hub restart. Maybe the tradfri binding can be changed to do multiple connection attempts? |
Here #6065 (comment) a fix ist proposed and the author asks for testing. As I am unexperienced in conpliling ESH: Maybe an advanced user can do a test and confirm, so the new code can be merged? Thanks :-) |
IMHO #6065 is a different case (gateway reboot, bridge and things go offline and never come back) than this issue (server reboot, bridge sometimes never comes online) |
The term "reboot of OpenHAB server" could be explained more specific. "Cold reboot", really reboots the complete software stack (maybe even the hardware)? For the "cold reboot", scandiums connection store will be empty and so the full dtls handshake should be executed, as expected. That issue is not related to the fix in #6065 (comment) . For the "warm reboot", scandium depends on the specific functions called to do that. If that's your issue, maybe you can describe, which functions in scandium are called to do such a "warm reboot". |
@boaks, @hreichert: Not sure if we have a clear status of the issue: Recently, both of you contributed to issue #6065 - I can not make an estimate if this would help here as well: Indeed, in the issue reported here, the server reboot, or OH service restart causes problems: Both might lead to the situation of the gateway not coming online, and only a server reboot resolves the situation. So if the Scandium/Californium and binding updates from #6065 are done, I propose to check if this also resolves the issue here. As @kaikreuzer asked for a PR for the binding modifications:
@hreichert, maybe you can reference to both #6065 and this one, #6748? |
@Tobster77 I can observe that sometimes after a server reboot ("cold reboot") or a OH service restart (technically also "cold reboot") no connection is established. @boaks
|
Hm, that smells for "race-conditions" during the start-up ... Any logs? |
From the last comment in the OpenHAB discussion:
And
Without a destination-address californium/scandium will not be able to connect to the gateway. My feeling is, this is outside of californium/scandium. |
Dear all, I must admit I lost the overview in the last week. I am on OH 2.5 M1, and the issue still remains. Do you see any chance to continue the debugging of the the binding? Or are we lost? |
I never experienced this issue. Has #6748 (comment) been tried? |
Basically, I reboot the OH server a couple of times which is equivalent and usually fixes the issue for a couple of days. But this is not really a solution. I am not programmer - but wouldn't frequent checks of the Tradfri gateway and automatic binding restarts be a workaround? |
The issue is remaining. Can I do something? |
The issue described here #6193 was discussed and a solution proposed. Still, it does not work reliably.
There is a discussion in the OpenHAB forums here:
https://community.openhab.org/t/tradfri-binding-loses-connection-after-power-failure-gateway-reboot/47833/61
Expected Behavior
When the OpenHAB server boots, it should establish a contact to the Tradfri gateway. This connection should be stable.
Current Behavior
The connection is not reliably established after boot. One has to re-enter the credentials to get the binding online again.
Possible Solution
Try to re-establish the connection if it gets lost (and keep the credentials)
Steps to Reproduce (for bugs)
Context
I run a Tradfri gateway to switch some bulbs.
Your Environment
The text was updated successfully, but these errors were encountered: