The Hue Bridge exposes a local HTTPS API on the LAN. No cloud, no account: you press the link button once, get an application key, and every app on the network can then read and switch the lights. There are 2 versions on the same bridge, and both still work: the old v1 (/api/<key>/...) and CLIP v2 (/clip/v2/resource/...), which adds an event stream.

Pair: get an application key
- Find the bridge IP (the Hue app, your router, or
https://discovery.meethue.com). - Press the round link button on the bridge.
- Within 30 s:
curl -k -X POST https://<bridge-ip>/api \
-d '{"devicetype":"myapp#mac","generateclientkey":true}'
The answer holds username (the application key) and clientkey (only needed for the Entertainment streaming API). Store the key outside your code, in an env file.
v1 vs v2
| v1 | CLIP v2 | |
|---|---|---|
| Base path | /api/<key>/lights, /groups |
/clip/v2/resource/light, /room, /scene |
| Auth | Key in the URL | Header hue-application-key: <key> |
| IDs | Short integers ("7") |
UUIDs |
| Live state | Polling only | Server-sent events (/eventstream/clip/v2) |
| Payload | Flat ({"on":true,"bri":200}) |
Nested ({"on":{"on":true},"dimming":{"brightness":80}}) |
| Transport | HTTP or HTTPS | HTTPS only, self-signed bridge certificate |
New features (gradients, MotionAware, new device types) only appear in v2. v1 is still there and still fast for simple writes.
The calls I use
KEY=...; BRIDGE=...
# all lights (v2)
curl -sk -H "hue-application-key: $KEY" https://$BRIDGE/clip/v2/resource/light
# switch 1 light on at 60% (v2)
curl -sk -X PUT -H "hue-application-key: $KEY" \
https://$BRIDGE/clip/v2/resource/light/<uuid> \
-d '{"on":{"on":true},"dimming":{"brightness":60}}'
# same light, v1, with a 100 ms fade instead of the 400 ms default
curl -s -X PUT http://$BRIDGE/api/$KEY/lights/7/state \
-d '{"on":true,"bri":153,"transitiontime":1}'
# recall a scene in a room (v2)
curl -sk -X PUT -H "hue-application-key: $KEY" \
https://$BRIDGE/clip/v2/resource/scene/<uuid> \
-d '{"recall":{"action":"active"}}'
# live changes, 1 JSON container per event
curl -sk -N -H "hue-application-key: $KEY" -H "Accept: text/event-stream" \
https://$BRIDGE/eventstream/clip/v2
Limits and gotchas
- About 10 light commands a second, and about 1 group command a second. Above that the bridge queues or drops. Use a group or a scene for many lights, not a loop of single-light calls.
- Throttle sliders. A brightness drag that sends every pixel overloads the bridge. 1 command per light every 80 ms is fine.
transitiontimeis in 100 ms steps. The default is 4 (400 ms), which feels slow on a key press.1feels instant.- The eventstream batches changes into about 1 container a second. Good enough to confirm a write, not for animation. Use the Entertainment API for fast effects.
- The first command after a quiet period is the slowest: the bridge wakes up. Measure the p95, not the average.
-k/ no certificate check is the norm on the LAN, because the bridge certificate is self-signed. Pin it if you care.- Colour: some lights report only
xyandcolor_tempmodes. Sendxy, not RGB.
Hardware: Bridge vs Bridge Pro
The Hue Bridge Pro (2025) is the new hub: 150+ lights and 50+ accessories (the original Bridge: 50 and 12), a faster chip, and MotionAware, which turns lights into motion sensors. Official prices: 89.99 GBP in the UK, 149.99 USD in the US. The API is the same CLIP v2, so scripts don't change when you move.

How NicAI uses it
My Hue lights are driven by 3 paths, each picked for speed or reach:
| Path | Who uses it | Why |
|---|---|---|
| Direct, v1 PUT | Lightee (desk lights), Recordee (scenes) | The fastest write, about 40 ms |
| Direct, v2 eventstream | Lightee | Shows a change made in the Hue app or by voice within 1 s |
| Through Home Assistant | Voice commands, the camera alert, automations | Reaches every light in the house, with scenes and logic |
- Lightee (!NicAI/lightee), my menu bar app for the desk lights, writes over v1 on warm keep-alive connections and listens to the v2 eventstream for the live state. I measured both routes on 27th October 2026, 10 switches each: the direct v1 PUT answered in 40 ms (p50) and was confirmed by the eventstream in 48 ms; the same switch through Home Assistant took 60 ms to answer and 118 ms to confirm. So the desk lights go direct, and everything else goes through HA.
- Recordee (!NicAI/recordee), my recording app, saves the state of a room's lights, recalls a Hue scene when a recording starts, and restores the exact previous state at the stop.
- Home Assistant (!apps/home-assistant) runs the local Hue integration. The voice commands ("lights on", "activate Office Energize") and the carport camera alert, which flashes the lights blue when a person shows up, all go through it. The flash uses a scene snapshot first, so the lights return to what they were.
- Testing: the QA suites of my apps start a fake Hue bridge on a local port. Agents never switch a real light to test a change, except 1 desk lamp I cleared for that.
