Hier mal meine Lösung mit gwr und WebQuery (Abfrage eines Tasmota Devices und einer JSON REST API eines anderen Devices).
Manchmal hilft es ja dem anderen als Beispiel.
Code
>D
sol=""
solstr=""
sp=0
zp=0
kwh=0
kwhd=0
ds=1
px=0
son=0
>B
;time in s after display switches off
son=180
dt [z]
if son==0
then
print disable PulseTime / screen off
->PulseTime1 0
else
print set screen off after %son% seconds
son=son+100
print set PulseTime1 to %son%
->PulseTime1 %son%
endif
>BS
->Sensor27 0
>S
if px>100
then
->power 1
endif
if upsecs%30==0
{
;print Power Solar %sp%
;print Power Zähler %zp%
;print Verbrauch Zähler %kwh%
sol=http("192.168.x.y" "/api/inverter/id/0")
solstr=gwr("[" 3)
;print Solarstring: %solstr%
sp=st(solstr ',' 3)
->WebSend [192.168.x.y] Status 10
}
if upsecs%8==0
{
; decimal precision
dp0
;switch case state machine
switch ds
case 1
dt [zf0s2l1c1]SOLARANLAGE[x0y20h128][f1s3l2c2]%sp%W
ds+=1
case 2
dt [zf0s2l1c1]STROMZ~8eHLER[x0y20h128][f1s3l2c2]%zp%W
ds+=1
case 3
dt [zf0s2l1c1]VERBRAUCHT[x0y20h128][f0s2l3c1]%kwh%kWh[f0s2l4c1]%kwhd%kWh(Tag)
ds=1
ends
dt [d]
}
>T
px=APDS9960#Proximity
>E
zp=WebQuery#StatusSNS#MT175#Power
kwh=WebQuery#StatusSNS#MT175#Total
kwhd=WebQuery#StatusSNS#ENERGY#Today
Alles anzeigen