DSMR Belgian e-MUCS-1 meter, not all channels are updated

Hi,

I have a Belgian DSMR e-MUCS-v1 meter (`device_emucs_v1_0) on OpenHAB2

I have successfully read some of the parameters from the meter but some do not update.

Specifically dsmr:electricity_emucs_v1_0:1:emeter_delivery_tariff1 and dsmr:electricity_emucs_v1_0:1:emeter_delivery_tariff2 do not propagate to connected channels.

I have tried to verify the TRACE output from the DSMR module and I see the following traces pass by:

in Raw data trace:

1-0:1.8.1(001245.117kWh)
1-0:1.8.2(002322.722
kWh)
1-0:2.8.1(002147.160kWh)
1-0:2.8.2(000812.301
kWh)

Which should be the correct OBIS data elements.

In the “supported identifiers” trace I see:

Cosem Object(type:EMETER_DELIVERY_TARIFF1, cosemValues:{=1245.117 kWh}), Cosem Object(type:EMETER_DELIVERY_TARIFF2, cosemValues:{=2322.722 kWh}), Cosem Object(type:EMETER_PRODUCTION_TARIFF1, cosemValues:{=2147.160 kWh}), Cosem Object(type:EMETER_PRODUCTION_TARIFF2, cosemValues:{=812.301 kWh}), Cosem Object(type:EMETER_TARIFF_INDICATOR, cosemValues:{=0002}),

Which I understand to mean they have been correctly parsed

I see things pass by:

22:23:03.169 [TRACE] [ernal.device.cosem.CosemObjectFactory] - Found obisId 1-0:1.8.1 in the dynamic lookup table
22:23:03.172 [TRACE] [ernal.device.cosem.CosemObjectFactory] - Parse values for Cosem Object type: EMETER_DELIVERY_TARIFF1
22:23:03.175 [TRACE] [smr.internal.device.cosem.CosemObject] - Parsing CosemValue string (001245.117*kWh)

22:23:03.179 [TRACE] [smr.internal.device.cosem.CosemObject] - Received items: 1 is supported
22:23:03.182 [TRACE] [al.device.p1telegram.P1TelegramParser] - Adding Cosem Object(type:EMETER_DELIVERY_TARIFF1, cosemValues:{=1245.117 kWh}) to list of Cosem Objects
22:23:03.185 [TRACE] [ernal.device.cosem.CosemObjectFactory] - Received obisIdString 1-0:1.8.2, obisId: 1-0:1.8.2, values: (002322.722*kWh)

But if I look in the “Control” tab of the Paper UI, this “Delivery Tariff 1” (dsmr:electricity_emucs_v1_0:1:emeter_delivery_tariff1) does not change value and remains at -NAN

Does anyone have any suggestion of things to try?

Thank you,

Jove

Did you create the items via paper ui or configuration files?

I have created them via the paper UI.

In OH3 via GUI discovery, I only get 3 channels in thing Elektriciteitsmeter
Piekverbruik
dalverbruik
huidig verbruik

Did you create them manually? Or what did you create? What item? Because if you have no error in your log file it’s not something in the binding, but with the configuration or conversion of channel to item.

@stefaanbolle Did you look at the advanced channels?

Indeed forgot to activate advanced channels, thanks!

I just created Items in the Paper UI “Item” menu and then linked them to the channel.

I have the same problem with dsmr:electricity_emucs_v1_0:1:emeter_production_tariff1 and dsmr:electricity_emucs_v1_0:1:emeter_production_tariff2 but not dsmr:electricity_emucs_v1_0:1:emeter_actual_delivery and dsmr:electricity_emucs_v1_0:1:emeter_actual_production.

I don’t remember how I created the working ones, it’s been a while.

Would upgrading to OH3 help?

What is the dimension value in PaperUI item configuration of the items that work and the once that don’t work? Upgrading won’t necessarily work if it’s not clear what the issue is.

If you use Paper UI : Click “Show advanced” and change the channel :
Channel 1 you can read the gas consumption
Channel 0 for all electricity items

If you like to upgrade to openHAB3 you can follow my steps:

Things, +, dsmr, Slimme meter, ID=Label=Dsmr_SlimmeMeter, Serial=/dev/ttyUSB0
        +, dsmr, click Scan, Gasmeter, Dsmr_Gas
        Dsmr_Gas, Channels, Gasverbruik, Add link to item, create a new item, name=Label=Dsmr_GasMeter, Link

        +, dsmr, click Scan, Elektriciteitsmeter, Dsmr_Elec, Show advanced, channel=0
        Dsmr_Elec, Channels, Show advanced, Elektriciteitsverbruik Piektarief, Add link to item, Create new item, Dsmr_Download_High
                                            Elektriciteitsverbruik Daltarief,                                     Dsmr_Download_Low
                                            Injectie Piektarief                                                   Dsmr_Upload_High
                                            Injectie Daltarief                                                    Dsmr_Upload_Low
                                                                                                                  Dsmr_Download_Actual
                                                                                                                  Dsmr_Upload_Actual

The channels of the items that do not work are Number:Energy and the Items connected are Number. Changing the Items to Number:Energy does not help.

The ones that do work are Number:Power, Number:ElectricCurrent, Number:ElectricPotential and the connected Items are Number.

I have tried to make them match the channel more closely but then something goes wrong with passing them to my main openhab installation over MQTT. Not sure why but keeping them just Number works fine.

Btw, not everything is perfect, I also see:
2021-02-26 00:09:10.575 [TRACE] [rnal.device.cosem.CosemObjectFactory] - Received obisIdString 0-0:17.0.0, obisId: 0-0:17.0.0, values: (999.9*kW)M

2021-02-26 00:09:10.577 [TRACE] [rnal.device.cosem.CosemObjectFactory] - Parse values for Cosem Object type: EMETER_TRESHOLD_A
2021-02-26 00:09:10.578 [TRACE] [mr.internal.device.cosem.CosemObject] - Parsing CosemValue string (999.9*kW)M

2021-02-26 00:09:10.579 [TRACE] [mr.internal.device.cosem.CosemObject] - Received items: 1 is supported
2021-02-26 00:09:10.580 [TRACE] [rnal.device.cosem.CosemObjectFactory] - Failed to construct Cosem Object for type EMETER_TRESHOLD_A, values: (999.9*kW)M

java.text.ParseException: Failed to parse value '999.9kW’ as unit A
at org.openhab.binding.dsmr.internal.device.cosem.CosemQuantity.getStateValue(CosemQuantity.java:106) ~[bundleFile:?]
at org.openhab.binding.dsmr.internal.device.cosem.CosemQuantity.getStateValue(CosemQuantity.java:1) ~[bundleFile:?]
at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:127) ~[bundleFile:?]
at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:164) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:116) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:382) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:414) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parse(P1TelegramParser.java:224) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:74) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:116) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:317) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:276) [bundleFile:?]
at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [bundleFile:?]
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) [bundleFile:3.15.0.OH2]
at gnu.io.RXTXPort.eventLoop(Native Method) [bundleFile:3.15.0.OH2]
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [bundleFile:3.15.0.OH2]
2021-02-26 00:09:10.584 [TRACE] [rnal.device.cosem.CosemObjectFactory] - Parse values for Cosem Object type: EMETER_TRESHOLD_KWH
2021-02-26 00:09:10.586 [TRACE] [mr.internal.device.cosem.CosemObject] - Parsing CosemValue string (999.9
kW)M

2021-02-26 00:09:10.587 [TRACE] [mr.internal.device.cosem.CosemObject] - Received items: 1 is supported
2021-02-26 00:09:10.588 [TRACE] [rnal.device.cosem.CosemObjectFactory] - Found obisId 0-0:17.0.0 in the fixed lookup table
2021-02-26 00:09:10.589 [TRACE] [l.device.p1telegram.P1TelegramParser] - Adding Cosem Object(type:EMETER_TRESHOLD_KWH, cosemValues:{=999.9 kW}) to list of Cosem Objects
2021-02-26 00:09:10.591 [TRACE] [rnal.device.cosem.CosemObjectFactory] - Received obisIdString 1-0:31.4.0, obisId: 1-0:31.4.0, values: (999*A)M

2021-02-26 00:09:10.592 [TRACE] [rnal.device.cosem.CosemObjectFactory] - Parse values for Cosem Object type: EMETER_FUSE_THRESHOLD_A
2021-02-26 00:09:10.593 [TRACE] [mr.internal.device.cosem.CosemObject] - Parsing CosemValue string (999*A)M

But I am not using that channel.

The raw data is:
0-0:96.3.10(1)M
0-0:17.0.0(999.9kW)M
1-0:31.4.0(999
A)M
0-0:96.13.0()M
0-1:24.1.0(003)M

Is there any extra tracing I can enable to debug this?

You can try creating an item in a file. I can only explain this as some mismatch between converting the value from the channel to the item. Maybe there is something wrong with the pattern to format the value.

The exception you see is ok. This is caused because the obisid is not unique. So it tries first an other type channel, and the continues with the correct channel. In the log you can see that after the exception it shows the value again with the correct match.

I have created an item with:

Number:Energy TestItem “TestItem” {channel=“dsmr:electricity_emucs_v1_0:1:emeter_delivery_tariff1”}

but this isn’t automatically linked to the channel, I have to link it explicitly in the UI. In the Paper Control tab, it now appears but it is also NaN.

That is weird it doesn’t link. Maybe the thing is corrupted in the internal database. Maybe recreating the thing does help.

I have tried the following things:

  • upgraded to OH3, I wanted to do that anyway. Didn’t help.
  • deleted the complete Thing, including the Bridge. Reinstalled it all. No change.
  • to be sure. I also deleted the Item, recreated them. No change.

I also changed the definition of my text file Item to:

Number:Energy TestItem “TestItem” {channel=“dsmr:electricity_emucs_v1_0:22e5393c:1:emeter_delivery_tariff1”}

Now, at least, it picks up the binding. Value is still NULL.

The main difference I see now is that my log is full of:

20:45:10.454 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing ‘dsmr:dsmrBridge:22e5393c’ updated: ONLINE

About 1 per second.

Thank you for your help :slight_smile:

I upgraded my tracing ItemStateEvent to TRACE and now I see:

20:57:19.393 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing ‘dsmr:dsmrBridge:22e5393c’ updated: ONLINE
20:57:20.405 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing ‘dsmr:dsmrBridge:22e5393c’ updated: ONLINE
20:57:22.344 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing ‘dsmr:dsmrBridge:22e5393c’ updated: ONLINE
20:57:23.145 [TRACE] [openhab.event.ItemStateEvent ] - Received event of type ‘ItemStateEvent’ under the topic ‘openhab/items/MainElectricityMeter_ActualPowerDelivery/state’ with payload: ‘{“type”:“Decimal”,“value”:“0.328”}’
20:57:23.152 [INFO ] [openhab.event.ItemStateEvent ] - Item ‘MainElectricityMeter_ActualPowerDelivery’ updated to 0.328
20:57:23.160 [TRACE] [openhab.event.ItemStateEvent ] - Received event of type ‘ItemStateEvent’ under the topic ‘openhab/items/MainElectricityMeter_ActualPowerProduction/state’ with payload: ‘{“type”:“Decimal”,“value”:“0.000”}’
20:57:23.167 [INFO ] [openhab.event.ItemStateEvent ] - Item ‘MainElectricityMeter_ActualPowerProduction’ updated to 0.000
20:57:23.174 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘MainElectricityMeter_ActualPowerDelivery’ changed from 0.332 to 0.328
20:57:23.183 [TRACE] [openhab.event.ItemStateEvent ] - Received event of type ‘ItemStateEvent’ under the topic ‘openhab/items/MainElectricityMeter_InstantVoltageL1/state’ with payload: ‘{“type”:“Decimal”,“value”:“231.5”}’
20:57:23.190 [INFO ] [openhab.event.ItemStateEvent ] - Item ‘MainElectricityMeter_InstantVoltageL1’ updated to 231.5
20:57:23.201 [TRACE] [openhab.event.ItemStateEvent ] - Received event of type ‘ItemStateEvent’ under the topic ‘openhab/items/MainElectricityMeter_InstantVoltageL2/state’ with payload: ‘{“type”:“Decimal”,“value”:“234.0”}’
20:57:23.209 [INFO ] [openhab.event.ItemStateEvent ] - Item ‘MainElectricityMeter_InstantVoltageL2’ updated to 234.0
20:57:23.220 [TRACE] [openhab.event.ItemStateEvent ] - Received event of type ‘ItemStateEvent’ under the topic ‘openhab/items/MainElectricityMeter_InstantVoltageL3/state’ with payload: ‘{“type”:“Decimal”,“value”:“230.7”}’
20:57:23.228 [INFO ] [openhab.event.ItemStateEvent ] - Item ‘MainElectricityMeter_InstantVoltageL3’ updated to 230.7
20:57:23.237 [TRACE] [openhab.event.ItemStateEvent ] - Received event of type ‘ItemStateEvent’ under the topic ‘openhab/items/MainElectricityMeter_InstantCurrentL1/state’ with payload: ‘{“type”:“Decimal”,“value”:“0.18”}’
20:57:23.245 [INFO ] [openhab.event.ItemStateEvent ] - Item ‘MainElectricityMeter_InstantCurrentL1’ updated to 0.18
20:57:23.254 [TRACE] [openhab.event.ItemStateEvent ] - Received event of type ‘ItemStateEvent’ under the topic ‘openhab/items/MainElectricityMeter_InstantCurrentL2/state’ with payload: ‘{“type”:“Decimal”,“value”:“0.81”}’
20:57:23.261 [INFO ] [openhab.event.ItemStateEvent ] - Item ‘MainElectricityMeter_InstantCurrentL2’ updated to 0.81
20:57:23.271 [TRACE] [openhab.event.ItemStateEvent ] - Received event of type ‘ItemStateEvent’ under the topic ‘openhab/items/MainElectricityMeter_InstantCurrentL3/state’ with payload: ‘{“type”:“Decimal”,“value”:“1.19”}’
20:57:23.278 [INFO ] [openhab.event.ItemStateEvent ] - Item ‘MainElectricityMeter_InstantCurrentL3’ updated to 1.19

But I do not see any other topics that get posted to and it gets refused because of parsing errors or something.

Any more ideas? :frowning: I don’t know what to try anymore.

I’ve connected Items to each channel and it’s only the channels:

  • emeter_treshold_kw (Number:Power)
  • emeter_tariff_indicator (String)
  • emeter_delivery_tariff1 (Number:Energy)
  • emeter_delivery_tariff2 (Number:Energy)
  • emeter_production_tariff1 (Number:Energy)
  • emeter_production_tariff2 (Number:Energy)

that do not work.

All the others have updating values.

Btw, I saw that your documentation has a ? for your refresh rates. It seems the meter dumps it values once per second.

From the settings of the Thing, I can see both gas and electricity meter on channel 1, the documentation has the channel as 0 for th electricity meter.

I also see the meter dumps 0-0:96.13.0, P1_TEXT_STRING but this does not have a channel?

Deze zijn ook aanwezig maar niet als channel?

1-0:21.7.0(00.013kW)
1-0:41.7.0(00.109
kW)
1-0:61.7.0(00.183kW)
1-0:22.7.0(00.000
kW)
1-0:42.7.0(00.000kW)
1-0:62.7.0(00.000
kW)

Thanks again for your help.