OH3 Homematic Bridge stays offline after disconnect

Hi,

i discovered a couple of times now that the Homematic Bridge stays offline after a disconnect caused by Homematic CCU2. This happened twice now with an update/restart of the FritzBox where the CCU2 is connected to and once with a power outage of the CCU2. This can be only fixed with a re-start of openHab. Stop-restart the binding in the UI is not working.

I am on one of the latest 3.1.0 SNAPSHOTS, but i believe this happened with 3.0 identically. I am happy to guinea pig here if needed for further information.

Hi Jan,

you can test whether it works better with the test version of the binding, I have posted here: GitHub - MHerbst/openhab-addons-test

There some problems with reconnecting have been fixed and I already got some positive feedback. It may take about 2 min. until the binding detects that the CCU is online again.

Hi Martin,

thanks for the fix, i can confirm this works well. CCU2 bridge reconnects after a minute or so. Great. Checked !

I like to hear that :-). Can you mark this thread as solved?

Hi Martin,

i noticed today that the re-connect did not work after a re-boot of the Fritzbox. The bridge stayed offline. I will continue to monitor this and report. I may force another disconnect and send the log if it makes sense.

Jan

Hi Jan,
a log could help, but I would probably need it with TRACE mode activated. Please also check the logs on the CCU. Maybe there are additional info.

How did you configure the IP addresses of computer running openHAB and the CCU? Did you configure fixed IP addresses for the respective interfaces or are you using the DHCP server on the FritzBox to configure the IP addresses?

Does it make a difference if you restart the CCU or the FritzBox? Would be interesting to see whether the connection can be automatically restored if the connection was lost because of a CCU restart.

The IP´s are from DHCP for both CCU2 and Synology NAS, both tagged in the Fritzbox with “Diesem Netzwerkgerät immer die gleiche IPv4-Adresse zuweisen.” Running in Docker in host mode for Network

I just re-started the CCU2, bridge never shows offline. only the HMIP things go to error communication and i need to manually disable and enable them to go online again.

image

2021-02-15 14:15:21.686 [WARN ] [ommunicator.AbstractHomematicGateway] - Connection lost on gateway 'NEQ1691xxx', cause: "IOException java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused"
2021-02-15 14:15:56.383 [INFO ] [ommunicator.AbstractHomematicGateway] - Connection resumed on gateway 'NEQ1691xxx'
>     > 2021-02-15 14:15:56.419 [WARN ] [ternal.handler.HomematicThingHandler] - java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
>     > 2021-02-15 14:15:56.717 [WARN ] [ternal.handler.HomematicThingHandler] - java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
>     > 2021-02-15 14:15:58.097 [WARN ] [ternal.handler.HomematicThingHandler] - java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
>     > 2021-02-15 14:15:58.142 [WARN ] [ternal.handler.HomematicThingHandler] - java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
>     > 2021-02-15 14:15:58.148 [WARN ] [ternal.handler.HomematicThingHandler] - java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
>     > 2021-02-15 14:16:00.789 [WARN ] [ternal.handler.HomematicThingHandler] - html
>     > 2021-02-15 14:16:00.867 [WARN ] [ternal.handler.HomematicThingHandler] - html
>     > 2021-02-15 14:16:05.421 [WARN ] [ternal.handler.HomematicThingHandler] - html
>     > 2021-02-15 14:16:05.426 [WARN ] [ternal.handler.HomematicThingHandler] - html
>     > 2021-02-15 14:16:05.432 [WARN ] [ternal.handler.HomematicThingHandler] - html
>     > 2021-02-15 14:16:05.444 [WARN ] [ternal.handler.HomematicThingHandler] - html
>     > 2021-02-15 14:16:05.467 [WARN ] [ternal.handler.HomematicThingHandler] - html
>     > 2021-02-15 14:16:05.475 [WARN ] [ternal.handler.HomematicThingHandler] - html

It looks like the HmIP process on the CCU was not ready and rejected to requests.

I have uploaded a slightly newer version of the test jar. Maybe you can try this one. When you perform the test with the CCU again, please enable TRACE log mode before the test.

Running in Docker in host mode for Network

Did you configure for the bridge an explicit callback address? I know of at least one issue where this was necessary when openHAB is used in a docker container (see: [homematic] Connection timeout issues when upgrading to openhab3 using CCU2 · Issue #9855 · openhab/openhab-addons · GitHub)