Support for Dutch Smart Meter

Hi, still quite new to all this, but having am issue that I cannot solve and seems to be completely ignored in this post a few time.
How do i install the DSMR-parser within Hass.IO on a Raspberry 3+.
As you all most likely know, git will not work within Haas.IO, so what am I missing here?


You can simply install and configure the DSMR sensor:

1 Like

I have seen this page, but it does not tell me how to install it. I refers to all sorts of info that apparently for many persons is enough info as they all know, but for me it is still a puzzle.

Assuming you have a serial to usb cable connected to the pi and your smart meter all you need to do is copy the first example to your config file. You should of course first determine port and dsmr version.

Look at my config for an example. Link is in my profile.

Thanks, working now. Was under the impresion that I actually needed to install the dsmr-parser. Was just a matter of properly setting it up in my sensor yaml file, removing a - fixed the problem. Quit sensitive in formatting…

true! I’ve spend hours on correct syntax for al kinds of things. Part of the process I guess, just like programming in java/python etc.
One comma or quote on the wrong location and your whole code is broken.

Thank god for git where you can check in all your changes working versions before you continue tinkering on your own home assistant setup.

Yes, finally. I installed Domoticz on my Pi and installed the EPS8266 P1 Gateway using In Domoticz I set up MQTT. In HA I have two MQTT sensors listening to both the electricity and gas sensors from Domoticz. Works like a charm:)

I bit over the top right? you can use the DSMR sensor in HA without setting up domoticz only for DSMR support? Or does this solution give you some other benefits I’m missing?

When using an ESP you even don’t need the DSMR component. Tasmota can do the decoding for you and send MQTT messages. Checkout

Have fun!

Can you share your file? please?

Thanks already

When I use the DSMR sensor, my whole HA freezes after a day or two. I’ve already tried all suggestions in this thread, so I am glad it finally works:)

hmm I don’t have any freezing issues with my HA and DSMR (v5) running in docker on raspberry pi 3b+

After trying Domoticz and Openhab ended by Home Assistant and I love it, easy in use, flexible, nice UI and running perfect on my Synology NAS in docker. Connected to P1 of Kaifa MA105A, and it shows all the data. Tha all sounds perfect, BUT (as some people already mentioned) I want to see daily (weekly) usage/production (Domoticz did it out of the box). Anyone achieved it? Can it be done by some script/rule, so on every event something like “todayUsage = eventT1 - usageT1[] + eventT2 - usageT2[]” and store it somewhere? sorry I am new in HA and don’t have python knowledge :smiley:

I use the sqlite sql sensor for this

- platforms: sql
  - name: energy_consumption
    query: >
      SELECT SUM(state) AS 'value'
      FROM (
        SELECT ROUND(MAX(state) - MIN(state),3) AS state
        FROM states
        WHERE (entity_id = 'sensor.power_consumption_low' or entity_id = 'sensor.power_consumption_normal')
        AND state != 'unknown'
        AND state != ''
        AND DATE(last_updated) = DATE('now')
        GROUP BY entity_id
    column: 'value'
    unit_of_measurement: 'kWh'

I use influxdb and grafana for long term statistics but the solution is far from perfect. Domoticz had a great history view of powerusage (also from powersockets).

I use influxdb as the default history database is inefficient and crashing HA if you store more than a few days of data in it. Even if you setup mysql or mariadb as external database.

I created three separate sensors to store the 00:00 values of energy low/high and gas usage to calculate/show the daily usage.
found the setup in this topic:

so you store all events in SQL database and then just query sum for all events of today? I hoped it can be done without external database. Is it limitation of HA or component? In other words can we create feature request in components repo so they can implement it?

This is the standard hass recorder db. I don’t log it into influx, only the dmsr values. I needed this for the lovelace power wheel card.

There is just a simple calculation, max minus min consumption for that day so no sum of all states as you record the total power you used untill then.

You can always request new features. If there is a big community supporting that request chance is higher that it will be implemented soon. Or you need a Dutch developer who likes the idea and develops it just for us people who have a smart meter.

I used your link to implement it, it works, but that is not just a simple calculation of available sensors/variables. You need to create new variables, add automation rules etc. It should be working out of the box. And as I can read on blogs and forums everyone is asking for that feature (also OpenHab users struggling with this, because it is missing there as well). And I think it can be quite easy implemented inside component.

I was referring to the sql server sensor from ViperRNMC (the message you were replying to).

I agree though that current implementation is far from perfect.