[SOLVED] DSMR doesn't show up after adding to configuration.yaml

Hi board,

I’m new to HA, migrating from Domoticz. Initially I could configure my lights entirely through UI, but now I also wanted to add DSMR (DSMR Slimme Meter - Home Assistant) into the mix. I figured I had to manually change configuration.yaml and restart, but after hours of trying I still don’t get anything from DSMR showing in the UI. Also, the sensors (configured group per example) all show ‘Entity not available: sensor.…’. So after nearly losing my mind I decided to add something else, so I added pvoutput, which worked straight away (after editing configuration.yaml, restart).

My configuration.yaml is as follows:

# Configure a default setup of Home Assistant (frontend, api, etc)

# Text to speech
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

  - platform: dsmr
    port: 8080
    dsmr_version: 4
    reconnect_interval: 30
  - platform: pvoutput
    system_id: !secret pvoutput_system_id
    api_key: !secret pvoutput_api_key
    scan_interval: 120

Also, the device was previously working in Domoticz and if I netcat to the host and port I get output about every second. I also tried different values for dsmr_version because I’m not entirely sure whether it’s 4 or 5, but I even tried 2.2. The integration page also mentions

To configure options for DSMR integration go to Configuration >> Integrations and press Options on the DSMR card.

But I don’t have a DSMR integration and it’s not in the search list either. I’m at loss here, I have no clue why this wouldn’t work. I would actually expect DSMR to show up somewhere even if it couldn’t connect to the host, but I see no reason why it couldn’t connect and it still isn’t showing…

Please board, save me…

Have you checked the log files for any dsmr related messages?

How are you physically connecting your dsmr port to homeassistant?

Yes, I have (and did yesterday), I don’t see any DSMR related messages. It’s quite short altogether actually, but today at least there’s mention that it failed to get data from pvoutput once.

I have an ESP8266 based reader, connecting to the reader over TCP.

Can homeassistant reach the reader? Both in same ip subnet etc.? No filtering?

Any errors in the homeassistant log?

Obviously you restarted homeassistant after editing configuration.yaml?

I’m running HA in Docker (network_mode: host), the host can reach the reader (tried using nc, data shows immediately). It’s the same subnet, no filtering, I can’t think of any reason why it wouldn’t work for HA, especially since nc works fine as well.

Log isn’t showing anything dsmr related.

I have restarted Home Assistant a couple of dozen times, at the very least. (also when trying other dsmr versions in the configuration I restarted after every change).

You might try to set the level of Logger to ‘debug’ for the DSMR integration to check if this is more talkative.

This actually got me somewhere. I enabled logging and saw some DSMR references, most importantly the following:

2020-12-09 12:09:00 INFO (MainThread) [dsmr_parser.clients.protocol] disconnected because of close/abort.

I then turned on debug logging for dsmr_parser, which showed it was receiving data for 30s. I then tested using Putty, which also disconnected after 30s.

I couldn’t find any (related) timeouts in the ESPEasy firmware on my reader, so I guess it might be a bug. Only thing I’m wondering is why it doesn’t reconnect, however I’ve seen there are some open issues with regard to reconnecting (like https://github.com/home-assistant/core/issues/40595), so maybe that affects me as well…

Thanks a lot for all the help so far.

OK, so after it seemed I had bricked my reader, the seller told me I had to remove the jumper from the addon board to flash it. Updated the firmware, now the connection with Putty survived well over a minute and then my patience stopped (connection was still working). Restarted Home Assistant and my dashboard is filled with readings. Again, thanks for the help, especially the logger hints are what saved me I guess.

Kind regards,

1 Like