DSMR Reader Add-on for Home Assistant

Any idea on how to move forward? or would the only way be to start a complete new DSMR database?

@sanderdw I haven’t found a solution to the issue mentioned above, do you have any ideas left? or should I just start a new DB?

I really don’t know, as it it only happend to you. It seems you have to verify the owner settings of every table / schema / db etc. Must be a permission issue i would say.

What db user you configured in the ha addon configuration?

Hello,

after yesterdays update of supervisor on HA ( supervisor version 2023.3.1) I have the following error in the supervisor log. It appears multiple times.

DSMR works just fine, but I would like to see the error go away?

Any thougs?

23-03-08 14:30:46 WARNING (MainThread) [supervisor.addons.options] Option 'DSMRREADER_REMOTE_DATALOGGER_MODE' does not exist in the schema for DSMR Reader (0826754b_dsmr_reader)

Hi all,

The P1 port of my meter is already used for a charging point for the car. Is it also possible to use the S1 port with this plugin?

Thanks,
Meerkater

In most situations it is possible, with a simple splitter.

Hallo!

This is kinda new for me, so im just playing around with it. No clue what im doing… so im looking for a beginners tutorial that explains the working of it all to me. Is there someone who can explain me the basic’s? Or send me a tutorial? Doesnt need to be in English, it can also be in Dutch :slight_smile:

Greetings,
Graxo

Gister is helaas mijn oude server overleden. en heb ik alles opnieuw moeten installeren op een nieuwe gelukkig had ik bijna overal backups van zo ook van DSMR-Reader (dropbox)
nu wil ik deze backup terugzetten in deze addon maar ik kom hier helaas niet uit
de eerste stap is alleen al in welke map moet ik mijn backup terugzetten (sql) file en welke commando’s moet ik vervolgens uitvoeren om het te herstellen.
ik heb al verschillende methodes gevonden maar helaas niks helpt mijn kennis is wat dit betreft net te weinig maar wil wel graag mijn oude data terug kunnen krijgen :slight_smile:

is er iemand die een werkende beschrijving heeft hoe ik een backup terug kan zetten

@sanderdw,

I did try to recalculed the prices in DSMR with ./manage.py
But i get the error. Is its because its running in docker?

If it’s not possible, no men overboard :wink:

Thanks in advanced

root@dsmr_reader_docker:/app# ./manage.py dsmr_stats_recalculate_prices                                                                13:14:19 [44/69]
Traceback (most recent call last):                                                                                                                     
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection                                       
    self.connect()                                                                                                                                     
  File "/usr/local/lib/python3.11/site-packages/django/utils/asyncio.py", line 33, in inner                                                            
    return func(*args, **kwargs)                                                                                                                       
           ^^^^^^^^^^^^^^^^^^^^^                                                                                                                       
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 200, in connect                                                 
    self.connection = self.get_new_connection(conn_params)                                                                                             
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                             
  File "/usr/local/lib/python3.11/site-packages/django/utils/asyncio.py", line 33, in inner                                                            
    return func(*args, **kwargs)                                                                                                                       
           ^^^^^^^^^^^^^^^^^^^^^                                                                                                                       
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection                                
    connection = Database.connect(**conn_params)                                                                                                       
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                       
  File "/usr/local/lib/python3.11/site-packages/psycopg2/__init__.py", line 122, in connect                                                            
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: could not translate host name "dsmrdb" to address: Name does not resolve


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/dsmr_stats/management/commands/dsmr_stats_recalculate_prices.py", line 11, in handle
    dsmr_stats.services.recalculate_prices()
  File "/app/dsmr_stats/services.py", line 503, in recalculate_prices
    for current_day in DayStatistics.objects.all():
  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 280, in __iter__
    self._fetch_all()
File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 1324, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 51, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1173, in execute_sql
    cursor = self.connection.cursor() 
             ^^^^^^^^^^^^^^^^^^^^^^^^ 
  File "/usr/local/lib/python3.11/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 259, in cursor
    return self._cursor()
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python3.11/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 218, in ensure_connection
    with self.wrap_database_errors:
  File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.11/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.OperationalError: could not translate host name "dsmrdb" to address: Name does not resolve

hello @sanderdw. Is it possible to use “DSMRREADER_PLUGINS” in the options?

Would like to use it like this example:

DSMRREADER_PLUGINS: dsmr_plugins.modules.poll_homewizard_api

But it does not seem to do anything. Is there something i must first do to get plugins running?

Did you execute “. /cli-helper.sh” first? See the readme.

Sure will add it in the next release.

Thanks @sanderdw . That did the trick indeed. Did not execute that command :wink:

First of all, compliments for this addon. Easy install and great need dashboard. just like @MrBlond i want to see the data in my energy dashboard in HA. So i installed this addon with the tiemscaledb addon and then i add HA integration. I get 81 new entities.

But when i check DSMR reader i see actual usage, costs, etc. But when i check the entities they are all empty. No data is received. When i add the entities in my HA Energy dashboard i get the same as this thread, statistics not defined, entity unavailable. Which step did i forgot?

I use HA OS in a Proxmox VM, USB passtrough, as mentioned, i see actual data in DSMR Reader so the connection and reading from my p1 meter is correct.

Hope someone can point me in the right direction.

Edit: I got it working, with thread post 88 i headed to the right direction. I missed the
Enable the following data sources in the DSMR Reader administration pages with the default mappings:
After seetup mqtt correctly you also need to change some settings in DSMR, cost me a day, but i receiving data in HA. Tomorrow will check if my energy dashboard is filled.

1 Like

I installed it but i can’t start it up.
Do i need to install de data logger also to get it running?
And the postgress database

Hi @Tonnie if you follow the instructions here hassio-addons/README.md at febd41f037d2a3cc2eb4413aef6768bca63bc359 · sanderdw/hassio-addons · GitHub you should be good to go. You don’t need the data logger.

Thanks, i got it running now

only the entitie s from the DSMR reader is still inknown

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