HOW TO check if the Philips Hue lights are on or off ??

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
menno
Posts: 158
Joined: Fri May 21, 2010 1:27 am

HOW TO check if the Philips Hue lights are on or off ??

Post by menno »

Hi HM team

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
this will give the reply:

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"
	}
}
As you can see in the top the state of this Hue lamp 1 , in this case "on": false,

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
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You may use URL request test for this check with the following options:
URL: http://192.168.1.1/api/26fx139931cb5a17 ... b/lights/1
Check contents:
Should contain
"on": false
Please check for details at:
http://www.ks-soft.net/hostmon.eng/mfra ... ts.htm#url
Post Reply