@ralla66 sagte in Gosund SP111 mit Tasmota 13.2.0 Problem mit DP:
alle print des Scriptes werden in der Console nicht ausgegeben, bedeutet dein Script läuft nicht.
Hatte ich auch geschrieben, dass das Script nicht aktiviert ist.
Meine .bin habe ich mit Gitpod kompiliert (Quelle: https://github.com/arendst/Tasmota) und alle von dir genannten Defines, soweit in my_user_config.h vorhanden, aktiviert. In einem Post weiter oben hatte ich das auch schon erwähnt.
Diese .bin habe ich dann auf den Gosund geflasht.
Das Script habe ich jetzt aktiviert und in der Konsole kommt folgende Fehlermeldung:
17:32:38.869 SCR: performs "websend [192.168.178.164] /cm?cmnd=status 10"
17:32:44.249 MQT: stat/tasmota_B8D3E7/RESULT = {"WebSend":"Connect failed"}
17:32:44.257 MQT: stat/tasmota_B8D3E7/RESULT = {"Total":0}
17:32:44.264 MQT: stat/tasmota_B8D3E7/RESULT = {"Yesterday":0}
17:32:44.272 MQT: stat/tasmota_B8D3E7/RESULT = {"Today":0}
17:32:44.279 MQT: stat/tasmota_B8D3E7/RESULT = {"ApparentPower":0}
17:32:44.286 MQT: stat/tasmota_B8D3E7/RESULT = {"ReactivePower":0.00}
17:32:44.293 MQT: stat/tasmota_B8D3E7/RESULT = {"Power":0}
17:32:44.300 MQT: stat/tasmota_B8D3E7/RESULT = {"Voltage":0}
17:32:44.307 MQT: stat/tasmota_B8D3E7/RESULT = {"Current":0}
17:32:48.393 MQT: tele/tasmota_B8D3E7/STATE = {"Time":"2023-11-15T17:32:48","Uptime":"0T10:55:26","UptimeSec":39326,"Heap":20,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER":"ON","Wifi":{"AP":1,"SSId":"Palatina","BSSId":"5C:49:79:55:9E:DC","Channel":4,"Mode":"11n","RSSI":96,"Signal":-52,"LinkCount":1,"Downtime":"0T00:00:03"}}
17:32:48.406 MQT: tele/tasmota_B8D3E7/SENSOR = {"Time":"2023-11-15T17:32:48","ENERGY":{"TotalStartTime":"2020-06-30T13:38:42","Total":0.544,"Yesterday":0.170,"Today":0.043,"Period":1,"Power":42,"ApparentPower":42,"ReactivePower":0,"Factor":1.00,"Voltage":230,"Current":0.181}}
17:32:54.371 SCR: performs "websend [192.168.178.164] /cm?cmnd=status 10"
17:32:59.783 MQT: stat/tasmota_B8D3E7/RESULT = {"WebSend":"Connect failed"}
17:32:59.792 MQT: stat/tasmota_B8D3E7/RESULT = {"Total":0}
17:32:59.799 MQT: stat/tasmota_B8D3E7/RESULT = {"Yesterday":0}
17:32:59.808 MQT: stat/tasmota_B8D3E7/RESULT = {"Today":0}
17:32:59.815 MQT: stat/tasmota_B8D3E7/RESULT = {"ApparentPower":0}
17:32:59.823 MQT: stat/tasmota_B8D3E7/RESULT = {"ReactivePower":0.00}
Die IP für das websend ist die des ioBroker oder der Gosund?
Hier noch mal mein Script:
>D
;a valid script must start with >D in the first line
Timer=0
WEBQ=5
VOL=0
CUR=0
POW=0
TOT=0
YES=0
TOD=0
APP=0
RAP=0
; Meins
; MQT: tasmota_Reserve2 = {"StatusSNS":{"Time":"2023-11-14T12:59:46","ENERGY":{"TotalStartTime":"2020-06-30T13:38:42","Total":0.424,"Yesterday":0.007,"Today":0.093,"Power":42,"ApparentPower":42,"ReactivePower":0,"Factor":1.00,"Voltage":231,"Current":0.181}}}
>BS
+>subscribe EA, cmnd/%topic%/Total
+>subscribe EA, cmnd/%topic%/Yesterday
+>subscribe EA, cmnd/%topic%/Today
+>subscribe EA, cmnd/%topic%/Power
+>subscribe EA, cmnd/%topic%/ApparentPower
+>subscribe EA, cmnd/%topic%/ReactivePower
+>subscribe EA, cmnd/%topic%/Power
+>subscribe EA, cmnd/%topic%/Voltage
+>subscribe EA, cmnd/%topic%/Current
>S
Timer+=1
;Executed every second
if Timer>10
then
=>websend [192.168.178.164] /cm?cmnd=status 10
+>publish stat/%topic%/RESULT {"Total":%0TOT%}
+>publish stat/%topic%/RESULT {"Yesterday":%0YES%}
+>publish stat/%topic%/RESULT {"Today":%0TOD%}
+>publish stat/%topic%/RESULT {"ApparentPower":%0APP%}
+>publish stat/%topic%/RESULT {"ReactivePower":%RAP%}
+>publish stat/%topic%/RESULT {"Power":%0POW%}
+>publish stat/%topic%/RESULT {"Voltage":%0VOL%}
+>publish stat/%topic%/RESULT {"Current":%0CUR%}
Timer=0
endif
>E
;Executed when a Tasmota MQTT RESULT message is received
VOL=WebQuery#StatusSNS#ENERGY#Voltage
print Wert Volt %VOL%
CUR=WebQuery#StatusSNS#ENERGY#Current/1000
print Wert Current %CUR%
POW=WebQuery#StatusSNS#ENERGY#Power
print Wert Power %POW%
TOT=WebQuery#StatusSNS#ENERGY#Total
print Wert Total %TOT%
YES=WebQuery#StatusSNS#ENERGY#Yesterday
print Wert Yesterday %YES%
TOD=WebQuery#StatusSNS#ENERGY#Today
print Wert Today %TOD%
APP=WebQuery#StatusSNS#ENERGY#ApparentPower
print Wert Apparent Power %APP%
RAP=WebQuery#StatusSNS#ENERGY#ReactivePower
print Wert Reaktive Power %RAP%
>W
;The lines in this section are displayed in the web UI main page
Power{m} %2POW% W
Volt{m} %2VOL% V
Ampere{m} %2CUR% A
Total{m} %2TOT%
Yesterday{m} %YES%
Today{m} %2TOD%
Apparent{m} %2APP%
Reactive{m} %2RAP%
#
Ich habe es nochmal verglichen. Ich habe lediglich die Zeilen 21 und 45 angepasst.