Thursday 6 December 2018

Customise Hue Bulb Startup Behaviour after a power cut


For years people have been wondering why and when Philips would allow users to customise startup behaviour after a power cut. No more! Philips has recently updated the firmware of the bridge and bulbs to allow for a custom power-on behaviour. Unfortunately for now it seems to allow only color temperature (whites) and brightness. But it’s better than nothing!


Open the bridge debug page

  • Open a browser (preferably on a PC or Mac)
  • Go to https://discovery.meethue.com to see the IP address of your Hue bridge (it is called internalipaddress). In my case it is 192.168.1.32
  • Open your favourite browser and enter http://192.168.1.32/debug/clip.html replacing my IP address with the IP you found in the previous step.

    You should see the following page:

Get an API key

If you don’t have an API key yet you can do the following:
  • Replace the default value (/api/1234) with /api
  • Paste the following content in the ‘message body’ field: {"devicetype": "debug_credential" }
  • Press the ‘POST’-button on the web page
  • Run to your Hue Bridge and press the round button on it
  • Press the ‘POST’-button on the web page again
  • Copy the value for “username” to some text editor so you won’t lose it. This value represents your API key.

Identify the lights to modify

In the URL field of the debug page you can append your username, for example /api/0123456789012345678901234567 if your api key is 0123456789012345678901234567.

Next you can get a list of lights by appending /lights to the URL. Then you can press the GET button.

Every light that allows custom startup behaviour will have a startup key in the config property (see image below).

Write down all the ID’s of the lights that you want to modify and that allow custom startup behaviour.

Example showing that the light with ID 1 allows custom startup configuration. You can also see 2, which shows the ID of the second light in the response.

Modify the lights

Append the ID of the light you want to customise to the URL. As a sanity check, press the GET-button and verify that you get the status of the light in the response (no errors).

Paste the following in the Message Body field:
{
  "config": {
    "startup": {
      "mode": "custom",
      "customsettings": {
        "bri": 254,
        "ct": 500
      }
    }
  }
}
  • Adjust the Bri (Brightness, 0-255) and CT (Colour Temperature, ranging from 153 (6500 Kelvin, bright white) to 500 (2000 Kelvin, warm white).
  • Press the PUT button
  • Repeat for the other lights
Now to verify that it works, turn off the physical power switch to your light, wait for approx 5 seconds, and flip the switch again. Enjoy!