Smartmeter: How to get Wh instead of kWh

I’m using smartmeter to read the values from electric meter.
I get the values in kWh. Is there a way to get the values in Wh? I tried Type 1-0_1-8-0 : 1-0_1-8-0_255 but it doesn’t work.

Also the current power in W doesn’t work.

my things file is…

smartmeter:meter:power     [port="/dev/strom", refresh=60, mode="SML"] {
    Channels:
        // Summe Wirkenergie Verbrauch Tarife T1 + T2 [kWh]
        Type 1-0_1-8-0 : 1-0_1-8-0
        // Summe Wirkenergie Verbrauch Tarife T1 + T2 [Wh]
        //Type 1-0_1-8-0 : 1-0_1-8-0_255
        // Momentane Leistung [W] 
        Type 1-0_16-7-0 : 1-0_16-7-0
        // Momentane Leistung Phase L1 [W] 
        Type 1-0_36-7-0 : 1-0_36-7-0
        // Momentane Leistung Phase L2 [W] 
        Type 1-0_56-7-0 : 1-0_56-7-0
        // Momentane Leistung Phase L3 [W] 
        Type 1-0_76-7-0 : 1-0_76-7-0
        /*#Type 1-0_16-7-0 : 1-0_16-7-0 [
            negate="1-0_1-8-0:5:1:status"
        ]*/
}

I using openHAB version openHAB 2.5.10-1 (Release Build)

i had to recalculate from Wh to kWh on my system and my solution was to do it with a rule…

rule "Wh to kWh" 

    when
    	Item Number_xxxx_Wh changed	
    then
    	Number_xxxx_kWh.postUpdate((Number_xxxx_Wh.state as DecimalType)/1000)
    end

of course you would have to do kWh*1000=Wh

as i don’t know the smartmeter you are using i don’t know if there is a channel for kWh, too.

I would suggest, to use a small javascript and use it in a transformation either in things definition (changes item value) or in item/sitemap definition (keeps item value, but just changes the presentation)
Joerg

1 Like

I’m not familiar with this binding. But the code seems to have an undocumented channel configuration parameter: conversionRatio. If the type is QuanityType this value will be used to divide the input value. So possible if you define the item as Number:Energy and the channel with conversionRatio=0.001. I don’t know if this works, but it might be worth a try.

Thanks all for your feedback.
I think there is a small misunderstanding.

I get the value in kWh without any decimal digits, e.g. I get 37kWh instead of 37.482kWh.
Therefore my question is to get the values in Wh or in kWh with decimal digits.

Do anybody knows if I can do that. I think it is somehow in the things file…

Thanks

Depends on your meter and if it is privacy locked (eg pin entered)

Are you sure you get kWh for 1-0:1.8.0 ?
According to an SML definition i found here this channel should have a scale of ‘Wh x 1’ with a resolution of 0.001 kWh

Regards

According to an SML definition i found here this channel should have a scale of ‘Wh x 1’ with a resolution of 0.001 kWh

Thanks Raven for the Link but yes I got the values in kWh

2020-11-14 10:00:18.479 [vent.ItemStateChangedEvent] - UG_TECHNIK_Strom_Wirkarbeit_Gesamt_kWh_FromReader changed from 42.0 kWh to 43.0 kWh

But what I see also in your linked file…

Have I add *255 to my definition in the things file?
I tried Type 1-0_1-8-0 : 1-0_1-8-0_255 but that doesn’t work

Thanks

Still sounds to me link your meter is reducing the accuracy for privacy reasons.
Please see this for a similar topic/symptom:

How long between those changes, does that seem a reasonable rate to you? I’m questioning how much faith to put in the assigned unit.
You haven’t shared your Item definition yet, which does have some influence.

Yes the time and values are reasonable

2020-11-14 12:30:21.611 [vent.ItemStateChangedEvent] - UG_TECHNIK_Strom_Wirkarbeit_Gesamt_kWh_FromReader changed from 45.0 kWh to 46.0 kWh
2020-11-14 13:13:15.518 [vent.ItemStateChangedEvent] - UG_TECHNIK_Strom_Wirkarbeit_Gesamt_kWh_FromReader changed from 46.0 kWh to 47.0 kWh

My items are…

Number:Energy UG_TECHNIK_Strom_Wirkarbeit_Gesamt_kWh_FromReader				"Wirkarbeit [%.3f kWh]"		{ channel="smartmeter:meter:power:1-0_1-8-0" }

My things file

smartmeter:meter:power     [port="/dev/strom", refresh=60, mode="SML"] {
    Channels:
        // Summe Wirkenergie Verbrauch Tarife T1 + T2 [kWh]
        Type 1-0_1-8-0 : 1-0_1-8-0
}

Maybe it’s something what Sascha meant, maybe the accuracy is limited. Maybe it’s changed with entering the password of the meter…
Is that possible?
At the moment I have no password from the provider, but on Monday I will ask for.

Thanks

Hey, @biker,

I have an eHZ meter from EMH and in the manual of this meter there is mentioned a reduced data set with lower accuracy (kWh) and no actual power sent on the Interface (Page 15).
When enabling the pin protected mode, the full dataset will be sent on the interface.

As from your item definitions I think you will be able to read German :slight_smile:: https://www.emh-metering.de/images/Produkt-Dokumentation/eHZ-K-BIA-D-1-20.pdf

Cheers
Jonathan

Thanks Jonathan.

I get the pin and tried it today. With entering the pin, the kWh accuracy increase to resolution of 0.001kWh automatically.

Thanks all for your help

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.