core
core copied to clipboard
Error connecting to DSMR
The problem
The DSMR reader isn't working anymore since the update to core 2024.2 ands HA OS 11.5 I have done today (08/02/24). In 2024.1 it was working great for the power & gas meters
What version of Home Assistant Core has the issue?
core-2024.2.0
What was the last working version of Home Assistant Core?
core-2024.1.2
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: homeassistant.components.dsmr
Source: components/dsmr/sensor.py:625
Integration: DSMR Slimme Meter (documentation, issues)
First occurred: 16:29:40 (137 occurrences)
Last logged: 17:36:52
Error connecting to DSMR
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/serial/serialposix.py", line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AQ56MLQM-if00-port0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/dsmr/sensor.py", line 625, in connect_and_reconnect
transport, protocol = await hass.loop.create_task(reader_factory())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/serial_asyncio/__init__.py", line 448, in create_serial_connection
serial_instance = serial.serial_for_url(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/serial/__init__.py", line 90, in serial_for_url
instance.open()
File "/usr/local/lib/python3.12/site-packages/serial/serialposix.py", line 325, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AQ56MLQM-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AQ56MLQM-if00-port0'
Additional information
Running on Home Assistant Yellow
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
Renames 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. -
@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 documentation dsmr source (message by IssueLinks)
"I had the same issue after upgrading to 2024.2.0; however, after performing a full shutdown of the Raspberry Pi, DSRM started working again upon reboot."
I’m having a similar issue. Energy is not monitoring after the update. Also my solar panel integration is not updating (Enphase Envoy). Energy history is available and working, but no new registration of energy. Even after reboot of everything, however the DSMR does report data for me.
Same problem here. DSMR integration stopped working after install of 2024.2. The existing metering entities were suddenly all invalid. A drop/reinstall of the DSMR integration (dsmr type 4) resulted in ‘could not connect’. A full restart of the Rpi 4B + HA did not help either.
Also the same problem. Starts with version 2024.2 and HA OS 11.5. Still same problem with version 2024.2.2
Same over here, when reinstalled the DSMR integration, it does only connect to the wrong configuration, 5S for Swedish, for me it should be 5 Dutch. It does not receive data. However over wifi i can connect directly through the gateway and see that it is receiving data from the electricity meter.
After a numerous trys to reinstall the DSMR integration it works again. No clue why.
Same issue here.
2024-03-23 16:44:51.094 ERROR (MainThread) [homeassistant.components.dsmr] Error connecting to DSMR
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/dsmr/sensor.py", line 621, in connect_and_reconnect
transport, protocol = await hass.loop.create_task(reader_factory())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1120, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1102, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
Discovered the IP of my SMART METER GATEWAY had changed, after updating it via https://community.home-assistant.io/t/modify-configuration-made-through-gui-dsmr-in-this-case/522427/3 it started working again.
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.
This issue was in fact solved by a later update approx. in february.