Smartmeter Mqtt energy data format

Hi all,

i am currently trying to read out my smartmeter and to import the data via mqtt.
Now i am struggling with the data format.

I am receiving “counter_reading_p_in”:“15179760”, - which should end up in 151797.60 kWh
What is the easiest way to do the formating / convert?
Already in the mqtt topic or with rules in OH?

For the current consumption i have added a rule to format the input from w in kw with /1000
444 = 0.444 kw. Don’t know if this is the only way to do this.

Thank you

I’d use a Number:Energy Item, and a little JS javascript transformation that divides by 100 and appends text " kWh".

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