[SOLVED]Need Help with OH2 and Sonoff Pow Tasmota

Hi I am running OH 2 on Win10 and i would like to get Power consumption values from SOnoff Pow with Tasmota Version 6.4.1

I Use MQTT 2.4 Binding and i have set up the Switch to toggle on and off.
This works very good.
How can i link the Item in Paper UI to get the Values of Power consumption.

Here are some Informations:


Number Sonoff_Power_Wz_State "Power %s" { channel="mqtt:topic:f52cfe9a:state1"}


			Text item=Sonoff_Power_Wz_State label="Power" 

The first image shows the NON WORKING ITEM
The second one works fine

I would be very thankfull for any advice how to configure the channel to read out the consuption values.

From the tasmota console what’s the output of status8?

Hi ,
when i put the command status 8 i get the following

15:29:04 MQT: tele/sonoffWz/SENSOR = {"Time":"2019-03-15T15:29:04","ENERGY":{"TotalStartTime":"2019-01-26T17:39:13","Total":0.073,"Yesterday":0.000,"Today":0.073,"Power":8,"ApparentPower":41,"ReactivePower":40,"Factor":0.20,"Voltage":229,"Current":0.179}}
15:29:06 MQT: tele/sonoffWz/SENSOR = {"Time":"2019-03-15T15:29:06","ENERGY":{"TotalStartTime":"2019-01-26T17:39:13","Total":0.073,"Yesterday":0.000,"Today":0.073,"Power":15,"ApparentPower":41,"ReactivePower":38,"Factor":0.37,"Voltage":228,"Current":0.181}}
15:29:32 MQT: tele/sonoffWz/SENSOR = {"Time":"2019-03-15T15:29:32","ENERGY":{"TotalStartTime":"2019-01-26T17:39:13","Total":0.074,"Yesterday":0.000,"Today":0.074,"Power":9,"ApparentPower":39,"ReactivePower":38,"Factor":0.23,"Voltage":228,"Current":0.171}}
15:29:43 CMD: status 8
15:29:43 MQT: stat/sonoffWz/STATUS8 = {"StatusSNS":{"Time":"2019-03-15T15:29:43","ENERGY":{"TotalStartTime":"2019-01-26T17:39:13","Total":0.074,"Yesterday":0.000,"Today":0.074,"Power":10,"ApparentPower":40,"ReactivePower":39,"Factor":0.24,"Voltage":228,"Current":0.174}}}

You will need to use JSON transformation and include ENERGY.Power, ENERGY.Voltage, etc…

Things file example:

Type number : powerload "Power load"             [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Power"]
        Type number : voltage   "Line voltage"           [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Voltage"]
        Type number : current   "Line current"           [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Current"]
        Type number : total     "Total energy today"     [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Today"]
        Type number : totalyest "Total energy yesterday" [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Yesterday"]
1 Like

Thank you very much. It worked.
I had a syntax error. Instead of


i had


and instead of

Number Sonoff_Power_Wz_State "Power %s" { channel="mqtt:topic:f52cfe9a:state1:state:JSONPATH($.ENERGY.Current)]" }

now i put the transformation path in the Paper UI like in the Images.
Thank you very much for your hintgenericMQTT_Sensor