In our office we use Philips Hue lights
I want to check in th evening if all lights are OFF
True the API of the Philips Hue lights you can "ask" (http GET command) the status of each lamp.
example :
Code: Select all
http://192.168.1.1//api/26fx139931cb5a17a9e7bed474491b/lights/1
Code: Select all
{
"state": {
"on": false,
"bri": 144,
"hue": 13088,
"sat": 213,
"effect": "none",
"xy": [
0.5134,
0.4149
],
"ct": 467,
"alert": "none",
"colormode": "xy",
"reachable": true
},
"type": "Extended color light",
"name": "Hue Lamp 1",
"modelid": "LCT001",
"manufacturername": "Philips",
"uniqueid": "00:17:88:01:00:be:ec:71-0b",
"swversion": "66013452",
"pointsymbol": {
"1": "none",
"2": "none",
"3": "none",
"4": "none",
"5": "none",
"6": "none",
"7": "none",
"8": "none"
}
}
my question : How can i only read this state. I want to get a BAD if the value is "true"
i hope you can help me with this ...
sometimes people in the office leave the lights on the whole night so that is the reason we want to check this.
many thanks in advance
menno