core icon indicating copy to clipboard operation
core copied to clipboard

UnitOfVolume in energy integration breaks DSMR / slimme meter intergration

Open xtrmenl opened this issue 2 years ago • 17 comments

The problem

From 2023.1 release with the changes from UnitOfVolume in energy integration by @epenet the energy dashboard isn't parsing the sensory data from the dsmr slimme meter integration value are shown as unknown changes the unit in the developr tools -> statistics "fix issue" doesn't solve the issue

when reverting back to 2022.12.9 is works ones more

What version of Home Assistant Core has the issue?

2023.1

What was the last working version of Home Assistant Core?

2022.12.9

What type of installation are you running?

Home Assistant OS

Integration causing the issue

DSMR slimme meter integration

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?

No response

Additional information

No response

xtrmenl avatar Jan 10 '23 08:01 xtrmenl

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!

Code owner commands

Code owners of dsmr can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign dsmr Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


dsmr documentation dsmr source (message by IssueLinks)

home-assistant[bot] avatar Jan 10 '23 08:01 home-assistant[bot]

From 2023.1 release with the changes from UnitOfVolume in energy integration by @epenet

I have a hard time understanding or believe that that is related to anything, as those changes simply moved a constant definition, the value of the constant is the same.

Most helpful would be an reproduction scenario.

the energy dashboard isn't parsing the sensory data from the dsmr slimme meter integration value are shown as unknown

That sounds a bit over the place, as the energy dashboard isn't parsing entities.

Could you clarify the issue you are having? Which entities are you referring to specifically? Could you provide a current state dump for them?

../Frenck

frenck avatar Jan 10 '23 10:01 frenck

i'll try to explain so from the update of the 8th of january the energy dashboard stopped updating the statistics https://i.imgur.com/rEbhEVS.png

first assumption was that the p1 meter stopped working however the DSMR reader add-on was still going strong https://i.imgur.com/CbJih0v.png

looking into the sensors in HA;

  • Electricity Meter Energy consumption (tarif 1) sensor.energy_consumption_tarif_1 DSMR Slimme Meter

  • Electricity Meter Energy consumption (tarif 2) sensor.energy_consumption_tarif_2 DSMR Slimme Meter

  • Electricity Meter Energy production (tarif 1) sensor.energy_production_tarif_1 DSMR Slimme Meter Meterkast

  • Electricity Meter Energy production (tarif 2) sensor.energy_production_tarif_2 DSMR Slimme Meter Meterkast

they all got the counter with remark unknown whereas (after the recovery to the latest version of 2022 it states the KwH value in this case 8k+ https://i.imgur.com/1jWitL5.png

i can upgrade to the 2023.1 version again to recreate a dump

xtrmenl avatar Jan 10 '23 12:01 xtrmenl

I cannot do much with the above information. Please answer the questions I had above. The graphs are the results of long-term statistics in the database and do not help me with anything when debugging an integration.

frenck avatar Jan 10 '23 12:01 frenck

https://i.imgur.com/GjK1h22.png updated an returns to "unknown" state then all entities pop up in the statistics to be fixed

https://i.imgur.com/eyeHBfP.png https://i.imgur.com/s0TqVBX.png

if you need a data dump (not pictures) how do i need to do that ?

xtrmenl avatar Jan 10 '23 12:01 xtrmenl

I have the same issue. Couple times a day data is picked up and the energy dashboard shows it in the hour of when the data was picked. So that is why it seems to be parsed wrong.

First thought it was the RPI which has ser2net running, get info from the P1 port. Updated, rebooted couple times, rebooted HA. No joy.

I reverted a backup from 2023.1.2 to 2022.12.8, had the issue also on 2023.1.1. Waiting a couple hours to see if it still works.

sensation361 avatar Jan 10 '23 17:01 sensation361

I also have the issue and I have seen that the entities mention in some log that they have the wrong unit assigned. If I'm back home I will try to find the log entries again.

Wortelsoft avatar Jan 11 '23 09:01 Wortelsoft

@Wortelsoft those bad log entries are probably these https://i.imgur.com/eyeHBfP.png https://i.imgur.com/s0TqVBX.png

xtrmenl avatar Jan 11 '23 09:01 xtrmenl

@Wortelsoft those bad log entries are probably these https://i.imgur.com/eyeHBfP.png https://i.imgur.com/s0TqVBX.png

Yes the bottom image is what I had found.

Wortelsoft avatar Jan 11 '23 11:01 Wortelsoft

Same Issue here when updating to from 2022.12.8 to 2023.1.1 and newer..

After update hassio all sDSMR Slimme Meter sensors have state unknown and are not updating. When reverting back to 2022.12.x everything is working again without problems and the DSMR Slimme Meter have data

DSMR Slimme Meter is reading data directly from esp over tcp.

bgrr74 avatar Jan 13 '23 16:01 bgrr74

tryed another update to 2023.1.4

After updating i notice that the sensors update and it shows the correct data for a second after update. After a second it changes to "unknown"

This happens every time the sensors update. This happens every +/- 30 seconds. Time between updates is set o 0.

Setting Time between updates to 30 or 60 does not resolve the problem.

After updating to 2023.1.x the sensors show up as sensors which need to be fixed under Developer Tools > Statistics with issue " The unit of the entity changed from "kWh" to .

After restoring backup to 2022.12.8 and everything is working without any problems again.

If you need any more information or something else please let me know. Looking for a fix as currently i can not update to 2023.1.x and i'm stuck on 2022.12.8

Greetings

bgrr74 avatar Jan 14 '23 20:01 bgrr74

Made some progress ;-)

I have 2 devices reading the P1 wemos D1 hardware over tcp.

  • Hassio with dsrm slimme meter addon
  • stand alone ubuntu server with DSRM reader (https://github.com/dsmrreader/dsmr-reader)

When i shutdown the stand alone dsrm reader the addon in hassio is working flawless with 2023.1.x As soon as i start DSMR reader and it starts reading the P1 meter also i see the addon getting in trouble reading the P1 sensor.

Changing the sleep timers in both addon and stand alone dsrm reader to 15 and 30 seconds i get mixed results in readings in the addon and its updating most of the time every few 2 to 3 minutes.

Looks like reading the P1 meter esp with more then 1 device worked until 2022.12.8 but something in 2023.1.x changed resulting in sensors unknown when a reading or update is missed ?

bgrr74 avatar Jan 15 '23 00:01 bgrr74

Got some same issues,

Debugging is showing the correct output only the logging is showing:

Logger: dsmr_parser.clients.protocol Source: runner.py:120 First occurred: 10:01:15 (9 occurrences) Last logged: 10:08:07

keep-alive check failed

cafedelmar01 avatar Feb 01 '23 09:02 cafedelmar01

Yep, Same here! also Unknown after new new years update and keep alive check failures in the log.

Nightraider89 avatar Feb 03 '23 22:02 Nightraider89

Update from my side. Today I updated the OS to the latest release. I also found I had an old docker instance with HA still pulling info from the same DSMR reader. I disabled that one and after all the updates it still is working fine.

sensation361 avatar Feb 06 '23 16:02 sensation361

Update from my side. Today I updated the OS to the latest release. I also found I had an old docker instance with HA still pulling info from the same DSMR reader. I disabled that one and after all the updates it still is working fine.

Do you have HA in your own docker environment? Or is that just internal in the standard HA installation? I dont know how to get there.

Nightraider89 avatar Feb 06 '23 17:02 Nightraider89

The HA instance I had problems with is not running in docker but as a VM. I had a second HA running as docker container on a synology nas.

Have you tried the latest OS version?

sensation361 avatar Feb 06 '23 17:02 sensation361

Hello, I ran into this issue this morning. I just installed the P1 meter on Wednesday and it worked perfectly for 2 days, but this morning I noticed that there were no meter readings and found the same FIX ISSUE for alle entities as described above.

Has this been resolved? What is the solution? image

NLRoger avatar Feb 25 '23 12:02 NLRoger

One way to solve it was delete everything, restart the P1 reader (which got a new ip-adress) and reinstall the integration. Ugly solution though, as this is not what you want when you have a year of data.

The sudden disruption, could it have something to do with a hickup of the router, DHCP glitch or something so that the P1 reader doesn't seem to be functioning as far as HA is concerned? I'm running HA in a VM on a Synology NAS by the way,.

NLRoger avatar Feb 25 '23 16:02 NLRoger

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.