home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.46k stars 29.39k forks source link

DSMR Slimme Meter Landis/Gyr E360 data missing #68472

Closed jeroenjjjdevries closed 2 years ago

jeroenjjjdevries commented 2 years ago

The problem

It seems the DSMR Slimme Meter integration is not working completely as expected with our Landis/Gyr E360 (ESMR 5.0)

What version of Home Assistant Core has the issue?

core-2022.3.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

dsmr

Link to integration documentation on our website

https://www.home-assistant.io/integrations/dsmr

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: dsmr_parser.clients.protocol
Source: /usr/local/lib/python3.9/site-packages/dsmr_parser/clients/protocol.py:155
First occurred: 15:07:54 (231 occurrences)
Last logged: 16:08:11

failed to parse telegram
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dsmr_parser/clients/protocol.py", line 151, in handle_telegram
    parsed_telegram = self.telegram_parser.parse(telegram)
  File "/usr/local/lib/python3.9/site-packages/dsmr_parser/parsers.py", line 48, in parse
    self.validate_checksum(telegram_data)
  File "/usr/local/lib/python3.9/site-packages/dsmr_parser/parsers.py", line 82, in validate_checksum
    raise ParseError(
dsmr_parser.exceptions.ParseError: Failed to perform CRC validation because the telegram is incomplete. The checksum and/or content values are missing.

Logger: dsmr_parser.clients.protocol
Source: /usr/local/lib/python3.9/site-packages/dsmr_parser/clients/protocol.py:153
First occurred: 15:04:53 (3104 occurrences)
Last logged: 16:08:27

Invalid telegram. The CRC checksum '50365' does not match the expected '17913'
Invalid telegram. The CRC checksum '52990' does not match the expected '10217'
Invalid telegram. The CRC checksum '5866' does not match the expected '21703'
Invalid telegram. The CRC checksum '20979' does not match the expected '5424'
Invalid telegram. The CRC checksum '10506' does not match the expected '61748'

Additional information

Reading through several forums, I can find many people with CRC issues when using the Landis Gyr E360 https://www.domoticz.com/forum/viewtopic.php?t=26962 https://github.com/psvanstrom/esphome-p1reader/issues/4 https://community.home-assistant.io/t/dsmr-issue-with-landis-gyr-e360/279389 https://community.home-assistant.io/t/dsmr-sensors-re-add/254264

probot-home-assistant[bot] commented 2 years ago

dsmr documentation dsmr source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @robbie1221, @frenck, mind taking a look at this issue as it has been labeled with an integration (dsmr) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

dodepier commented 2 years ago

I havo also an issue with the Landis Gyr E360

It is not possible to add the meter in HA:

image

UPDATE: needed to select 5S now I can add it to HA but still no values:

image
jeroenjjjdevries commented 2 years ago

@dodepier I was also able to configure it with 5S but that's for Zweden and doesn't seem to provide several entities with data. In the end I was able to make it work by selecting 'Enter manually' and filling out "dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AB6UJX5A-if00-port0" (without the quotes. Might be that the port number at the end is different in your situation. With this setup most entities provider regular data but the problem with the CRC errors is not fixed.

dodepier commented 2 years ago

@jeroenjjjdevries Thank you for the advise but also 'Enter manually' does not work for me. What kind of cable do you use? I did read a lot about cable issues (my cable was working fine with my previous meter, not a Landis/Gyr E360). It seems that the Landis/Gyr E360 has some extra requirements for the cable (with pull-up resistor):

https://webshop.cedel.nl/Slimme-meter-kabel-P1-USB-voor-Landis-Gyr-E360

https://www.domoticz.com/forum/viewtopic.php?t=30587

UPDATE:

I bought a p1 gateways now the meter works perfect with HA and the DSMR Slimme Meter integration

https://smartgateways.nl/product/slimme-meter-wifi-gateway/

jeroenjjjdevries commented 2 years ago

@dodepier I'm using this cable: https://www.sossolutions.nl/slimme-meter-kabel-p1-kabel-5-meter

Just one of the regular cables. If you go to 'Configuration', 'Add-ons, Backups & Supervisor', 'System' tab, then click the 3 dots in the bottom right corner of the 'Host' window, 'Hardware', at 'Search hardware' fill out "usb", you should find something called 'ttyUSB*'. When you open it up it should show you the 'ID' image which you can use to configure the integration manually. Just copy/paste it and to me that provided a somewhat working situation (but definitely not perfect)

dodepier commented 2 years ago

@jeroenjjjdevries Thank you for the info I did check the hardware ID of the USB device but it did not work for me (It did show up under the hardware info but could not connect). I did order a cheap similar version of the cable couple years ago. Maybe something is wrong with it now. Nevertheless, HA and DSMR is now working with a wifi gateway (it think it is based on an ESP32)

Jorikay commented 2 years ago

I do have the same issue as described here. The issue is: I bought a specific cable for the E360 which has the required pull-up, but it still fails.

when using putty i get proper data, but somehow I think HA is not using the right settings for the serial port for this meter? I also read topics suggesting it’s working fine in Domoticz, but in HA it’s a real struggle.

I am able to configure the meter with DSMR5 as option, but only after 10 or so tries. It then registers data about once every 20-45 minutes, so data is unusable.

it would be great if we could get this working and have it update at least every 10 seconds (or even more frequent).

one of the solutions I read is that Liander has marked the P1 port on these meters as defective, and the meter could be swapped for it. I tried this route as well: Liander does not have enough meters in stock, making a waiting time of 6-12 months.

if anyone would be able to troubleshoot this, or even resolve this, it would be very welcome. If needed I am able to meet digitally some time to check on the issue together.

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.