DSMR integration question, TWO digital meters

Hello,

I dont realy know where to put this, I dont see a seperate support forum for this specific integration.

This is about the DSMR “slimme meter” digital electric meter used in the netherlands and Belgium.
https://www.home-assistant.io/integrations/dsmr

I have TWO of these meters (one for normal single use (enkelvoudig tarief) and one for pure night (accumulation heating) , the one for pure night only gets power when the grid switches after 23.00 at night.

I can not find a way to integrate BOTH of them, I can get them both to work, but since all the sensors and stuff are named exactly the same, it just keeps overwriting the data , I need a way to give a specific meter that is connected to a specific USB port a different name so I can differentiate between power usages and other info off both these meters.

anyone know of a way to do this ??

because I can assign the needed/used USB port but that just to get it working, I cant seem to use that to give them seperate names ??
(home assistant also only finds TWO integrations, the power and the gass meter from ONE meter, it should find 4 if it would see a difference between the two meters)

Any help is appreciated,

thank you,

Hans

Reading the code of the integration, it didn’t have the case of having 2 DSMR in mind, indeed.
It generates proper unique ID’s, though, apparently, so you should be able to rename the entities, don’t you?

hello,

Could you please tell me more how I could do this ??

I think there is a bigger problem for using them at the same time tho because in configuration.yaml I can only specify a port ONE time, so I dont see a way of using both at the same time ??

So maybey it is possible to rename the entities so they dont overwrite each other, but that would still not fix the fact I cant read both meters at the same time without switching the hardware or changing the USB port in configuration.yaml

A fix for this would be I think the ability to specify a meter name and a specific port for that meter, than appending something to the entities that get created name wise.

But im afread that would have to be added to the integration itself ?

Gues I have to put in a feature request somewhere ??
Can anyone tell me how I can do that for the specific integration so the people maintaining it can take a look ?

You lost me. You said that the entities “overwrite each other”, so I assumed you already have both configured.

Doesn’t, something like this work?

sensor:
  - platform: dsmr
    port: /dev/ttyUSB0
    dsmr_version: 5
  - platform: dsmr
    port: /dev/ttyUSB1
    dsmr_version: 5

Ah,

When I put it in like that it seems to just take the first one it finds (in this case the one on USB0) and just gives uses those,

Where dit you see it should create entities with unique id’s ??

I gues there is no way to install the same integration twice ? (with maybey other name ?)

As far as I can tell from the code, it should work, but I can’t be 100% sure.
You don’t have any messages in the log?

Hello,

I switched my log to debug mode, but most I found when I search on DSMR

2021-06-22 14:38:03 INFO (MainThread) [homeassistant.setup] Setting up dsmr
2021-06-22 14:38:03 INFO (MainThread) [homeassistant.setup] Setup of domain dsmr took 0.0 seconds

2021-06-22 14:38:06 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.dsmr
2021-06-22 14:38:06 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.dsmr

2021-06-22 14:38:06 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.dsmr

2021-06-22 14:38:06 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data:   NUL NUL

and for the rest setting up of the components and sending the actual telegrams with information about the meter.

2021-06-22 14:38:08 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: /FLU5\253769484_A

0-0:96.1.4(50215)
0-0:96.1.1(3153414733313030303834363537)
0-0:1.0.0(210622143811S)
1-0:1.8.1(002925.783*kWh)
1-0:1.8.2(004608.337*kWh)
1-0:2.8.1(004076.921*kWh)
1-0:2.8.2(001441.673*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(00.621*kW)
1-0:2.7.0(00.000*kW)
1-0:21.7.0(00.098*kW)
1-0:41.7.0(00.000*kW)
1-0:61.7.0(00.971*kW)
1-0:22.7.0(00.000*kW)
1-0:42.7.0(00.448*kW)
1-0:62.7.0(00.000*kW)
1-0:32.7.0(237.3*V)
1-0:52.7.0(235.4*V)
1-0:72.7.0(237.6*V)
1-0:31.7.0(000.44*A)
1-0:51.7.0(002.11*A)
1-0:71.7.0(004.31*A)
0-0:96.3.10(1)
0-0:17.0.0(999.9*kW)
1-0:31.4.0(999*A)
0-0:96.13.0()
!2347

/FLU5\253769484_A is my internal electric meter unique number, so if we could get the information from BOTH meters somehow, and than assign all the components to one specific fysical meter, that would be the solution, but im guesing that would mean soms serious re-write of the integration :§

Maybe it’s worth waiting until 23:00, to see if the “night” one gets populated?

Good Idea,

How exactly should I try to rename all the sensors than so if it works and I do see two meters tonight that I know what meter is witch one ?
(should they show up double but with different unique id’s ??)

As far as I can tell, you would see twice the sensors with the same name, but HA knows they are different thanks to the (hidden) unique id.

You just click an a entity to rename it

Awesome , im learning something new every day :slight_smile:

I will update this post tomorow when I try after 23.00

Thank you,

Hans

Hello,

Just tried it, no second meter or extra integrations show up,
also just to be sure rebooted the home assistant to see if it finds the meter that now is also powered on, but still it will only detect the meter that is connected to the first one in the configuration.yaml (on the USB0 in this case)

So I am afread we do need a re-write of the addon/integration to make it compatible with 2 or more meters.

What is the best and most efficiënt way to request that feature for this integration ? I dident realy see an option to post something that goes specific to the maintainers of the integration.

thank you in advance,

Hans