Hello everbody,
maybe someone can help me with my issues:
I’ve flashed 2 Gosund SP111 Power Outlets with Tasmota 8.3
my setup:
Openhab 2.5.8
Mosquitto Broker
MQTT Binding 2.5.8
Generic MQTT Things via config file
mqtt.things
Thing topic power2ogoffice "WLAN/MQTT 2OG Steckdose Büro" @ "2OG" {
Channels:
Type switch : ch1 "Schaltkanal" [ stateTopic="Messung/stat/power2ogoffice/POWER", commandTopic="Messung/cmnd/power2ogoffice/POWER", on="ON", off="OFF" ]
Type number : ch1PowerTotal "Energie Total" [ stateTopic="Messung/tele/power2ogoffice/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Total" ]
Type number : ch1Power "Leistung" [ stateTopic="Messung/tele/power2ogoffice/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Power" ]
Type number : ch1Voltage "Spannung" [ stateTopic="Messung/tele/power2ogoffice/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Voltage" ]
Type number : ch1Current "Strom" [ stateTopic="Messung/tele/power2ogoffice/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Current" ]
Type string : ch1bootModule "Modul" [ stateTopic="Messung/tele/power2ogoffice/INFO1", transformationPattern="JSONPATH:$.Module" ]
Type string : ch1bootVersion "Version" [ stateTopic="Messung/tele/power2ogoffice/INFO1", transformationPattern="JSONPATH:$.Version" ]
Type string : ch1bootHostname "Hostname" [ stateTopic="Messung/tele/power2ogoffice/INFO2", transformationPattern="JSONPATH:$.Hostname" ]
Type string : ch1bootIPAddress "IP-Adresse" [ stateTopic="Messung/tele/power2ogoffice/INFO2", transformationPattern="JSONPATH:$.IPAddress" ]
Type string : ch1bootRestartReason "Restart Grund" [ stateTopic="Messung/tele/power2ogoffice/INFO3", transformationPattern="JSONPATH:$.RestartReason" ]
}
gosund.items
// Items for SP111 2OG Office:
Switch F2_WlanS1 "Steckdose 2.OG Office" <switch> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1" }
Number F2_Power_TotalS1 "Energie Total: [%.3f kWh]" <energy> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1PowerTotal" }
Number F2_Power_TodayS1 "Energie Heute: [%.3f kWh]" <energy> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1Power" }
Number F2_VoltageS1 "Spannung: [%.0f V]" <energy> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1Voltage" }
Number F2_CurrentS1 "Strom: [%.3f A]" <energy> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1Current" }
String F2_bootVersionS1 "Version: [%s]" <settings> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1bootVersion" }
String F2_bootModuleS1 "Modul: [%s]" <settings> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1bootModule" }
String F2_bootHostnameS1 "Hostname: [%s]" <settings> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1bootHostname" }
String F2_bootIPAddressS1 "IP-Adresse: [%s]" <network> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1bootIPAddress" }
String F2_bootRestartReasonS1 "Restart Grund: [%s]" <alarm> (F2_LivingRoom_PowerOutletOffice) { channel="mqtt:topic:mosquitto:power2ogoffice:ch1bootRestartReason" }
values / strings from ch1bootModule down to othes are beeing published and displayed
but after some time (didn’t figure out exactly) some values are gone / set to NULL
obviously only the topics with INFO* are effected
interesting side effect:
if i restart the gosund device all values are published again and after a certain time the INFO* topics are gone
i’ve seen in tasmota / gosund console that topics1-3 are beeing published once after reboot
is there a way to get / reread the topics INFO1-3 in a periodic time-frame? without rebooting the device?
i’ve also seen in tasmota / gosund console that there are some STATUS cmds
eg. if i enter STATUS 2 i get following published message:
13:46:41 CMD: INFO3
13:46:41 MQT: Messung/stat/power2ogoffice/RESULT = {"Command":"Unknown"}
13:46:44 MQT: Messung/tele/power2ogoffice/STATE = {"Time":"2020-09-11T13:46:44","Uptime":"0T04:41:10","UptimeSec":16870,"Heap":22,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":39,"MqttCount":2,"POWER":"ON","Wifi":{"AP":1,"SSId":"pretty fly for a wifi","BSSId":"00:21:29:99:0A:04","Channel":11,"RSSI":100,"Signal":-48,"LinkCount":1,"Downtime":"0T00:00:03"}}
13:46:44 MQT: Messung/tele/power2ogoffice/SENSOR = {"Time":"2020-09-11T13:46:44","ENERGY":{"TotalStartTime":"2020-08-25T18:35:37","Total":1.275,"Yesterday":0.159,"Today":0.025,"Period":0,"Power":2,"ApparentPower":9,"ReactivePower":9,"Factor":0.20,"Voltage":248,"Current":0.038}}
13:46:46 CMD: Messung/tele/power2ogoffice/INFO1
13:46:46 MQT: Messung/stat/power2ogoffice/RESULT = {"Command":"Unknown"}
13:46:54 CMD: Messung/stat/power2ogoffice/RESULT
13:46:54 MQT: Messung/stat/power2ogoffice/RESULT = {"Command":"Unknown"}
13:47:09 CMD: Messung/stat/power2ogoffice/INFO3
13:47:09 MQT: Messung/stat/power2ogoffice/RESULT = {"Command":"Unknown"}
13:47:14 MQT: Messung/tele/power2ogoffice/STATE = {"Time":"2020-09-11T13:47:14","Uptime":"0T04:41:40","UptimeSec":16900,"Heap":21,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER":"ON","Wifi":{"AP":1,"SSId":"pretty fly for a wifi","BSSId":"00:21:29:99:0A:04","Channel":11,"RSSI":100,"Signal":-48,"LinkCount":1,"Downtime":"0T00:00:03"}}
13:47:14 MQT: Messung/tele/power2ogoffice/SENSOR = {"Time":"2020-09-11T13:47:14","ENERGY":{"TotalStartTime":"2020-08-25T18:35:37","Total":1.275,"Yesterday":0.159,"Today":0.025,"Period":0,"Power":2,"ApparentPower":10,"ReactivePower":10,"Factor":0.19,"Voltage":248,"Current":0.041}}
13:47:24 CMD: STATUS 8
13:47:24 MQT: Messung/stat/power2ogoffice/STATUS8 = {"StatusSNS":{"Time":"2020-09-11T13:47:24","ENERGY":{"TotalStartTime":"2020-08-25T18:35:37","Total":1.275,"Yesterday":0.159,"Today":0.025,"Power":2,"ApparentPower":10,"ReactivePower":10,"Factor":0.16,"Voltage":248,"Current":0.041}}}
13:47:33 CMD: STATUS 2
13:47:33 MQT: Messung/stat/power2ogoffice/STATUS2 = {"StatusFWR":{"Version":"8.3.1.6(tasmota)","BuildDateTime":"2020.06.19 16:50:05","Boot":31,"Core":"2_7_1","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8285","CR":"458/699"}}
how can i evaluate the RESULT topic?
and how can i publish the STATUS cmd in a periodic frame?
hm, maybe someone can help me,
regards, j