DSMR Reader Add-on for Home Assistant

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?

I just did a fresh installation of this add-on and it works nicely it seems, thanks for developing and maintaining this!

I have a question: can I also reach the ‘normal’ Web UI? What would be the default webserver port? Or does it only run within HA?

Also: would it be beneficial to setup the DSMR Reader Dropbox backup? Or is the database part of the complete HA backup? I am using the TimescaleDB Add-on.

Sorry for the noob questions.

Edit: by the way, can I just remove the homeassistant db that TimescaleDB creates by default? I don’t use that as of yet…

2022-10-03: DSMR Reader Add-on v1.8.0, DSMR-reader v5.8
Changelog here

The new release should fix the failing update check :slight_smile: .

Yes you can reach the direct UI by setting webserver to ‘Standard’ and under 'Network", show disabled ports, and put a port (ex 7777) there. After this you can go to http://yourha:7777 in your browser and you should see the DSMR Reader UI. But be aware that this disables Ingress support.

Regarding the backup question, all the data is in the DB you are using. So if you want backups of your data, either backup the database or use the Dropbox backup options.

Not sure if you can remove the homeassistant db. For specific questions arround TimescaleDB you can ask them here: https://community.home-assistant.io/t/home-assistant-add-on-postgresql-timescaledb/

1 Like

Hey @sanderdw ,

I did mentioned this a few days ago. I don’t know if it’s you can help me or I have to be at Dennis.

I do have this warning in the addon. And if I see at retention data rotation. It’s in the settings on “a month”. And if i see at “geplande processen” then I see “nu”. And if i see inside the “retention data rotation” I can change date and time. If I do that, the message is gone for a while. And when the time is paste, I get the message again.

How can i fix this?

Regards,
Marco

I noticed there is an update of DMSR Reader (5.9) is it safe to update the dsmr-reader myselve following the tutorial: Updating DSMR-reader — DSMR-reader v5 documentation

Or must I wait to when the hass addon is updated?

2022-12-03: DSMR Reader Add-on v1.9.0, DSMR-reader v5.9
Changelog here

1 Like

Problem “solved”.

Vacuum timescale db with pgadmin.
And the error was gone. Was a bit of scared to do this, because it’s a db for dsmr. But did made a backup. And also I remember that dsmr has also his own db. So al history data was save. Timescale did shrink from >500mb to 50mb :joy:

And thanks for the new update @sanderdw. Works great :ok_hand:t2:

1 Like

It may be coincidence, but I’ve just upgraded my HA OS to version 9.4, and now the DSMR Reader add-on (version 1.9.0) is no longer working. It crashes every time I restart it.

image