DSMR Reader Add-on for Home Assistant

I tried to go back to 1.1.6. But it looks like there is something corrupted. If I go back, the timescale addon crashes and because of that the dsmrreader won’t start. Even tried restoring days back…same issue with the timescaledb addon, it keeps crashing.

I didn’t try restoring the 1.1.6 backup but I stopped DSMR, deinstalled TimescaleDB, installed TimescaleDB v2.0.0, started DSMR again, lost (of course) all my data and had to reconfigure DSMR. All is working now, but also had these backup errors in DSMR, so disabled backup. It seems stable right now, hope DSMR will be fixed to allow backups…

1 Like

Indeed, runs stable. Also hoping the backup will be fixed in the future

Yes, backup for postgres 14 servers (such as TimescaleDB v2.0.0) will be fixed in the next release.

I’m back on TimescaleDB 1.1.6 now as I wrote earlier.
What are the safe steps for upgrading to Timescale 2.x.x ?

1° wait until Timescale 2.0.1 is out (normally I never install a .0 but I forgot to uncheck autoupdate)
2° wait until the DSMR Reader Add-on is updated
make changes before updating, but what changes do I have to make ?

For support regarding upgrading TimescaleDB and the databases you can go to that addon specific thread: Home Assistant Add-on: PostgreSQL + TimescaleDB - #95 by edouardkleinhans

So if you have problems upgrading would suggest to stay at the old TimescaleDB version for now.

The next update for this addon will only make sure Postgres 14 versions are supported.

Edit:
2022-04-02: DSMR Reader Add-on v1.1.1, Support for PostgreSQL 14
Changelog here

1 Like

I updated the DSMR Reader to version 1.1.1 yesterday, and now there’s a problem. I’m getting these errors in the log:

22-04-04 09:20:58 INFO (SyncWorker_6) [supervisor.docker.addon] Starting Docker add-on 0826754b/aarch64-addon-dsmr_reader with version 1.1.0
22-04-04 09:21:58 WARNING (MainThread) [supervisor.misc.tasks] Watchdog found a problem with 0826754b_dsmr_reader!
22-04-04 09:21:58 WARNING (MainThread) [supervisor.addons.options] Option 'DATALOGGER_MODE' does not exist in the schema for DSMR Reader (0826754b_dsmr_reader)
22-04-04 09:21:58 WARNING (MainThread) [supervisor.addons.options] Option 'DATALOGGER_SERIAL_PORT' does not exist in the schema for DSMR Reader (0826754b_dsmr_reader)
22-04-04 09:21:58 WARNING (MainThread) [supervisor.addons.options] Option 'DATALOGGER_INPUT_METHOD' does not exist in the schema for DSMR Reader (0826754b_dsmr_reader)
22-04-04 09:21:58 WARNING (MainThread) [supervisor.addons.options] Option 'DATALOGGER_SERIAL_BAUDRATE' does not exist in the schema for DSMR Reader (0826754b_dsmr_reader)
22-04-04 09:21:58 WARNING (MainThread) [supervisor.addons.options] Option 'DATALOGGER_NETWORK_HOST' does not exist in the schema for DSMR Reader (0826754b_dsmr_reader)
22-04-04 09:21:58 WARNING (MainThread) [supervisor.addons.options] Option 'DATALOGGER_NETWORK_PORT' does not exist in the schema for DSMR Reader (0826754b_dsmr_reader)
22-04-04 09:21:58 WARNING (MainThread) [supervisor.addons.options] Option 'DATALOGGER_SLEEP' does not exist in the schema for DSMR Reader (0826754b_dsmr_reader)

I have reverted back to version 1.1.0, but these errors are still showing up, and the web page simply shows “192.168.178.148 refused to connect” (the URL is 192.168.178.148:8123/dmsr).

Any suggestions? Thanks.

Go to the addon “Configuration” tab and next to “Options” choose “Reset to defaults” (Not the one below “Network”) and apply your settings again.

I’ve done that, and tried both restarting HA, and then rebooting the Host, but the errors persist I’m afraid…

Hi sanderdw

I have the same errors. When I choose “Reset to defaults” I want to save these settings, but “save” remains greyed out. So I assume that I’m using the default settings. (nothing visually changes when clicking reset). The errors remain.

Yves

Can you try to uninstall the addon and reinstall it again?

Which hardware are you using?

Just flip a setting, save, flip it back and save again?

Will do. I’m using a RPi4 and a USB SSD to hold HA and data.

I went to Uninstall the add-on, and noticed a “Rebuild” button. Should I try that first?

No, uninstall and reinstall :nerd_face:

Done that, but still the same errors. I notice in the DSMR log that it can’t connect to the database?

[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... [ INFO ] Home Assistant Add-on release: 1.1.1 [ INFO ] Home Assistant Add-on: This addon is the latest version [ INFO ] Configuring Home Assistant Addon options [cont-init.d] 01-set-hassio-vars: exited 0. [cont-init.d] 10-adduser: executing... ------------------------- User UID: 0 User GID: 0 ------------------------- [cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-set-app-defaults: executing... [ INFO ] DSMR Reader release: 5.1.0 [ INFO ] DSMR Reader Docker release: 2022.04.01 [ INFO ] Ensure permissions... [ INFO ] Setting architecture requirements... [ INFO ] ARM Architecture [ INFO ] Enabling IFrame... [ INFO ] Fixing /dev/ttyUSB* security... chmod: changing permissions of '/dev/ttyUSB0': Read-only file system [ INFO ] Verifying if the DSMR web credential variables have been set... [ INFO ] Verifying database connectivity to host: 77b2833f-timescaledb with port: 5432... Testing database connectivity: 1 second(s) of 30 seconds... Testing database connectivity: 2 second(s) of 30 seconds... Testing database connectivity: 3 second(s) of 30 seconds... Testing database connectivity: 4 second(s) of 30 seconds... Testing database connectivity: 5 second(s) of 30 seconds... Testing database connectivity: 6 second(s) of 30 seconds... Testing database connectivity: 7 second(s) of 30 seconds... Testing database connectivity: 8 second(s) of 30 seconds... Testing database connectivity: 9 second(s) of 30 seconds... Testing database connectivity: 10 second(s) of 30 seconds... Testing database connectivity: 11 second(s) of 30 seconds... Testing database connectivity: 12 second(s) of 30 seconds... Testing database connectivity: 13 second(s) of 30 seconds... Testing database connectivity: 14 second(s) of 30 seconds... Testing database connectivity: 15 second(s) of 30 seconds... Testing database connectivity: 16 second(s) of 30 seconds... Testing database connectivity: 17 second(s) of 30 seconds... Testing database connectivity: 18 second(s) of 30 seconds... Testing database connectivity: 19 second(s) of 30 seconds... Testing database connectivity: 20 second(s) of 30 seconds... Testing database connectivity: 21 second(s) of 30 seconds... Testing database connectivity: 22 second(s) of 30 seconds... Testing database connectivity: 23 second(s) of 30 seconds... Testing database connectivity: 24 second(s) of 30 seconds... Testing database connectivity: 25 second(s) of 30 seconds... Testing database connectivity: 26 second(s) of 30 seconds... Testing database connectivity: 27 second(s) of 30 seconds... Testing database connectivity: 28 second(s) of 30 seconds... Testing database connectivity: 29 second(s) of 30 seconds... Testing database connectivity: 30 second(s) of 30 seconds... [ FAIL ] Database connectivity couldn't be verified! Please verify your settings. Exiting... [cont-init.d] 20-set-app-defaults: 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.

Correction, the Supervisor log now just shows:

22-04-04 11:33:56 INFO (SyncWorker_4) [supervisor.docker.addon] Starting Docker add-on 0826754b/aarch64-addon-dsmr_reader with version 1.1.1
22-04-04 11:37:18 ERROR (SyncWorker_7) [supervisor.docker.interface] Container addon_0826754b_dsmr_reader is not running

OK, something seems to be wrong with the Timescale DB…

[11:40:25] NOTICE: Upgrading databases..
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for system-defined composite types in user tables  ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for user-defined encoding conversions              ok
Checking for user-defined postfix operators                 ok
Creating dump of global objects                             ok
Creating dump of database schemas
  dsmrreader
  homeassistant
  postgres
  template1
                                                            ok
Checking for presence of required libraries                 fatal
Your installation references loadable libraries that are missing from the
new installation.  You can add these libraries to the new installation,
or remove the functions using them from the old installation.  A list of
problem libraries is in the file:
    loadable_libraries.txt
Failure, exiting
[11:40:37] ERROR: PostgreSQL could not upgrade! Please inspect any errors in the lines above!
[11:40:37] ERROR: Upgrade was not succesfull.
[cont-init.d] init.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

That’s indeed an other problem, look at my comment earlyer: DSMR Reader Add-on for Home Assistant - #208 by sanderdw

Yup. reinstalled version 1.1.6 from a backup and now running with DSMR 1.1.0. I’ll wait until the issues have been sorted before upgrading. Thanks for your help.

You should be able to safely upgrade to the DSMR Addon 1.1.1 though.

1 Like