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:
Items:
Number Sonoff_Power_Wz_State "Power %s" { channel="mqtt:topic:f52cfe9a:state1"}
Sitemap
Text item=Sonoff_Power_Wz_State label="Power"
The first image shows the NON WORKING ITEM
The second one works fine
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"]