home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.46k stars 29.39k forks source link

No voltage readings in DSMR #81754

Closed markruys closed 11 months ago

markruys commented 1 year ago

The problem

None of the voltage sensors have a value, they are all set to unknown.

Affected sensors:

What version of Home Assistant Core has the issue?

2022.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

dsmr

Link to integration documentation on our website

https://www.home-assistant.io/integrations/dsmr

Diagnostics information

In ./.storage/core.entity_registry I have:

      {
        "area_id": null,
        "capabilities": {
          "state_class": "measurement"
        },
        "config_entry_id": "ee0fc8ab1ef249ee9bc7f89aea7be6fa",
        "device_class": null,
        "device_id": "0a7a29c62e12ffb3ce2908f6c5df78f5",
        "disabled_by": null,
        "entity_category": "diagnostic",
        "entity_id": "sensor.electricity_meter_voltage_phase_l1",
        "hidden_by": null,
        "icon": null,
        "id": "514737599f46cf92b073f4dd634f52ba",
        "has_entity_name": true,
        "name": null,
        "options": {},
        "original_device_class": "voltage",
        "original_icon": null,
        "original_name": "Voltage phase L1",
        "platform": "dsmr",
        "supported_features": 0,
        "unique_id": "<SERIAL_E>_instantaneous_voltage_l1",
        "unit_of_measurement": null
      },

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-11-08 01:30:23.052 DEBUG (MainThread) [dsmr_parser.clients.protocol] got telegram: /XMX5LGBBLB2410064571

1-3:0.2.8(50)
0-0:1.0.0(221108013021W)
0-0:96.1.1(<SERIAL_E>)
1-0:1.8.1(009017.542*kWh)
1-0:1.8.2(007971.072*kWh)
1-0:2.8.1(002340.309*kWh)
1-0:2.8.2(005238.701*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(00.311*kW)
1-0:2.7.0(00.000*kW)
0-0:96.7.21(00017)
0-0:96.7.9(00000)
1-0:99.97.0(0)(0-0:96.7.19)
1-0:32.32.0(00018)
1-0:52.32.0(00020)
1-0:72.32.0(00023)
1-0:32.36.0(00002)
1-0:52.36.0(00001)
1-0:72.36.0(00001)
0-0:96.13.0()
1-0:32.7.0(233.0*V)
1-0:52.7.0(233.0*V)
1-0:72.7.0(232.0*V)
1-0:31.7.0(001*A)
1-0:51.7.0(000*A)
1-0:71.7.0(000*A)
1-0:21.7.0(00.198*kW)
1-0:41.7.0(00.053*kW)
1-0:61.7.0(00.059*kW)
1-0:22.7.0(00.000*kW)
1-0:42.7.0(00.000*kW)
1-0:62.7.0(00.000*kW)
0-1:24.1.0(003)
0-1:96.1.0(<SERIAL_G>)
0-1:24.2.1(221108013004W)(05014.067*m3)
!22BE

2022-11-08 01:30:23.516 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: /
2022-11-08 01:30:23.532 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: XMX5LGBBLB2410064571

1-3:0.2.8(50)

2022-11-08 01:30:23.537 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 0-0:1
2022-11-08 01:30:23.565 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: .0.0(221108013022W)
0-0:96.1.1(<SERIAL_E>)
1-0:1.8.1(009017.542*kWh)

2022-11-08 01:30:23.566 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.582 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:1.8.2(007971.072*kWh)
1-0:2.8.1(002340.309*kWh)

2022-11-08 01:30:23.586 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.602 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:2.8.2(005238.701*kWh)
0-0:96.14.0(0001)

2022-11-08 01:30:23.606 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.622 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:1.7.0(00.311*kW)
1-0:2.7.0(00.000*kW)

2022-11-08 01:30:23.627 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 0-0:96.7
2022-11-08 01:30:23.643 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: .21(00017)
0-0:96.7.9(00000)

2022-11-08 01:30:23.646 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.662 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:99.97.0(0)(0-0:96.7.19)
2022-11-08 01:30:23.678 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 
1-0:32.32.0(0001
2022-11-08 01:30:23.694 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 8)
1-0:52.32.0(00020)

2022-11-08 01:30:23.696 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.712 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:72.32.0(00023)
1-0:32.36.0(00002)

2022-11-08 01:30:23.716 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.732 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:52.36.0(00001)
1-0:72.36.0(00001)

2022-11-08 01:30:23.737 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 0-0:96.1
2022-11-08 01:30:23.753 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 3.0()
1-0:32.7.0(233.0*V)

2022-11-08 01:30:23.756 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.772 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:52.7.0(233.0*V)
1-0:72.7.0(232.0*V)

2022-11-08 01:30:23.776 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.792 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:31.7.0(001*A)
1-0:51.7.0(000*A)

2022-11-08 01:30:23.796 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.811 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:71.7.0(000*A)
1-0:21.7.0(00.198*kW)

2022-11-08 01:30:23.816 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.832 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:41.7.0(00.053*kW)
1-0:61.7.0(00.059*kW)

2022-11-08 01:30:23.837 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.851 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:22.7.0(00.000*kW)
1-0:42.7.0(00.000*kW)

2022-11-08 01:30:23.856 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 1
2022-11-08 01:30:23.872 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: -0:62.7.0(00.000*kW)
0-1:24.1.0(003)

2022-11-08 01:30:23.876 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 0-1
2022-11-08 01:30:23.892 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: :96.1.0(<SERIAL_G>)

2022-11-08 01:30:23.897 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 0-1
2022-11-08 01:30:23.912 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: :24.2.1(221108013004W)(05014.067*m3)

2022-11-08 01:30:24.036 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: !334
2022-11-08 01:30:24.053 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 8

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @robbie1221, @frenck, mind taking a look at this issue as it has been labeled with an integration (dsmr) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `dsmr` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign dsmr` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


dsmr documentation dsmr source (message by IssueLinks)

Marcoevich commented 1 year ago

Following. I seem to have the same issue

joostvandereijk commented 1 year ago

I have the same issue. I have heard rumors that it may be an issue with the meter itself: it does not transmit all values through the P1 Port. This is said to be an issue with specific brands and types of meters. I have a Kaifa Ma304C

pieter-1978 commented 1 year ago

I have the same issue here. The P1 meter is fine as I also use it for Domoticz and there I can see voltage and actual power consumption for each phase(have a dsmr5)

markruys commented 1 year ago

We should check that the DSMR plugin is properly configured wrt the DSMR version.

In .storage/core.config_entries I find:

      {
        "entry_id": "ee0fc8ab1ef249ee9bc7f89aea7be6fa",
        "version": 1,
        "domain": "dsmr",
        "title": "P1",
        "data": {
          "port": "/dev/ttyUSB0",
          "dsmr_version": "4",
          "serial_id": "4530303336303033373839373338373136",
          "serial_id_gas": "4730303332353635353437373337393137",
          "protocol": "dsmr_protocol"
        },
        "options": {
          "time_between_update": 10
        },
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": "4530303336303033373839373338373136",
        "disabled_by": null
      },

But the meter installed produces DSMR 5.0 telegrams (OBIS code 1-3:0.2.8 shows 50):

1-3:0.2.8(50)

So I stopped HA, edited .storage/core.config_entries and changed dsmr_version from 4 to 5, started HA again. And now yes, I do get voltage readings. Not sure if this is the correct way, but it works so far.

Guess we can close this ticket.

pieter-1978 commented 1 year ago

@markruys , good to hear you could solve it. However i am just an amateur user and already happy I get everything up and running. I guess that if changes are required in the "core.config_entries" file that the integration itself needs to be modified/fixed? I mean it is not "normal" to make changes to this file is it?

I tried to locate this file but somehow not able to find it. during the configuration of the integration I did select dsmr5 but I do not know if the integration made the correct settings

if you have any advice I am open for it,

thanks

markruys commented 1 year ago

In that case your best try would try to remove the DSMR integration and reinstall it again, making sure you select the correct DSMR version during the setup process. What I did is undocumented and might have site effects (although it does seem to work as expected),

joostvandereijk commented 1 year ago

I removed the DSMR Integration and re-installed it, making sure I selected version 5. It still does not work so I will try to edit the YAML.

I can see in the Config file the DSMR version is set to 5; all the other settings are equal. Still no voltages...
dupondje commented 1 year ago

The entity in the bugreport is not from dsmr but from p1_monitor it seems?

nielsvlaarhoven commented 1 year ago

@markruys , good to hear you could solve it. However i am just an amateur user and already happy I get everything up and running. I guess that if changes are required in the "core.config_entries" file that the integration itself needs to be modified/fixed? I mean it is not "normal" to make changes to this file is it?

I tried to locate this file but somehow not able to find it. during the configuration of the integration I did select dsmr5 but I do not know if the integration made the correct settings

if you have any advice I am open for it,

thanks

when you browse to the folder use //"ip-address of your HA installation" and log in with your credentials the .storage/xxx are hidden folders If you use a windows browser check the checkbox "hidden folders" on the top of your browser and you will see the folder. My advice would be downloading notepad++ and edit it with this program. I checked my config and it already has DSMR version 5, still no voltage readings.

joostvandereijk commented 1 year ago

The cause of my problem is clear. It is not a HA issue. The Smart Meter in my Home is a Kaifa MA304C, which uses DSMR 4.2.2. The DSMR 4.2.2. protocol does not specify actual voltages.

JvdW58 commented 1 year ago

I have the same problem (meter is Kaifa Ma304C) It did work on Domoticz, so it should on HA.

mrboogiee commented 1 year ago

Same here with a Kaifa E0060 in which the logging does show the voltages etc.:

2023-06-07 10:33:51.080 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data: 30607103009S)(04109.859*m3)
!F199
2023-06-07 10:33:51.082 DEBUG (MainThread) [dsmr_parser.clients.protocol] got telegram: /KFM5KAIFA-METER
1-3:0.2.8(50)
0-0:1.0.0(230607103350S)
0-0:96.1.1(<serial-E>)
1-0:1.8.1(006227.043*kWh)
1-0:1.8.2(002758.767*kWh)
1-0:2.8.1(000366.569*kWh)
1-0:2.8.2(000834.455*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(00.470*kW)
1-0:2.7.0(00.000*kW)
0-0:96.7.21(00016)
0-0:96.7.9(00006)
1-0:99.97.0(6)(0-0:96.7.19)(230119134337W)(0000013334*s)(221213145808W)(0000020059*s)(221213083850W)(0000005910*s)(221213065520W)(0000000187*s)(221213065209W)(0000007332*s)(221213044953W)(0000000825*s)
1-0:32.32.0(00080)
1-0:52.32.0(00058)
1-0:72.32.0(00047)
1-0:32.36.0(01776)
1-0:52.36.0(00547)
1-0:72.36.0(00057)
0-0:96.13.0()
1-0:32.7.0(241.6*V)
1-0:52.7.0(239.5*V)
1-0:72.7.0(234.4*V)
1-0:31.7.0(000*A)
1-0:51.7.0(000*A)
1-0:71.7.0(001*A)
1-0:21.7.0(00.143*kW)
1-0:41.7.0(00.000*kW)
1-0:61.7.0(00.323*kW)
1-0:22.7.0(00.000*kW)
1-0:42.7.0(00.000*kW)
1-0:62.7.0(00.000*kW)
0-1:24.1.0(003)
0-1:96.1.0(<serial-G>)
0-1:24.2.1(230607103009S)(04109.859*m3)
!F199
mrboogiee commented 1 year ago

just had a look at the used dsmr module (https://github.com/ndokter/dsmr_parser/blob/master/dsmr_parser/obis_references.py) and the regex seems to be correct there for at least INSTANTANEOUS_VOLTAGE_L1 = r'^\d-\d:32\.7\.0.+?\r\n' (only issue I had was that my mac doesn't do \r\n but only \n at line end but the regex itself is valid).

mrboogiee commented 1 year ago

I've just found my issue, the entities were added as disabled. Enabling the sensor by clicking on the item, clicking the cog and clicking on the "Enable" link in the top right corner of the popup populated the data

issue-triage-workflows[bot] commented 11 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

RogMoe commented 11 months ago

Same here. Landis+Gyr ZMF110CCtFs2, v 4.2 No voltage either. Checked installing all different versions but none give voltage. Other values ok. All entities enabled etc. Update all HAos.

Tried Arduino and that gives ALL possible values, incl voltage... So, must be the parser.

1-3:0.2.8(42) 0-0:1.0.0(230919091451S) 0-0:96.1.1(4530303330303033313232383638363135) 1-0:1.8.1(016243.709*kWh) 1-0:1.8.2(011563.284*kWh) 1-0:2.8.1(003846.678*kWh) 1-0:2.8.2(008737.106*kWh) 0-0:96.14.0(0002) 1-0:1.7.0(00.123*kW) 1-0:2.7.0(00.249*kW) 0-0:96.7.21(00007) 0-0:96.7.9(00011) 1-0:99.97.0(10)(0-0:96.7.19)(230705102510S)(0000003889*s)(230412090056S)(0000001983*s)(210905122048S)(0000000220*s)(201103094822W)(0000004502*s)(191220003234W)(0000004789*s)(190308150636W)(0000000323*s)(170504154151S)(0000003424*s)(170420152550S)(0000001116*s)(170102042206W)(0000000193*s)(160623160108S)(0000001173*s) 1-0:32.32.0(00001) 1-0:52.32.0(00000) 1-0:72.32.0(00000) 1-0:32.36.0(00000) 1-0:52.36.0(00000) 1-0:72.36.0(00000) 0-0:96.13.1() 0-0:96.13.0() 1-0:31.7.0(001*A) 1-0:51.7.0(000*A) 1-0:71.7.0(001*A) 1-0:21.7.0(00.075*kW) 1-0:41.7.0(00.048*kW) 1-0:61.7.0(00.000*kW) 1-0:22.7.0(00.000*kW) 1-0:42.7.0(00.000*kW) 1-0:62.7.0(00.249*kW) !77C6

dupondje commented 11 months ago

Tried Arduino and that gives ALL possible values, incl voltage... So, must be the parser.

And what value would represent the voltage here?

RogMoe commented 11 months ago

Should be 1-0:32 1-0:52 and 1-0:72 How come an Arduino can show the data and yours doesn't?

dupondje commented 11 months ago

Should be 1-0:32 1-0:52 and 1-0:72 How come an Arduino can show the data and yours doesn't?

If the P1 data does not give it (according to the output you pasted), then it's hard to show it of course. Can you get some P1 frame from the Arduino for example?

RogMoe commented 11 months ago

Can't find the previuous cable with opto no longer. Comes to mind that Liander changed my meter pre corona. Maybe I have a different dsmr version now? I was looking for voltage to see if it's stable in this neighbourhood. 4.2 specifies NO voltage. Why?

dupondje commented 10 months ago

Please read the specs of the digital meter you have. If it doesn't provide you the values for voltage, it's impossible to read them of course.