DSMR Reader Add-on for Home Assistant

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

The problem with upgrading the Timescale db is that there’s an entry for dsmrreader missing from the timescal_enabled section of the configuration file…

I have the exact same issue.
Reverting back a version for timescale db addon, fixed it for me…

Have a look at the @gcoupe suggestion and check if the upgrade will complete. Otherwise i would suggest to go to that addon specific thread: Home Assistant Add-on: PostgreSQL + TimescaleDB - #95 by edouardkleinhans

2022-04-19: DSMR Reader Add-on v1.1.2, Faster install time
Note upgrading: Due to technological changes it may be required to uninstall and reinstall the addon again (if “image does not exist” error pops up).
Changelog here

Hi Sander

It’s not clear to me whether uninstalling/reinstalling also deletes historical data.
Can you confirm we can keep the data ?

Thanks

Data is kept as it’s stored in the configured postgres database.

For internal dsmr backups (don’t mean the app backup functionality of HA which works anyway) just make sure step 10 is correctly set to the backup folder: hassio-addons/dsmr_reader at master · sanderdw/hassio-addons · GitHub.

Not sure why uninstalling is needed?
after running docker pull sanderdw/ha-dsmr-reader-amd64:1.1.2
manually trough the cli, the add-on is working fine after the upgrade (worked on 2 installations for me).

In one of my two installations i’m walking into the following problem:

**Too many unprocessed readings: 318** (**47 minutes ago**)

**Day statistics are lagging behind** (**2 weeks, 5 days ago**)

I already tried Docker: (IntegrityError) null value in column "delivered_1" violates not-null constraint · Issue #1288 · dsmrreader/dsmr-reader · GitHub

But the DELETE is returning 0 rows, also SELECT returns 0 rows…

So it seems that DSMR-Reader is trying to continually inserting NULL values, which are not allowed, the TimescaleDB log does confirm that:

2022-04-20 20:29:03.881 UTC [709] STATEMENT:  INSERT INTO "dsmr_consumption_electricityconsumption" ("read_at", "delivered_1", "returned_1", "delivered_2", "returned_2", "currently_delivered", "currently_returned", "phase_currently_delivered_l1", "phase_currently_delivered_l2", "phase_currently_delivered_l3", "phase_currently_returned_l1", "phase_currently_returned_l2", "phase_currently_returned_l3", "phase_voltage_l1", "phase_voltage_l2", "phase_voltage_l3", "phase_power_current_l1", "phase_power_current_l2", "phase_power_current_l3") VALUES ('2022-04-01T19:24:00+00:00'::timestamptz, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) RETURNING "dsmr_consumption_electricityconsumption"."id"
2022-04-20 20:29:34.680 UTC [709] ERROR:  null value in column "delivered_1" of relation "dsmr_consumption_electricityconsumption" violates not-null constraint

Anything else I can try? I’m out of options and spend some hours now :slight_smile: I compared all the GUI settings to my other installation, but there is nothing that comes to mind which is off.

@sanderdw I am receiving the following error:

Starten van de add-on is mislukt
Image sanderdw/ha-dsmr-reader-amd64:1.1.2 does not exist for addon_0826754b_dsmr_reader

What can I do to fix this? Thanks!

1 Like

See my earlier post: DSMR Reader Add-on for Home Assistant - #226 by sanderdw

@sanderdw anything that comes to mind?

Your issue is a specific DSMR software issue. So my advice would be to check it at Issues · dsmrreader/dsmr-reader · GitHub or create an issue there. I’m on holiday so can’t really help out on that kind of specific issues.

1 Like

Got the same issue after upgrading to latest version
U fixed this?
edit: ah indeed, deleting and reinstalling fixed it.

@sanderdw Is it now safe to update the timescale db?
Cause that gave errors earlier

I think people upgraded TimescaleDB with succes, not using it myself so better to ask here for support: Home Assistant Add-on: PostgreSQL + TimescaleDB

But you can safely try. Just shutdown the dsmr addon first to make sure you don’t corrupt the database. Afterwards upgrade TimescaleDB with a backup and see if everything goes well before starting up DSMR again.

That’s more or less what I did recently (second attempt).
I waited for TS 2.0.1 and DSMR add on 1.1.1

I stopped HA (in proxmox, where I took a backup).
Then I upgraded again. Fail.
Restore Proxmox Backup. Up and running again in 5 minutes.

When it involves manual interventions on CLI, i’ll probably never get it to work, since I quickly lose track there. So I’m hoping for an automated solution :slight_smile:

Hi @gcoupe did you fix this?
Still having problems to update

@sanderdw any ideas?
I cant upgrade my timescale db

Try to put all the databases also in the Timescale enabled listing, see Automatic updater is broken - missing libraries · Issue #18 · Expaso/hassos-addon-timescaledb · GitHub

But before you do make sure the DSMR addon is stopped.

1 Like