DSMR Reader Add-on for Home Assistant

Can you make some printscreens so i can see how to do it?
thanks

Step 2 and 3: DSMR Reader - Home Assistant

See also the DSMR Reader docs: Admin: MQTT — DSMR-reader v5 documentation

@sanderdw sinds gisteren krijg ik deze foutmelding.
2023-06-20 11:29:24,665 ERROR mixins run_once 107 | dsmr_datalogger.management.commands.dsmr_datalogger: [!] Exception raised. Traceback (most recent call last):
File “/app/dsmr_backend/mixins.py”, line 96, in run_once
self.run(data=self.data, **options)
File “/app/dsmr_datalogger/management/commands/dsmr_datalogger.py”, line 29, in run
telegram = next(self.telegram_generator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py”, line 51, in read_telegram
raise RuntimeError(
RuntimeError: It took too long to detect a telegram. Check connection params. Bytes currently in buffer: 791
127.0.0.1 - - [20/Jun/2023:11:29:29 +0200] “GET /about HTTP/1.1” 200 16157 “-” “curl/7.83.1” “-”
Starting DSMR Reader - datalogger…
Current logging level set to “ERROR”. More information can be found here: Troubleshooting: Enable DEBUG logging — DSMR-reader v5 documentation

1 Like

With the latest releases of Home Assistant, I’m now seeing this error message in the logs:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:207
Integration: Sensor (documentation, issues)
First occurred: 07:54:02 (1 occurrences)
Last logged: 07:54:02

The dsmr platform for the sensor integration does not support platform setup. Please remove it from your config.

What do I need to do to resolve this issue? Thank you.

Home Assistant 2023.6.3
Supervisor 2023.06.4
Operating System 10.3
Frontend 20230608.0 - latest

my dsmr reader is’nt sending any mqtt messages
the outbox is 5000 message’s but cant delete it.
i have the broker settings right,
installed the dsmr reader addon again but also doesnt help
it looks like there is an bug in the mqtt section

@sanderdw:

Since i updated TimescaleDB to version 3.0.2 i do have the next error in the log off the addon:

" ERROR schedule execute_scheduled_processes 39 | (OSError) dsmr_backup.services.backup.run errored: b’pg_dump: error: server version: 15.3; pg_dump version: 14.5\npg_dump: error: aborting because of server version mismatch\n’ "

Also i do get in DSMR reader the warning:

" Backup creation failed, please check the dsmr_backend logfile ", and there is see in the “configpanel” , “planed process”, “create Daily backup” its trying to make a backup.

Did try to restart both addons and also did try in the “timescaleDB” addon to use the function “retry_ upgrade”. But that also not fixing the problem.

Edit 20-7: Vacuum DB and compleet restart HA system solved the warning “Backup creation failed” in the addon. But still got the other error in the log of the addon for version mismatch. And dont have any backup files from 14-7 from dsmr reader on the drive

3 Likes

Seeing the same behavior here.

HA supervised on Intel machine (No VM’s)

1 Like

I don’t have any issue’s running DSMR Reader Add-on - Release: 1.10.1 with TimescaleDB Add-on - Release: 3.0.2 on a ARM platform (Raspberry PI 4)?

Still issue’s? Maybe check in the Timescale addon thread? Home Assistant Add-on: PostgreSQL + TimescaleDB - #181 by tldp

@sanderdw : Sorry for the late reaction. But holiday and busy. Problem is still there. But i did asked in the requested topic.

1 Like

@sanderdw ,

Every week (since July this year) I get this notification in the DSMR Reader that the backup failed:

“Sept. 18, 2023: Backup creation failed, please check the dsmr_backend logfile.”

When I look in the “Logboek” page of the DSM Reader addon then I repeatively see the following messages:

pg_dump: error: server version: 15.3; pg_dump version: 14.5
pg_dump: error: aborting because of server version mismatch
2023-09-19 16:30:57,071 ERROR schedule execute_scheduled_processes 39 | (AttributeError) dsmr_backup.services.backup.run errored: ‘NoneType’ object has no attribute ‘read’
127.0.0.1 - - [19/Sep/2023:16:31:07 +0200] “GET /about HTTP/1.1” 200 15212 “-” “curl/7.83.1” “-”
127.0.0.1 - - [19/Sep/2023:16:31:22 +0200] “GET /about HTTP/1.1” 200 15212 “-” “curl/7.83.1” “-”

Do you have any clue what the error is about, and what I need to do to get the backup working again?

On the Internet I am reading that this pg_dump error occurs when there is a discrepancy between the pg_dump and server versions. The pg_dump backup tool is designed to work with specific server versions, and if the versions do not match, compatibility issues may occur.
However I have no idea how to solve this.

Thanks, Jeroen.

1 Like

I think the problem is that the DSMR Reader Addon is using too old version of the “pg_dump” backup tool.

Yes could be the case indeed, i will check this later. Don’t have a lot of free time currently because of a newborn son :slight_smile: .

1 Like

2023-09-25: DSMR Reader Add-on v 1.10.2, DSMR-reader v5.10.3
Changelog here

2 Likes

@jcjdammers hould be fixed with the new update (pg_dump updated).

2 Likes

@sanderdw , Many thanks, backup works again after the update. Congrats with your son!

1 Like

Hoi, behoorlijk thuis inmiddels in Home Assistant en wil nu kijken naar dmsr reader. Ik heb de addon, de intergratie en de database geïnstalleerd.

Ik heb een homewizzard P1 wifi meter. Hoe krijg ik nu alles te zien in een leuk dashboard en kan ik het dashboard van Home Assistant met zonnepanelen ook nog gebruiken?

Edit: Ik heb het ip-adres van mijn Home Wizzard P1 ingevuld maar krijg geen data?

Traceback (most recent call last):
  File "/app/dsmr_backend/mixins.py", line 96, in run_once
    self.run(data=self.data, **options)
  File "/app/dsmr_datalogger/management/commands/dsmr_datalogger.py", line 29, in run
    telegram = next(self.telegram_generator)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 43, in read_telegram
    raise RuntimeError("Failed to connect: {}", error) from error
RuntimeError: ('Failed to connect: {}', SerialException('Could not open port socket://localhost:23: [Errno 99] Address not available'))
Starting DSMR Reader - datalogger...
Current logging level set to "ERROR". More information can be found here: https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html
2023-10-03 17:27:19,123 ERROR    mixins       run_once                        107 | dsmr_datalogger.management.commands.dsmr_datalogger: [!] Exception raised. Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/serial/urlhandler/protocol_socket.py", line 63, in open
    self._socket = socket.create_connection(self.from_url(self.portstr), timeout=POLL_TIMEOUT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection
    sock.connect(sa)
OSError: [Errno 99] Address not available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 39, in read_telegram
    serial_handle = serial.serial_for_url(
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/serial/__init__.py", line 90, in serial_for_url
    instance.open()
  File "/usr/local/lib/python3.11/site-packages/serial/urlhandler/protocol_socket.py", line 66, in open
    raise SerialException("Could not open port {}: {}".format(self.portstr, msg))
serial.serialutil.SerialException: Could not open port socket://localhost:23: [Errno 99] Address not available
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/app/dsmr_backend/mixins.py", line 96, in run_once
    self.run(data=self.data, **options)
  File "/app/dsmr_datalogger/management/commands/dsmr_datalogger.py", line 29, in run
    telegram = next(self.telegram_generator)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 43, in read_telegram
    raise RuntimeError("Failed to connect: {}", error) from error
RuntimeError: ('Failed to connect: {}', SerialException('Could not open port socket://localhost:23: [Errno 99] Address not available'))
127.0.0.1 - - [03/Oct/2023:17:27:21 +0200] "GET /about HTTP/1.1" 200 16126 "-" "curl/8.0.1" "-"

Kan iemand me helpen met het koppelen van de Homewizard p1 aan dsmr reader?

Volgens HomeWizard P1 As Remote for DSRM-Reader · Issue #301 · xirixiz/dsmr-reader-docker · GitHub wordt het niet echt ondersteund en zou je iets met aparte scripts moeten gaan doen…

Optie 1 is zelf iets naar API — DSMR-reader v5 documentation sturen.
Optie 2 is iets met die plugin optie doen maar dat ondersteunt de huidige addon niet.

Ik heb besloten de seriele kabel weer te gaan gebruiken en krijg nu data binnen. De reden dat ik deze addon heb geïnstalleerd was omdat ik sinds ik een nieuw Ziggo modem heb mijn meterstand niet meer kon uploaden naar Mindergas.nl. Ik heb mijn token ingevuld in dsmr, maar ook nu wordt er niets geupload, so sadd :cry:

Hello,

I would like to create a (restfull) sensor of the net returned energy for the current energy supplier. (The current year sensors are not suitable because my energy contract does not start at the first of January) In order to do that I need the API documentation. Problem is that when I go to “support” and click on “view API documentation” I get a 401 unauthorized message.

How can can I solve this? Or is there any website where I can find de API docs? Or even better; does anyone have an example for such a sensor?

Thanks