-
Notifications
You must be signed in to change notification settings - Fork 782
Tradfri binding does not reestablish connection to gateway after connection loss #6065
Comments
Have you tried to set the Security Code only? |
No, because I never had an issue with the code. Maybe you setting the code again also only caused a reconnect. It is intended to not being set after the first connection. |
Do I read it correct: you go to Configuration > Things > Edit >TRÅDFRI Gateway and just change/change back the ip address. |
Yes.
No. It's empty after it has been processed. The real security credentials are shown when setting tools > show advanced settings (or something like this, it's in German for me). |
But let's stick to the connection issue here. If you have further questions, we can continue in the OH forums. |
The Bridge handler overwrites the "Security Code" with |
@cweitkamp This is by design as @roben referenced here already. Afair, the Tradfri developer docs stated that systems must not persist the security code, only the PSK. |
I got it. Did not read carefully enough. Nonetheless I did some more research. After restarting the bundle we ran into some timeout errors which seem to stop the handler from coming ONLINE again:
I changed the order of destroying the endpoint before shutting down the client in #6079. This maybe is a fix for our issue, but I am not sure. We need some more testing. |
Thanks! Can I use just the new binding jar with the current OH stable? Or is there even a way to tell OH to install the snapshot version of the binding? |
Both options are possible. Lets continue our discussion in the community forum. |
Sady it did not seem to help. I am running Even more it seems that OH is now taking much longer to detect the gateway being offline. It logged |
I'll leave it in this state for now and see if it just takes some time to come back online automatically. |
Oh and I tried to access the binding while it was already gone but still marked as online: |
15 Minutes later and still no luck. So it seems still broken to me, sorry. |
My I ask you to enable DEBUG or TRACE logging while testing? |
Of course. For which logging facility? Only org.eclipse.smarthome.binding.tradfri? |
Yes. |
Unplugged the gateway - no update. Switched lamp with unplugged gateway:
Two minutes later, gateway is marked offline in Habmin:
Plugged gateway back in, gateway is discovered but still marked offline:
Setting wrong IP:
Setting correct IP:
GW is back online. |
Just to add, I have the same issue. Gateway is set to a fixed ip via dhcp reservation. I use the DNS fqdn in the binding. If i change the fqdn to something else in the binding and revert back to the proper fqdn of the gateway it comes back online. |
I was also just rebooting the openhab server serveral times yesterday and had to set/reset the ip address of gateway in order to get connected. The gateway was not touched at all (power all time on). |
I think this needs to be reopened. I'm still having this issue. The address has been updated for the ip when I was using the fqdn which I assume is due to this commit, but its still loosing connection a staying lost until i manually change the address, save, edit the up back a save. Thanks. |
@chriscolden Are you sure that you have used the latest code that includes the fix? |
Thanks @kaikreuzer. Im on snapshot but one behind that. I'll updated an see how I get on. |
After the "next issue" above, I would prefer to have it tested some more. So wait a couple of days, what show up next? |
Did you use java 9 or newer? |
@boaks It was Java8. I will try it with your new californium snapshot. |
My Tradfri is connected via VPN and I run into the same issue. |
The good part of that is, I run it also mainly with that, so it should work quite well. The other part is, then I don't know, why
Thanks! |
The same as this github issue? Or with the fix and update into |
That fits to my analysis #6065 (comment) |
Yes, same as this issue. At least when the connection is down for a while, Tradfri will no go online again and I have to open and save the Thing config of the gateway (without altering anything) to get it back working. I will try to find time for testing the fix. Thanks! |
I retested to compile with openjdk-11 and execute with openjdk-8 and got the Now I'm not sure, did you build it it on your own? Or did you download it from the eclipse maven repo? |
@boaks Ah well you're right, I've built it myself with Java 11 and let it run on Java 8 on a different machine. |
Great! If no other issue is raised at this weekend, I start the "release process" on Monday. |
Californium released the 1.0.7 today including the fix for empty session ids mentioned above. |
Thank you @boaks |
Thanks! |
A PR for the new californium release has been created and merged in openhab/openhab-core#475. Currently we will skip ESH. @boaks Thank you very much for your work. |
@boaks, @hreichert, @cweitkamp Thanks a lot for caring :-) |
As discussed in eclipse-archived/smarthome#6065 the tradfri gateway does not support a session resumption after a gateway reboot or other communcation errors. Californium 1.0.7 is able to force a full handshake instead. This change calls "forceResumeSessionFor" after a communication error, so that a full handshake is done. Signed-off-by: Holger Reichert <[email protected]>
As discussed in eclipse-archived/smarthome#6065 the tradfri gateway does not support a session resumption after a gateway reboot or other communcation errors. Californium 1.0.7 is able to force a full handshake instead. This change calls "forceResumeSessionFor" after a communication error, so that a full handshake is done. Signed-off-by: Holger Reichert <[email protected]>
As discussed in eclipse-archived/smarthome#6065 the tradfri gateway does not support a session resumption after a gateway reboot or other communcation errors. Californium 1.0.7 is able to force a full handshake instead. This change calls "forceResumeSessionFor" after a communication error, so that a full handshake is done. Signed-off-by: Holger Reichert <[email protected]>
As discussed in eclipse-archived/smarthome#6065 the tradfri gateway does not support a session resumption after a gateway reboot or other communcation errors. Californium 1.0.7 is able to force a full handshake instead. This change calls "forceResumeSessionFor" after a communication error, so that a full handshake is done. Signed-off-by: Holger Reichert <[email protected]> Signed-off-by: Pshatsillo <[email protected]>
As discussed in eclipse-archived/smarthome#6065 the tradfri gateway does not support a session resumption after a gateway reboot or other communcation errors. Californium 1.0.7 is able to force a full handshake instead. This change calls "forceResumeSessionFor" after a communication error, so that a full handshake is done. Signed-off-by: Holger Reichert <[email protected]> Signed-off-by: Maximilian Hess <[email protected]>
This did not improve the decribed issue. Is there any recommendation? |
@Tobster77, seeing as this repo is dead (see #6883) and development has moved to openHAB, it would be best to create a new issue for the Tradfri binding. Of course, that is assuming you are using OH! |
This and many other issues around tradfri and californium seems to be a mix of several different things. And the fix in californium only addresses to reconnect without restart. If you create a new issue in openHab, maybe you can add the issue number here as well. Then a can follow up your issue. In the meantime openHab uses Californium 2.0 and at least I got some info, that this improved the stability. |
Meanwhile this is discussed also here:https://community.openhab.org/t/tradfri-binding-loses-connection-after-power-failure-gateway-reboot/47833Am 12.03.2020 14:06 schrieb Achim Kraus <[email protected]>:
@Tobster77
This and many other issues around tradfri and californium seems to be a mix of several different things. And the fix in californium only addresses to reconnect without restart.
If you create a new issue in openHab, maybe you can add the issue number here as well. Then a can follow up your issue.
In the meantime openHab uses Californium 2.0 and at least I got some info, that this improved the stability.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Short version:
If the gateway gets physically dis- and reconnected the binding does not automatically reconnect to it. To reestablish the connection manually, the IP can be changed to something else and back to the correct value again.
Long version with screenshots and logs:
https://community.openhab.org/t/tradfri-binding-loses-connection-after-power-failure-gateway-reboot/47833
The text was updated successfully, but these errors were encountered: