Hallo,
da ich mir hier schon eine Weile einen "abmurkse", frage ich mal hier nach.
Ich möchte ein Gerät in DOIF über HTTP Post schalten. Den eigentlichen Schaltvorgang habe ich auf der Konsole mittels CURL auch geschafft:
curl --location --request POST 'http://192.168.xxx.xxx:7070/api/loadpoints/3/mode/off
(wen es interessiert: es handelt sich hier um einen Heizstab in EVCC)
Könnte mir jemand erklären, wie man das in DOIF einbaut?
SO funktioniert es jedenfalls nicht:
defmod di_heizstab_maxtemp_evcc DOIF ([OekoFEN:WW-Temp-Ein-Ist] > 60 and [Heizstab_Puffersp] eq "on" ) ({ GetHttpFile("192.168.xxx.xxx:7070/", "api/loadpoints/3/mode/off") }) DOELSEIF ([OekoFEN:WW-Temp-Ein-Ist] <=53 ) ({ GetHttpFile("192.168.xxx.xxx:7070/", "api/loadpoints/3/mode/pv") })
Danke und Gruß
Blueberry63
Zur Info, ich habe es nun doch hinbekommen:
defmod di_heizstab_maxtemp_evcc DOIF ([OekoFEN:WW-Temp-Ein-Ist] > 60 and [Heizstab_Puffersp] eq "on" ) ({ HttpUtils_NonblockingGet( { url=>"http://192.168.xxx.xxx:7070/api/loadpoints/3/mode/off", callback=>sub() { } } )}) DOELSEIF ([OekoFEN:WW-Temp-Ein-Ist] <=53 ) ({ HttpUtils_NonblockingGet( { url=>"http://192.168.xxx.xxx:7070/api/loadpoints/3/mode/pv", callback=>sub() { } } )})