Je ne suis pas sûr de tout maitriser...
Voici le json de la prise obtenu par
http://IP:PORT/json.htm?type=devices&rid=1125
Code : Tout sélectionner
{
"ActTime" : 1622049299,
"AstrTwilightEnd" : "00:24",
"AstrTwilightStart" : "03:41",
"CivTwilightEnd" : "22:26",
"CivTwilightStart" : "05:39",
"DayLength" : "15:31",
"NautTwilightEnd" : "23:17",
"NautTwilightStart" : "04:49",
"ServerTime" : "2021-05-26 19:14:59",
"SunAtSouth" : "14:03",
"Sunrise" : "06:17",
"Sunset" : "21:48",
"app_version" : "2020.2 (build 12947)",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 1,
"Data" : "On",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 0,
"HardwareDisabled" : false,
"HardwareID" : 29,
"HardwareName" : "Conbee",
"HardwareType" : "deCONZ plugin",
"HardwareTypeVal" : 94,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "00:0d:6f:ff:fe:9c:40:7a-01",
"Image" : "WallSocket",
"IsSubDevice" : false,
"LastUpdate" : "2021-05-24 15:04:03",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 100,
"Name" : "prise_buanderie",
"Notifications" : "false",
"PlanID" : "3",
"PlanIDs" :
[
3
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "On",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Switch",
"SwitchType" : "On/Off",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "lightbulb",
"Unit" : 27,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "656",
"YOffset" : "543",
"idx" : "1125"
}
],
"status" : "OK",
"title" : "Devices"
}
et le websocket via phoscon beta
Code : Tout sélectionner
{
"19:19:13:476": {
"e": "changed",
"id": "20",
"r": "lights",
"state": {
"alert": null,
"on": false,
"reachable": true
},
"t": "event",
"uniqueid": "00:0d:6f:ff:fe:9c:40:7a-01"
},
"19:19:13:621": {
"attr": {
"id": "20",
"lastannounced": "2021-05-24T13:04:03Z",
"lastseen": "2021-05-26T17:19Z",
"manufacturername": "IKEA of Sweden",
"modelid": "TRADFRI control outlet",
"name": "prise_buanderie",
"swversion": "2.0.019",
"type": "On/Off plug-in unit",
"uniqueid": "00:0d:6f:ff:fe:9c:40:7a-01"
},
"e": "changed",
"id": "20",
"r": "lights",
"t": "event",
"uniqueid": "00:0d:6f:ff:fe:9c:40:7a-01"
},
"19:19:15:157": {
"e": "changed",
"id": "20",
"r": "lights",
"state": {
"alert": null,
"on": true,
"reachable": true
},
"t": "event",
"uniqueid": "00:0d:6f:ff:fe:9c:40:7a-01"
}
}
Si tu peux mieux voir