core icon indicating copy to clipboard operation
core copied to clipboard

DSMR integrations stops irregularly since Nov 15 2022

Open jan-gerard opened this issue 2 years ago • 8 comments

The problem

As of November 15 (2022) my DSMR integration "DSMR Slimme Meter" (installed as a standard integration though HA) stops reporting. When I restart HA, it works fine again for some time. It happened on Nov 15, Nov 18, Nov 20, Nov 30. Nothing was changed physically. The energy meter is connected with a P1 to USB cable (from SmartMeterDashboard.nl) since almost 2 years without problems. It is connected to a Raspberry Pie 4 running Home Assistant OS. I'd love to provide extra information, but where to find that kind of logging? And where can I find a history of core- and integration-updates? If it happens again, what can I do to capture some logging before resetting the system?

What version of Home Assistant Core has the issue?

2022.11.5

What was the last working version of Home Assistant Core?

2022.11.1

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

This integration has no 'download diagnostics' option.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

jan-gerard avatar Dec 02 '22 15:12 jan-gerard

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 Dec 02 '22 15:12 home-assistant[bot]

My dsmr integration also stopped working yesterday. Is there any way to analyse this?

jdesmedt avatar Dec 14 '22 10:12 jdesmedt

Same here. Works fine after restart, but stops and freezes at some point. This can be found in the logs `Logger: dsmr_parser.clients.protocol Source: /usr/local/lib/python3.10/site-packages/dsmr_parser/clients/protocol.py:141 First occurred: 07:25:00 (21 occurrences) Last logged: 07:39:45

disconnected due to exception Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/serial_asyncio/init.py", line 115, in _read_ready data = self._serial.read(self._max_read_size) File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 595, in read raise SerialException( serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?) `

dgooijer avatar Jan 05 '23 06:01 dgooijer

I am experiencing a similar issue. I am using P1 > Wifi and everything works fine and after a couple of hours is stop updating the sensors in HA while I can see that the P1 module is still working fine and when I enable debug logging I can see the datagrams showing up in the logs. Until a couple of days ago I was using this P1>Wifi module with Domoticz and it ran for years without problems. But somehow with this integration it stops after a while.

Any idea what I can do to help debug this? (I am kinda new to HA though).

dannybloe avatar Jan 13 '23 07:01 dannybloe

Here it is the same. Sometimes after a reboot host it works for a short while. DSMR integration worked flawlessly for a long time and all of a sudden it becomes unreliable. For me I switched to the HomeWizard integration for now to keep the Energy dashboard alive. I never wanted the (used HomeWizard as some kind of a backup) as DSMR is directly connected to P1 via an USB cable, which in my opinion should be more reliable. Anyways: I hope this issue gets solved really quickly. MY feeling is that this is caused by some dependency update along the way.

I am currently running

Home Assistant 2023.1.4 Supervisor 2022.12.1 Operating System 9.4 Frontend 20230110.0 - latest

hvoerman avatar Jan 15 '23 16:01 hvoerman

I created an AppDaemon script that monitors the updating of the sensors in HA and if the last update is longer than the polling interval I restart the P1 module connected to my meter. When the module restarts the integration picks it up again within a minute. I can see that this disconnect/stalling happens 1 or 2 times a day. At least I have a way now to not loose any significant data. But it is annoying.

dannybloe avatar Jan 17 '23 11:01 dannybloe

I also exprience the same issue. I am using a P1 > USB cable. After every restart of HA the monitor starts working, but after a few hours it stops working again. I am using this tool to read my energy consumption and now i have to manual read the meters. Is there maybe a workaround or is there already someone looking in this issue?

arveeproject avatar Feb 05 '23 08:02 arveeproject

Same here. Side symptoms, not showing Gas consumption and missing electricity values such as sensor.current_phase_l1, sensor.current_phase_l2, sensor.current_phase_l3, sensor.long_power_failure_count, etc. Power consumption is working though. Using a P1>USB cable in RPi4.

dxfoxd avatar Feb 06 '23 11:02 dxfoxd

Same here, since yesterday afternoon it stops. I restarted DSMR, checked the P1 itself and it runs fine. Within Domoticz is also shows up without any issue!

SchulieBug avatar Feb 23 '23 20:02 SchulieBug

Same here!! I see the same issue. I had this before and created a Node red automation to restart however.. i check if any of the 3 phases reports < 100 VAC.. however.. the values froze so my node red check does not work.

@dannybloe : ==> I get what you did, but since I am a software noob (at least noob-ish) i would kindly like to know how you approached the re-start. preferably via node red.

Thus far i created an edit-poll-state-node that subsequently gets smooth(ed) and where i return the standard deviation. I calculate this over 5 values (which when frozen is 0). However, what node is next...

TieskeC avatar Mar 05 '23 13:03 TieskeC

Same here. I have to restart the integration every few days. Sometimes it goes for a week, sometimes less than a day

RF197 avatar May 17 '23 07:05 RF197

Same here. Worked fine for a few days, suddenly stopped reporting. Any idea @frenck?

CoenWarmer avatar Jul 11 '23 20:07 CoenWarmer

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.