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
73.93k stars 30.99k forks source link

DSMR Reader MQTT, data null #131490

Open gijs007 opened 8 hours ago

gijs007 commented 8 hours ago

The problem

We use the MQTT integration to read the measurement data directly from a Smart Gateways P1 reader, as per: https://haprofs.com/connect-a-smart-meter-with-p1-port-to-home-assistant-with-mqtt/

The issue is that sometimes the reader is not available, e.g. due to a network outage. In the measurement graph we see the values 0. (e.g. sensor.dsmr_reading_electricity_delivered_1 and sensor.dsmr_reading_electricity_returned_1)

Home Asisstant null data

The energy dashboard, and some other integrations (e.g. Dynamic Energy Cost), calculate the difference between the last and current sensor value. If the last value was 0, these integrations report a sudden spike in power usage/return. This causes for various problems, such as faulty energy expenses calculations and faulty dashboards/statistics.

What version of Home Assistant Core has the issue?

core-2024.11.1

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 Reader

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 8 hours ago

Hey there @sorted-bits, @glodenox, @erwindouna, mind taking a look at this issue as it has been labeled with an integration (dsmr_reader) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `dsmr_reader` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign dsmr_reader` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


dsmr_reader documentation dsmr_reader source (message by IssueLinks)

Glodenox commented 8 hours ago

I'm afraid this integration doesn't support the Smart Gateways P1 reader. This integration is made to support the MQTT values provided by the DSMR Reader project. Any other system that wants to piggyback on this interface will have to align to the standards set by DSMR Reader.

In this case, there seems to be a bug with the values reported by the P1 reader, so that's where the issue will need to be solved. An empty value would be discarded by the integration, a 0 value has to be seen as a real value as some measurements reset to 0 on a regular basis.