Hello,
I’m trying to configure item refresh.
I send an http request which I should parse to update status.
The application sending the data is a custom app in Python.
My first version api return"ON", “OFF” and i parse it with regex and it run.
But I want to clean it up and return a JSON and parse the JSON.
Here is what my app return :
{
"pin": 0,
"value": "ON"
}
And here is some example items configurations :
Switch L01 “Lumière Hall”(A1,A2,A4,Lights) {http=">[ON:POST:http://192.168.1.6:80/api/0/1] >[OFF:POST:http://192.168.1.6:80/api/0/0] <[http://192.168.1.6:80/api/0:60000:JSONPATH($.value)]"}
Switch L02 “Lumière Extérieur Entrée”(A1,Lights){http=">[ON:POST:http://192.168.1.6:80/api/1/1] >[OFF:POST:http://192.168.1.6:80/api/1/0] <[http://192.168.1.6:80/api/1:60000:REGEX((.*))]"}
First one is the one with JSON
The second is the running one with regex.
Thanks you for your help