Homematic device appears offline

  • Platform information:
    • Hardware: Raspberry Pi 3

    • OS: Raspbian GNU/Linux 10

    • Java Runtime Environment:
      java --version
      openjdk 11.0.9.1 2020-11-06 LTS
      OpenJDK Runtime Environment Zulu11.43+100-CA (build 11.0.9.1+1-LTS)
      OpenJDK Client VM Zulu11.43+100-CA (build 11.0.9.1+1-LTS, mixed mode)

    • openHAB version: v3.0.1 release build

  • Issue of the topic: Homematic device via CUL appears to be offline

I have set up openHAB using the instructions on this website: OpenHAB als Alternative zu FHEM auf meinem Raspberry Pi • raspberry.tips

My CUL is currently running FW version 1.61.

Using homegear, I was able to pair the first of my HM-CC-RT-DN (which are Homematic room thermostats). It appears to be online in home gear, and also shows a sensible config print JSON, as far as I can tell.

I added the homematic bridge (running on localhost) to openhab.
The device could be found.

However, I face a “communication error”.

2021-02-21 18:19:43.034 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'homematic:HG-HM-CC-RT-DN:40bd44e9f1:LEQ0111872' changed from OFFLINE (COMMUNICATION_ERROR) to UNINITIALIZED
2021-02-21 18:19:43.067 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'homematic:HG-HM-CC-RT-DN:40bd44e9f1:LEQ0111872' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-02-21 18:19:44.318 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'homematic:HG-HM-CC-RT-DN:40bd44e9f1:LEQ0111872' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-02-21 18:19:44.342 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'homematic:HG-HM-CC-RT-DN:40bd44e9f1:LEQ0111872' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR)

Can you please point me to additional / further resources / help me with this?

Best regards
Michael

Please make sure that the firewall does not block the ports mentioned in the add-on documenation.

This problem may also be caused by Homegear, but I don’t have any experience with Homegear. Maybe somebody else can help.

Thanks for the first reply.
Firewalling is entirely disabled (policy ACCEPT, no exceptions configured).

Is there some logging I should look at?

I should probably add, that I was able to add the device and create a thing. I see the configuration in openHAB, so at least the first initialization in openHAB was successful. Nevertheless, I now see a communication error.

BR
Michael

For a first test, you can enable DEBUG log mode for the openhab binding. Hopefully this will give some relevant information.

Sorry for the long delay.

I finally found the time to look into the logging configuration and the logs.

Apart from some issues regarding sonos scripts, like:
[INFO ] [ng.homematic.internal.misc.MiscUtils] - Datapoint name ‘DeviceScripts/Sonos/vendor/aws/aws-sdk-php/src/Support/SupportClient.php’ contains
invalid characters, new Datapoint name ‘DeviceScripts_Sonos_vendor_aws_aws-sdk-php_src_Support_SupportClient_php’

I finally see messages like:
[DEBUG] [ommunicator.AbstractHomematicGateway] - Received new (String) value ‘40bd44e9f1’ for ‘CENTRAL:0#PONG’ from gateway with id ‘40bd44e9f1’

The string 40bd44e9f1 corresponds to the id of my homematic bridge which is given as “homematic:bridge:40bd44e9f1”

I guess this is a little too scarce to tell anything about it. At least it seems to communicate, but the data cannot be interpreted, right?

Any help is appreciated.

Best regards,
Michael

The message regarding PONG simply means that the binding can receive messages from Homegear.

The message regarding “invalid characters” is expected too because blanks are translates to “_”.

In order to find out what maybe wrong I would need a larger DEBUG output for real devices that are not working.

Hi Martin,

many thanks for your help.

For further analysis, I’ll attach the two latest unfiltered logfiles.

I doubt that they contain any critical information like credentials etc.

openhab.log (474.8 KB)
openhab.7.log (389.3 KB)

I hope that this will yield some more insights, I couldn’t find anything with my limited knowledge.

Best regards
Michael

To me it looks like a bad configuration in Homeear(?). I don’t think that entries like “‘DeviceScripts/Sonos/vendor/aws/aws-sdk-php/.changes/3.35.0’” should be real data points. I have never seen PHP scripts and shell scripts (in sub folders) used as data points. This looks like a misconfiguration in Homegear.
There seems to be a communication problem with Homegear: [al.communicator.client.SocketHandler] - Max alive time reached for socket on port 2001. Maybe caused by this large number of (invalid) data points.

I also saw this here: gatewayAddress=192.168.178.36,callbackHost=192.168.178.36,bindAddress=192.168.178.36 are openHAB and Homegear running on the same Raspi?

You’re probably right regarding the misconfiguration.

Both homegear and openhab are running on the same pi, with IPv4 address 192.168.178.36. It’s also got an IPv6 address, of course.

netstat -anp tcp only shows the following for port 2001.

tcp6       0      0 192.168.178.36:2001     192.168.178.36:56378    ESTABLISHED -

I guess the binding should be to tcp instead of tcp6, right?

I never configured a Sonos device, don’t even own one.

FWIW, I now explicitly set interface = 0.0.0.0 in rpcservers.conf and restarted homegear and openhab. The binding seems to happen to TCPv6 only, although stated otherwise.

The device “Thermostat Schlafzimmer” now appears “online” (green label).

I think you nailed it!

Thanks for your support.

Best regards, stay safe!

Michael