dsmrreader / dsmr-reader

DSMR-telegram reader & data visualizer for hobbyists. Free for non-commercial use.
https://dsmr-reader.readthedocs.io
Other
459 stars 96 forks source link

🙋Suddenly slow updates caused by high crc errors #1823

Closed garageboxnv closed 1 year ago

garageboxnv commented 1 year ago

Description

I noticed that the updates of my values suddenly was change to once or twice every 10 minutes, while before it was almost every second. I wonder if it relates with me requesting that fluvius records the 15 minute values on their online portal, this change I enabled not so long ago.

Log output, attached below

DSMR-reader version

5.10.3

DSMR-reader platform

Native (e.g. manual installation)

Debug info dump

2023-03-10 16:26:50,927 INFO     dsmr_datalogger_api_client read_telegram                    31 | [2023-03-10 16:26:50.927032] Opening connection "socket://desp-meter.del:8088" using options: {}
2023-03-10 16:26:51,263 DEBUG    dsmr_datalogger_api_client read_telegram                    58 | [2023-03-10 16:26:51.263230] Read 256 Byte(s)
2023-03-10 16:26:51,597 DEBUG    dsmr_datalogger_api_client read_telegram                    58 | [2023-03-10 16:26:51.597220] Read 0 Byte(s)
2023-03-10 16:26:51,931 DEBUG    dsmr_datalogger_api_client read_telegram                    58 | [2023-03-10 16:26:51.931106] Read 491 Byte(s)
2023-03-10 16:26:52,233 DEBUG    datalogger   telegram_to_reading              81 | Received telegram:
/FLU5\253769484_A

0-0:96.1.4(50217)
0-0:96.1.1(3153414733313030303731333033)
0-0:1.0.0(230310162702W)
1-0:1.8.1(006678.492*kWh)
1-0:1.8.2(008346.474*kWh)
1-0:2.8.1(006596.679*kWh)
1-0:2.8.2(002416.091*kWh)
0-0:96.14.0(0001)
kW):1.4.0(01.875*kW)
0-0:98.1.0(3)(1-0:1.6.0)(1-0:1.6.0)(230101000000W)(221220170000W)(03.711*kW)(230201000000W)(230114133000W)(03.606*kW)(23030.7.0(00.000*kW)
1-0:21.7.0(00.689*kW)
1-0:41.7.0(00.936*kW)
1-0:61.7.0(00.690*kW)
1-0:22.7.0(00.000*kW)
1-0:42.7.0(00.000*kW)
1-0:62.7.0(00.000*kW)
1-0:32.7.0(226.3*V)
1-0:52.7.0(228.7*V)
1-0:72.7.0(227.9*V)
1-0:31.7.0(003.63*A)
1-0:51.7.0(004.57*A)
1-0:71.7.0(003.58*A)
0-0:96.3.10(1)
0-0:17.0.0(999.9*kW)
1-0:31.4.0(999*A)
0-0:96.13.0()
!5994
2023-03-10 16:26:52,238 WARNING  datalogger   telegram_to_reading              90 | Rejected telegram: Invalid telegram CRC. The calculated checksum '23465' (5BA9) does not match the telegram checksum '22932' (5994)
2023-03-10 16:26:52,240 DEBUG    mixins       run_loop                         79 | dsmr_datalogger.management.commands.dsmr_datalogger: Sleeping 5.0s
dennissiemensma commented 1 year ago

Thanks for reporting. CRC-errors should be caused by hardware issues, e.g. interference of your serial cable. It's very prone to errors. The CRC is a checksum for the P1-telegram and if a single byte differs, the telegram is unreliable and must be discarded.

Sometimes these errors are obvious to tell, like this user: https://github.com/dsmrreader/dsmr-reader/issues/1733#issuecomment-1297718318

In your sample the second line below is obviously wrong, as it starts with kW): . Also the third line seems a bit off in the end: (23030.7.0(00.000*kW), missing a ) and probably more.

...
0-0:96.14.0(0001)
kW):1.4.0(01.875*kW)
0-0:98.1.0(3)(1-0:1.6.0)(1-0:1.6.0)(230101000000W)(221220170000W)(03.711*kW)(230201000000W)(230114133000W)(03.606*kW)(23030.7.0(00.000*kW)
...

So you should check if your cable has any interference, e.g. power cable crossing (near) it.

garageboxnv commented 1 year ago

Thx, I was looking further into the configuration details, as nothing was changed near the cable. I use esphome with a serial interface toward dsmr-reader and I update this regurarly

After investigation the error dissapeared, now all is running fine again :) I suspressed all logging and changed the serial buffer to 1500 bytes

Thx

`api: logger: level: NONE hardware_uart: UART1 baud_rate: 0 ota:

external_components:

uart:

stream_server: uart_id: p1_bus port: 8088`