J'aimerai récupéré l'état du bouton et la température sur eedomus mais je me perd dans la formule XPath.
Voila se que je récupère:
- Code : Tout sélectionner
{"System":{
"Build":20103,
"Git Build":"mega-20190817",
"System Libraries":"ESP82xx Core 2_5_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.1.2 PUYA support",
"Plugins":48,
"Plugin description":" [Normal]",
"Local Time":"1970-00-00 00:00:00",
"Unit Number":1,
"Unit Name":"Bouton_garage",
"Uptime":168,
"Last Boot Cause":"Manual reboot",
"Reset Reason":"External System",
"Load":12.90,
"Load LC":4254,
"CPU Eco Mode":"false",
"Heap Max Free Block":18656,
"Heap Fragmentation":11,
"Free RAM":20920
},
"WiFi":{
"Hostname":"Bouton-garage-1",
"IP Config":"DHCP",
"IP Address":"192.168.1.56",
"IP Subnet":"255.255.255.0",
"Gateway":"192.168.1.254",
"STA MAC":"3C:71:BF:28:D7:32",
"DNS 1":"192.168.1.254",
"DNS 1":"192.168.1.254",
"SSID":"Benjamin",
"BSSID":"F8:AB:05:08:1A:D0",
"Channel":1,
"Connected msec":10068963,
"Last Disconnect Reason":1,
"Last Disconnect Reason str":"(1) Unspecified",
"Number Reconnects":0,
"Force WiFi B/G":"false",
"Restart WiFi Lost Conn":"false",
"Force WiFi No Sleep":"false",
"Periodical send Gratuitous ARP":"false",
"Connection Failure Threshold":0,
"RSSI":-75
},
"Sensors":[
{
"TaskValues": [
{"ValueNumber":1,
"Name":"switch",
"NrDecimals":0,
"Value":1
}],
"DataAcquisition": [
{"Controller":1,
"IDX":0,
"Enabled":"true"
},
{"Controller":2,
"IDX":0,
"Enabled":"false"
},
{"Controller":3,
"IDX":0,
"Enabled":"false"
}],
"TaskInterval":0,
"Type":"Switch input - Switch",
"TaskName":"bouton_lumieres",
"TaskDeviceNumber":1,
"TaskEnabled":"true",
"TaskNumber":1
},
{
"TaskValues": [
{"ValueNumber":1,
"Name":"Temperature",
"NrDecimals":2,
"Value":25.00
}],
"DataAcquisition": [
{"Controller":1,
"IDX":0,
"Enabled":"true"
},
{"Controller":2,
"IDX":0,
"Enabled":"false"
},
{"Controller":3,
"IDX":0,
"Enabled":"false"
}],
"TaskInterval":60,
"Type":"Environment - DS18b20",
"TaskName":"Temp",
"TaskDeviceNumber":4,
"TaskEnabled":"true",
"TaskNumber":2
}
],
"TTL":60000
}
Se que je veux récupérer l'état du Sensors switch et le sensors température.
Sur mon Xpath pour la température pas exemple je met : //Sensors[2]/TaskValues/Value
Résulat ERREUR: Valeur lue vide
Je n'arrive pas a trouver la bonne formule...
Merci d'avance de l'aide