DSMR Reader Add-on for Home Assistant

@rvdbrink Did update to 2022.8.3 still no fix.

@Davosje Correct it’s not fixed yet. You have to follow this issue https://github.com/home-assistant/core/issues/76347#issuecomment-1209145220

Hi guys
I 'm running the dsmr recorder addon since 2 weeks, and twice It stopped, looking at logs
It s only supposed to send the data to the remote Dsmr Docker on synology/

Blockquote
Traceback (most recent call last):
File “//./dsmr_datalogger_api_client.py”, line 193, in
main()
File “//./dsmr_datalogger_api_client.py”, line 165, in main
telegram = next(datasource)
File “//./dsmr_datalogger_api_client.py”, line 53, in read_telegram
incoming_bytes = serial_handle.read(MAX_BYTES_PER_READ)
File “/usr/local/lib/python3.9/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?)
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Watchdog is on, still it’s not restarting, and I can /have to start it manually…

any ideas?
tx!

“device reports readiness to read but returned no data (device disconnected or multiple access on port?)”
actually the local HA instance is also gathering the data for the energy dashboard… could it be the reason?
what’s the best way? update code or other settings to prevent reading at same time or something?
tx

Hi, I run the DSMR Reader addon version 1.7.0 in docker and the MQTT addon is running also in docker. I have enabled the DSMR sensor in the configuration.yaml all the sensors are showing up in HA. but the sensor value’s don’t get updated. How can i fix this?

Can you tell us a little bit more? Are you using the “DSMR Datalogger” or the full “DSMR Reader” addon? The datalogger version has a seperate forum post: DSMR datalogger Add-on for Home Assistant

Seems like you need to make sure the usb device is connected an set up properly?

2022-08-21: DSMR Reader Add-on v1.7.0, DSMR-reader v5.6
Changelog here

Like @rvdbrink was saying, the integration with the energy dasboard is broken since the release of HA 2022.8.x

That integration is part of HA itself and need to be fixed there. I’m not sure what needs to be done exactly (i can only see that the state class is removed which broke the integration). @depl0y can you help with this as you are the codeowner for the integration?

In the mean time (really as temp fix for now) you can download these file: https://github.com/sanderdw/hassio-addons/raw/tmp-fix-dsmrha/dsmr_reader/custom_components.zip and place its content in the config directory of HA. These are basicly the old files so from HA 2022.7.

Then you have this folder tree (don’t bother the pycache folder):
image

Restart HA and it should be working again.

3 Likes

DSMR Datalogger Current version: 1.1.0

shall I move to the other forum?
the usb device is at least working (good enough) for the sensors in HA, I can see all values, but might be some are missed, and HA just continues, while the datalogger stops working if it can’t access it temporarily?
current values
image

tx

I cannot start the DSMR Reader addon. It keeps stopping immediately. I don’t know why.
It has been working fine for quite a long time. Yesterday evening I installed HA 2022.9.4.
The logfile doesn’t say much.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-set-hassio-vars: executing... 
Home Assistant DSMR Reader Add-on - Release: 1.7.0
[cont-init.d] 01-set-hassio-vars: exited 60.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

How to get some more information what is going wrong?

I’ve tried to reinstall the addon. Same error.
The database seems to run fine because I can login with the postgres user with the help of the pgAdmin4 addon.

I’m running hassos on a VM.

The logfile after a fresh install:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-set-hassio-vars: executing... 
parse error: Expected string key before ':' at line 1, column 4
[14:53:50] ERROR: Unknown HTTP error occured
Home Assistant DSMR Reader Add-on - Release: 
parse error: Expected string key before ':' at line 1, column 4
[14:53:51] ERROR: Unknown HTTP error occured
parse error: Expected string key before ':' at line 1, column 4
[14:53:51] ERROR: Unknown HTTP error occured
[cont-init.d] 01-set-hassio-vars: exited 60.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal

I’ve installed a fresh hassos 7.6 on a VM (ESXi) and upgraded HA to version 2022.9.4.
Then I installed timescaledb 2.0.1 with the default settings and added the dsmrreader database.
Started the addon and it runs fine.
Now I installed the dsmrreader 1.7.0 addon. Did not change the configuration and start the addon.
Again I got the same error.

[cont-init.d] 01-set-hassio-vars: exited 60.

What went wrong?

Yes! After investigation of the file “01-set-hassio-vars” I found what the problem is.
The webfilter of my firewall (Fortigate FG40F) is blocking the url https://api-check.duckdns.org/

CHECK_UPDATE=$(curl -s "https://api-check.duckdns.org/dsmr-reader-addon/${ADDON_VERSON}?webserv=$(bashio::config 'WEBSERVER')&arch=$(bashio::info.arch)")
  if [[ "$CHECK_UPDATE" == *"response_string"* ]]; then
    OUTPUT=$(echo $CHECK_UPDATE | jq --raw-output .response_string)
    bashio::log.blue "$OUTPUT"
  else
    bashio::log.red "Home Assistant DSMR Reader Add-on - Update check failed"
  fi

I see there should be a message in the logfile in case of an error but don’t see it appear.

@sanderdw unfortunately this does not solve the issue for me. Any other things I could check or consider?

I have the addon running in docker. I have pasted the files in in the root of the container. restarted the addon. but he can still not connect to my mqtt broker.

Yes there is a specific topic for the datalogger: DSMR datalogger Add-on for Home Assistant please post your issue there.

Good to know thanks, i will put it on my todo list to debug the problem.

Not sure what i can do? I didn’t hear any ‘usb’ issues from others so it’s hard for me to debug your setup.

It seems that the manual custom_component override is not needed anymore :partying_face:. You can see the solution here: No energy visible from dsmr reader since new release · Issue #76347 · home-assistant/core · GitHub

Regarding MQTT issues its best to first check if your MQTT server is working correctly. You can test this with a tool such as MQTT explorer.

1 Like

HI Sanderdw,
note that I moved away from the datalogger to the full setup in HA, and that works well for days now without issues… strange :slight_smile:

Hello.
I did a fresh installation of homeassistant en installed this addon DSMR reader.
Everything workes okay but no i want to import the data from a previous installation.

How can i restore my data from a previous installation of the DSMR reader?

Can somebody help me with it?