DSMR Reader Add-on for Home Assistant

Hello,

I’m currently running DSMR Reader on a separate Linux VM.
I’d like to port it to this great DSMR add-on in Home Assistant.
This will save me from having to maintain a Linux VM.

Has anyone ever had issues with the USB port/path suddenly changing to HA?

What do you mean with “suddenly changing”?
In Linux (and home assistant) try to use “/dev/serial/by-id/” and not device paths like /dev/ttyUSB0
The serial/by-id paths stay the same as long as you do not change the hardware.

2 Likes

I once had a problem where the USB drive wasn’t detected with ZigBee2MQTT, and suddenly went from /dev/ttyUSB1 to /dev/ttyUSB0.

Perhaps everything had been disconnected after a reboot.

About 2 months ago I have bought this dsmr smart meter, went through the setup step by step as provided without any issues. And got it working in home assistant flawlessly.
However, after 1 hour it stops. Every time. I’ve searched different forums, one suggestion was to use usb-power instead of only through the p1, didn’t change anything. The second top-advice was to set the entity-update to lower/higher intervals, no effect… Updated to the latest firmware, no effect.
My guess is theres a bigger error in my system, perhaps the database or idk… I am not an IT specialist lol, your help would be appreciated!

In short: it reads both electricity and gas in HA for one hour after plugged in and then stops.

The log from homeassistant on its error:

Logger: homeassistant.components.dsmr
Bron: components/dsmr/sensor.py:808
integratie: DSMR Smart Meter (documentatie, problemen)
Eerst voorgekomen: 10:22:52 (1115 gebeurtenissen)
Laatst gelogd: 21:16:14

Error connecting to DSMR
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/dsmr/sensor.py", line 808, in connect_and_reconnect
    transport, protocol = await hass.loop.create_task(reader_factory())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1171, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1146, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
        exceptions, addrinfo, laddr_infos)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1045, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 641, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 681, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.0.237', 23)

After the error occurs please check if the Homewizard app can get a readout. If it fails contact the Homewizard helpdesk.

If the Homewizard app functions normally, Check the network route between the P1 meter ND your home assistant installation. What wifi access point are you using, what switches, is the cabling OK?

Let me know what you find out.

Forgot to mention I’ve got the smartgateways “Slimme Meter WiFi Gateway” and not from homewizard. Using it with the original cable that came with it.
I have unify access points but its not on there (all current connected clients are defined/known). Theres one netgear switch on the network, setup only to connect all rooms/wallsockets.

After one hour I cannot access the smart meter gateway anymore through the browser. When reconnect (after a minute) it restarts and connected to my wifi again:

Gateway type 	NL - DSMR4+5
Mac address 	xx_xx_xx_xx_xx_xx (edited before posting)
Ip address 	192.168.0.237
Startup time 	2025-12-29T12:33:40Z
Firmware running 	2025070304
Firmware available 	2025070304
License activated 	YES
Number of reboots 	22
  	 
WiFi SSID 	telenet-9391775
WiFi channel 	1
WiFi signal strength 	-30
WiFi reconnects 	0
WiFi last connection error 	
Internet connection 	OK
  	 
MQTT server 	
MQTT status 	Not configured
MQTT (re)connects 	0
MQTT (re)connect time 	
  	 
Secondary port found 	No
Forwarding mode 	Not available
Remote Gateway 	
Remote Gateway status 	Disconnected
  	 
Telegrams received 	32
Telegrams with errors 	32

HomeAssistant log: (WARNING)

Logger: dsmr_parser.clients.protocol
Bron: runner.py:289
Eerst voorgekomen: 28 december 2025 om 16:10:34 (6 gebeurtenissen)
Laatst gelogd: 11:46:19

keep-alive check failed

If the Smart gateways meter is not a client of one ow your Unifi access points, how does the Smart gateways meter connect to your wifi network?

directly to the router-wifi signal, the access points are on the other end of my house and the first floor

Some other things you can try:

  • use a dedicated power supply with a rating of 5V / 1A written on the case. I read you have tried a power supply already and I wonder if you have used a good power supply
  • Use a different 2.4 ghz wifi channel
  • Move your gateway to a different place (just a few centimeters)
  • after the meter disappears from the network look at the LED:

Led betekenis (alleen gateway zonder display, de gateway met display toont de status op het display)
Het rode ledje brandt indien de gateway is voorzien van stroom.
Het blauwe ledje kan op verschillende manieren gaan branden of knipperen.
BLAUWE LED – UIT: de gateway is niet verbonden met wifi of de wifi portal is opgeroepen door de knop kort in te drukken. Verbind met het SSID “Smart Gateways P1 READER” en configureer de gateway.
BLAUWE LED – ALTIJD AAN: de gateway is verbonden met het wifi netwerk maar heeft nog geen data ontvangen van de slimme meter.
BLAUWE LED – KNIPPERT LANGZAAM: de gateway ontvangt data van de meter (normale situatie)
BLAUWE LED – KNIPPERT SNEL: er is een firmware update beschikbaar. De update kan via het firmware menu op de webportal worden geïnstalleerd.

And you can ask smart gateways for a replacement.

*thnx, i will check for a different power supply

  • Use a different 2.4 ghz wifi channel - will do that as well

  • Move your gateway to a different place (just a few centimeters) - done, tried it without effect

  • after the meter disappears from the network look at the LED: it runs steady red, no more blue assoon at it fails to connect in HA

it looks to me the problem is inside the Smart gateways meter. Once you get that stable, Home Assistant will have no problems. Good luck!

2026-01-08: DSMR Reader Add-on v1.12.2, DSMR-reader v5.12
Changelog here

2 Likes

installed the new update, and its been running steady now since jan 16th…finally :crossed_fingers:

1 Like

It was not related to DSMR, it seems after redoing mqtt-config for that specific sensor it was picked up again.

1 Like