Blogs

Philips HUE Light Shutoff/on

By ani posted Sep 24, 2014 02:35 PM

  

Based on authentication into a location/area or the leaving of this area, automatically turn on or off the HUE light bulbs in that area

AH contributor: sethfiermonti

 

Specifications

 

Administration -> External Servers -> Endpoint Context Servers

Select Server Type

Generic HTTP

Server Name

<Your integration name>

On-Premise based URL

http://<bridge IP address>

Username

<Your username>

Password

 <Your password>

Administration -> Dictionaries -> Context Server Actions

Action Tab

Server Type

Generic HTTP

Server Name

<Select your integration name>

Action Name

<Describe the action>

HTTP Method

PUT

URL

http://<bridge IP address>/<user name>/lights/1/state

Content Tab

Content-Type

JSON

Content

{on}
{off}
{"bri":42}

 

Tips & Tricks

See website for more cool things like changing color of the lights even!

 

{"bri":42} <-- controls brightness (can make brighter or darker depending on circumstances - i.e. - more than X users in an auditorium for X time, then dim the lights!)
6 comments
8 views

Comments

Sep 18, 2018 01:32 PM

Replying to my own question but I thought someone might find it useful. I believe the action is triggered using the Endpoint Context Server Details (under the Attributes tab). Have not confirmed this yet but it's the only possible path I can see... 

Sep 17, 2018 04:48 PM

How do we go about targeting a client or access point? Another way to phrase the question would be; from where do the lighting changes take their cue?

 

It's clear how to control the lighting details but can we cue the lighting adjustments off a specific client associating with a specific access point?

Apr 05, 2016 01:46 AM

For me it works with this settings in CPPM 6.5:

 

Endpoint Contect Server

- Server Name: <Your IP>

- Server Base URL: http://<YourIP>

No Userid or Password !

 

Context Server Action

- URL: /api/newdeveloper/lights/1/state

-Content: JSON   {"xy_inc":[0.1,-0.1]}   (to change colour)

 

Cheers

Reinhard

Dec 05, 2014 05:31 PM

Went through the motions of doing this. Pretty cool post. Thanks! Here's some notes to speed things up for others.

 

URL would be as follows http://hue_bridge_ip/api/qVPLx2Ye5Mw14Mky/lights/1/state  where qVPLx2Ye5Mw14Mky is the secret created by your ios or android device. grab wireshark and sniff this out.

 

JSON content would look like this for ON  {"on":true} and this for OFF {"on":false}

 

Use the hue debug page to help you diagnose. at http://hue_bridge_ip/debug/clip.html

 

Cheers

 

 

Sep 25, 2014 04:07 PM

Always have been a sucker for room automation..  Great idea and really simple!

 

Sep 24, 2014 02:50 PM

Great post!