Smartmeter binding thing goes offline once in a while with bidirectional meter

I’m using an Raspberry Pi 2B with an USB-connection and installed openHABian and openHAB3.2 stable and the “volkszaehler” IR-readout.

Worked fine with my onedirectional meter until yesterday. I got a new bidirectional meter for use with my PV and it works also, but once in a while, the Thing goes offline with “wrong crc” and comes up again afterwards.

2022-03-15 16:33:43.909 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:2Richtung' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): wrong crc
2022-03-15 16:33:51.313 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:2Richtung' changed from OFFLINE (COMMUNICATION_ERROR): wrong crc to ONLINE
...
2022-03-15 16:37:43.935 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:2Richtung' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): wrong crc
2022-03-15 16:37:50.981 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:2Richtung' changed from OFFLINE (COMMUNICATION_ERROR): wrong crc to ONLINE
...
2022-03-15 16:39:43.920 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:2Richtung' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): wrong crc
2022-03-15 16:39:50.960 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:2Richtung' changed from OFFLINE (COMMUNICATION_ERROR): wrong crc to ONLINE

This happens exactly every two minutes, the Thing is configured like this:

UID: smartmeter:meter:2Richtung
label: Smart 2Richtung Meter
thingTypeUID: smartmeter:meter
configuration:
  mode: SML
  refresh: 5
  baudrate: AUTO
  conformity: NONE
  port: /dev/ttyUSB_smartmeter
  baudrateChangeDelay: 0

(same configuration as with the onedirectional)

changed the refresh to 10secs and it seems to settle. Is the 5secs interval with bidirectional meters to fast for the Pi2?

edit:
The “wrong crc”-errors are a bit more seldom, but they’re still here.

Is the bidirectional meter from the same manufacturer?
The reading with optical probe and a “platinencomputer” is a little fragile I would say.
There are many aspects which can lead to a crc error.
I would check following things:

  • the wire of the cables should not be too long and no bigger power cable should be in the nearer area.
  • check if the probe (head) is on the meter in the right angle on the smart meter (there are receive and transmit IR-LEDs which have to work together).
  • how many devices are connected to the USB Bus of your device? Maybe a limit is reached?
  • I heard some had better results with this “Globuli”: Mantelwellenfilter – Wikipedia

Maybe not for Pi2, but for the serial and optical communication to your smart meter in general? Smart meters are not known to have a big cpu :wink:
Do you really need the values in this fast interval?

Did you find a solution? I have a very similar problem on ttyUSB1 (RPI4) and playing around with the time doesn’t solve it (I‘m still running 3.4.5). I‘m using the wire coming with the device.

OFFLINE (COMMUNICATION_ERROR): The source did not signal an event for 38000 milliseconds and has been terminated.

2023-10-24 06:28:20.580 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘smartmeter:meter:25be22d450’ changed from OFFLINE (COMMUNICATION_ERROR): The source did not signal an event for 38000 milliseconds and has been terminated. to ONLINE

2023-10-24 06:28:40.101 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘smartmeter:meter:25be22d450’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)

2023-10-24 06:28:42.107 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘smartmeter:meter:25be22d450’ changed from OFFLINE (COMMUNICATION_ERROR) to OFFLINE (COMMUNICATION_ERROR): No provider for port /dev/ttyUSB1 found

2023-10-24 06:28:54.169 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘smartmeter:meter:25be22d450’ changed from OFFLINE (COMMUNICATION_ERROR): No provider for port /dev/ttyUSB1 found to ONLINE

2023-10-24 06:30:04.455 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘smartmeter:meter:25be22d450’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): The source did not signal an event for 38000 milliseconds and has been terminated.

2023-10-24 06:30:14.510 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘smartmeter:meter:25be22d450’ changed from OFFLINE (COMMUNICATION_ERROR): The source did not signal an event for 38000 milliseconds and has been terminated. to ONLINE

Hey,
I have got a similar error. Newly installed meter (“mME”) of type Logarex LK13BE606749 “Zweirichtungszähler 11X20E01” built in 2022 with SW-Ver 06.
It roughly stays online for 1 minute (gathering one set of data), and then goes offline for a minute. It looks like this:

2024-08-30 22:39:05.345 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:0752974df0' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): wrong crc

2024-08-30 22:40:08.280 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:0752974df0' changed from OFFLINE (COMMUNICATION_ERROR): wrong crc to ONLINE

2024-08-30 22:41:09.311 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:0752974df0' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): wrong crc

2024-08-30 22:42:12.300 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:0752974df0' changed from OFFLINE (COMMUNICATION_ERROR): wrong crc to ONLINE

2024-08-30 22:43:13.341 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:0752974df0' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): wrong crc

2024-08-30 22:44:16.273 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:0752974df0' changed from OFFLINE (COMMUNICATION_ERROR): wrong crc to ONLINE

when I set the debug level to trace, the only relevant entries I could find are:

2024-08-30 22:38:05.719 [DEBUG] [org.eclipse.jetty.server.HttpOutput ] - write(array) s=OPEN,api=BLOCKING,sc=false,e=null aggregated !flush HeapByteBuffer@1a685f9[p=0,l=234,c=32768,r=234]={<<<event: message\ndata: {"to...ItemStateChangedEvent"}>>>wrong crc...\x00\x00\x00\x00\x00\x00\x00}

2024-08-30 22:38:05.721 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - sendResponse info=null content=HeapByteBuffer@1a685f9[p=0,l=234,c=32768,r=234]={<<<event: message\ndata: {"to...ItemStateChangedEvent"}>>>wrong crc...\x00\x00\x00\x00\x00\x00\x00} complete=false committing=false callback=Blocker@d1d068{null}

The Thing looks like this:

UID: smartmeter:meter:0752974df0
label: Smart Meter
thingTypeUID: smartmeter:meter
configuration:
  mode: SML
  refresh: 60
  baudrate: AUTO
  conformity: NONE
  port: /dev/ttyUSB0
  baudrateChangeDelay: 0
channels:
  - id: 1-0_96-50-1
    channelTypeUID: smartmeter:1-0_96-50-1
    label: 1-0:96.50.1
    description: "Value for OBIS code: 1-0:96.50.1 with Unit: null"
    configuration:
      conversionRatio: 1
  - id: 1-0_96-1-0
    channelTypeUID: smartmeter:1-0_96-1-0
    label: 1-0:96.1.0
    description: "Value for OBIS code: 1-0:96.1.0 with Unit: null"
    configuration:
      conversionRatio: 1
  - id: 1-0_1-8-0
    channelTypeUID: smartmeter:1-0_1-8-0
    label: 1-0:1.8.0
    description: "Value for OBIS code: 1-0:1.8.0 with Unit: Wh"
    configuration:
      conversionRatio: 1

The reader is a “USB IR Lesekopf EHZ Lese-Schreib-Kopf Volkszähler Hichi Smartmeter”
The values which are actually read are ok:

2024-08-30 23:32:49.321 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:0752974df0' changed from OFFLINE (COMMUNICATION_ERROR): wrong crc to ONLINE

2024-08-30 23:32:49.365 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_10180' changed from 69.1456 kWh to 69.14890000000001 kWh

2024-08-30 23:32:49.406 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_10182' changed from 18.248 kWh to 18.2513 kWh

2024-08-30 23:32:49.446 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_101670' changed from 97 W to 96 W

2024-08-30 23:32:49.459 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_107670' changed from 45 W to 43 W

2024-08-30 23:32:49.467 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_103270' changed from 236 V to 235.60000000000002 V

2024-08-30 23:32:49.483 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_105270' changed from 235.4 V to 235.5 V

2024-08-30 23:32:49.494 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_107270' changed from 236.5 V to 236.3 V

2024-08-30 23:32:49.513 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_107170' changed from 0.45 A to 0.44 A

2024-08-30 23:32:49.527 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_108171' changed from 119.4 ° to 119.10000000000001 °

2024-08-30 23:32:49.544 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_108172' changed from 239.60000000000002 ° to 239.5 °

2024-08-30 23:32:49.569 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_108174' changed from 18.7 ° to 18.5 °

2024-08-30 23:32:49.591 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_1081715' changed from 49.7 ° to 49.6 °

2024-08-30 23:32:49.615 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Smart_Meter_1081726' changed from 296.1 ° to 295.5 °

2024-08-30 23:33:50.377 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:0752974df0' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): wrong crc

Any idea what I can do to debug the problem and/or avoid the thing going offline half of the time?
Thank you!