Hello together,
since one week I installed openhabian on my raspberry 3B+. last year I used fhem for my homeautomation, but I thought this is too cryptic for me. Openhab seemed to me more modern and flexibel.
But since two day i try to integrate my Sonoff Power Switch.
Using the paperUI I was able to integrate the switching-action. I can see, when the switch will be switched on or off and I’m able to switch from openhab the Powerswitch.
I#m not able to display in a sitemap my energy-values.
In the forum I found a lot of information how to configure the items file and the sitemap. (both as default at this time)
In the openhab.log I get everytime the message:
019-04-05 16:56:16.899 [WARN ] [eneric.internal.generic.ChannelState] - Incoming payload ‘{“Time”:“2019.04.05 15:56:17”,“ENERGY”:{“Total”:251.986,“Yesterday”:0.552,“Today”:0.477,“Period”:0,“Power”:54,“Factor”:0.91,“Voltage”:225,“Current”:0.266}}’ not supported by type ‘NumberValue’
In the itemfile I configured the switch as follows_
Number Teichpumpe_V “Spannung [%.1f V]”
{ mqtt=" <[MQTTBroker-local:tele/Sonoff_Pow/SENSOR:state:JSONPATH($.Voltage)]" }
// Power in W
Number Teichpumpe_P “Leistung [%.1f W]”
{ mqtt="<[MQTTBroker-local:tele/Sonoff_Pow/SENSOR:state:JSONPATH($.Power)]" }
// Current in A
Number Teichpume_I “Strom [%.1f A]”
{ mqtt="<[MQTTBroker-local:tele/Sonoff_Pow/SENSOR:state:JSONPATH($.Current)]" }
// Energy for today in Wh
Number Teichpumpe_E “Energie heute [%.1f kWh]”
{ mqtt="<[MQTTBroker-local:tele/Sonoff_Pow/SENSOR:state:JSONPATH($.Today)]" }
// Energy since last reset to 0 in Wh
Number Teichpumpe_Et “Energie insgesamt [%.1f kWh]”
{ mqtt="<[MQTTBroker-local:tele/Sonoff_Pow/SENSOR:state:JSONPATH($.Today)]" }
In the console of the switch the messages looks like these:
15:59:47 MQT: tele/Sonoff_Pow/STATE = {“Time”:“2019.04.05 15:59:47”,“Uptime”:“3 03:14:42”,“Vcc”:3.516,“POWER”:“ON”,“Wifi”:{“AP”:1,“SSId”:“Leopard”,“RSSI”:42,“APMac”:“34:31:C4:BC:FE:1B”}}
15:59:47 MQT: tele/Sonoff_Pow/SENSOR = {“Time”:“2019.04.05 15:59:47”,“ENERGY”:{“Total”:251.990,“Yesterday”:0.552,“Today”:0.480,“Period”:0,“Power”:54,“Factor”:0.78,“Voltage”:226,“Current”:0.305}}
I know, the fault is ervery time in front of the computer, but I really tried a lot and at this time I’m on the end off my ideas.
Perhaps someone is willing to give me a little bit start-up support.
Thanks in advance
manylomy