# Audit external integration Philips Hue

**URL:** <https://community.gladysassistant.com/t/audit-integration-externe-philips-hue/11669>\
**Category:** Développement\
**Created:** [November 24, 2026, 5:47pm UTC](https://community.gladysassistant.com/t/audit-integration-externe-philips-hue/11669 "2026-11-24T17:47:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [November 24, 2026, 5:47pm UTC](https://community.gladysassistant.com/t/audit-integration-externe-philips-hue/11669/1 "2026-11-24T17:47:49Z")

</div>

Hi @cicoub13!

First of all, thanks for the Philips Hue integration, the work is really clean 👏

I did a code audit to compare it with Home Assistant’s Hue integration, especially on the compatibility side. Everything is detailed in this issue:

> <https://github.com/cicoub13/gladys-philips-hue/issues/48>
>
> \# Audit: compatibility and feature parity with the Home Assistant Hue integratio…n
> 
> \## Context
> 
> \- \*\*Audited:\*\* \`gladys-philips-hue\` v2.0.3, commit \[\`5de09d7\`\](https://github.com/cicoub13/gladys-philips-hue/tree/5de09d7e012f56cf3978cc5f32c05a611ee73230).
> \- \*\*Compared with:\*\* the Home Assistant core \`hue\` integration at \[\`7deeb95\`\](https://github.com/home-assistant/core/tree/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue) (2026-11-24), which uses \`aiohue\` 4.9.2, and Gladys core 5.3.5 for what Gladys can represent.
> \- \*\*Method:\*\* I read the code; I did not run it or test it on hardware. Facts about bridges come from Signify developer news and recent community reports, linked in the references. Items marked \*to confirm on hardware\* still need a test on a real bridge.
> 
> \## TL;DR
> 
> \- \*\*The foundations are solid.\*\* Pairing is robust, discovery only offers real bridges, credentials are handled carefully, and the integration recovers on its own after outages. On a few points it is ahead of Home Assistant (see §5).
> \- 🔴 \*\*One urgent bug.\*\* Bridge firmware 1.78, being rolled out now, blocks plain HTTP. Almost every existing installation paired its bridge over HTTP, and the integration cannot switch it to HTTPS without a new pairing. Once the bridge updates, every read and every command fails (§1).
> \- \*\*Parity with Home Assistant is still far off, for structural reasons:\*\*
> 1. The integration uses only the v1 API. Signify has frozen it, and everything new since 2021 is v2-only: effects, gradients, smart scenes, contact sensors, Tap Dial rotation, MotionAware, and the Bridge Pro features.
> 2. It exposes \*\*lights only.\*\* Home Assistant also exposes rooms and zones, scenes, motion, light level, temperature, contact and tamper sensors, battery, remotes and buttons, and configuration switches.
> 3. It \*\*polls\*\* the bridge (every 60 s by default). Home Assistant gets state changes pushed by the v2 event stream on BSB002/BSB003 bridges.
> 
> \---
> 
> \## 1. 🔴 Urgent: bridges paired over HTTP break when HTTP is blocked
> 
> \*\*What changed on the bridge side\*\*
> 
> \- On 2025-06-04, Signify announced that, because of RED compliance, firmware released from 1 August no longer supports HTTP: "the Hue API should be accessed exclusively over TLS".
> \- The Hue Bridge Pro (BSB003) has only ever accepted HTTPS.
> \- On 2026-11-21, a BSB002 on firmware \`1978688000\` (API \`1.78.0\`) was reported answering plain HTTP with \*\*\`403\`\*\* and \`unauthorized user - HTTP access is blocked\` (\[aiohue issue 708\](https://github.com/home-assistant-libs/aiohue/issues/708)).
> 
> \*\*What happens in the integration\*\*
> 
> \- The scheme is chosen once, when the bridge is identified, with HTTP tried first (\[\`identify.js#L76\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/identify.js#L76)). It is then stored and reused forever (\[\`bridge.js#L76\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/bridge.js#L76)).
> \- So every bridge paired while HTTP still worked is stored as \`http\`. That includes bridges paired by 1.0.x/1.1.x, which stored no scheme at all and fall back to \`http\`.
> \- After the firmware update:
> - \`getLights()\` and \`setLightState()\` fail with HTTP 403 (\[\`bridge.js#L135\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/bridge.js#L135)), so every command fails and states stop updating.
> - The bridge is counted as unreachable (\[\`manager.js#L175\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/manager.js#L175)), and the status tells the user to "check that it is powered on and on the same network", which sends them looking in the wrong place.
> - The background resync keeps retrying with the same scheme, without end.
> 
> \*\*Workaround for users today:\*\* press the link button, then click \*\*Pair bridge\*\*.
> \- Identification falls back to HTTPS, and \`upsert\` is keyed by bridge id, so the external\_ids are kept.
> \- The downside is that it leaves an orphan user on the bridge.
> 
> \*\*Suggested fix (patch release):\*\*
> 1. When a bridge stored as \`http\` returns this 403 (or refuses the connection on port 80), retry \*\*with the same username over HTTPS\*\*.
> - The application key is not tied to the transport, so no link-button press is needed.
> - Check the certificate (CN = bridge id), pin it, and persist \`scheme: 'https'\`.
> 2. Make identification try \*\*HTTPS first\*\*, with HTTP only as a fallback. The round v1 bridge (BSB001) never got HTTPS.
> 3. Add a changelog line and a troubleshooting entry to the docs.
> 
> \*\*Compared with Home Assistant:\*\*
> \- HA's v2 entries already use HTTPS, so they keep working after this firmware update.
> \- \*Pairing\* a new bridge on this firmware is currently broken in HA (aiohue issue 708 is still open).
> \- This integration's HTTPS fallback at identification is therefore ahead of HA for new pairings. Only the migration of existing pairings is missing.
> 
> \---
> 
> \## 2. Compatibility matrix by bridge generation
> 
> | Bridge | This integration (2.0.3) | Home Assistant |
> |---|---|---|
> | \*\*BSB001\*\* (round, v1, end of support 2020) | ✅ v1 over HTTP, polling | ✅ v1, polling every 5 s |
> | \*\*BSB002\*\*, firmware still accepting HTTP | ✅ v1 over HTTP, polling every 10–60 s | ✅ v2 over HTTPS, push (event stream) |
> | \*\*BSB002\*\*, firmware ≥ 1.78 (HTTP blocked) | ⚠️ new pairing works (HTTPS fallback)\<br\>❌ existing pairings stop working until re-paired (§1) | ✅ existing entries keep working\<br\>⚠️ new pairing currently broken (aiohue issue 708) |
> | \*\*BSB003\*\* Hue Bridge Pro | ⚠️ should pair over HTTPS: other v1 clients report that v1 works over HTTPS on the Pro (\*to confirm on hardware\*)\<br\>❌ migrating from a BSB002 orphans every device (§4.6)\<br\>❌ MotionAware (v2-only) | ✅ including automatic detection of a BSB002 → BSB003 migration, and MotionAware |
> | \*\*Several bridges\*\* (e.g. a BSB002 and a Pro) | ⚠️ discovery can miss the Pro (§4.8) | ✅ |
> 
> \## 3. Feature parity
> 
> | Feature | Home Assistant | This integration | Can Gladys represent it? |
> |---|---|---|---|
> | On/off, brightness, color, white temperature | ✅ | ✅ | ✅ |
> | Light powered off at the wall | shown as \*unavailable\* (\`zigbee\_connectivity\` in v2, \`reachable\` in v1) | ❌ stays \*\*ON\*\* (§4.1) | ✅ \`GLADYS\_TRANSPORT = unreachable\` via \`publishTransports\` |
> | Changes made outside Gladys | instant (v2 event stream) | after up to 10–60 s (default 60 s) | ✅ |
> | Effects: candle, fire, prism, sparkle, opal, glisten, underwater, cosmos, sunbeam, enchant, plus sunrise/sunset | ✅ | ❌ | ✅ \`light\` / \`effect-mode\` + \`supported\_options\` |
> | Transition, flash / identify | ✅ | ❌ | partly |
> | Gradient lights, per segment | ✅ (one light entity per segment, added recently) | ❌ (single color) | ✅ one color feature per segment |
> | Rooms and zones as one light | ✅ (\`grouped\_light\`) | ❌ | ✅ one light device per group |
> | Hue scenes | ✅ scene entities\<br\>✅ \`hue.activate\_scene\` (dynamic palette, speed, brightness, transition)\<br\>✅ active-scene select per room | ⚠️ scene action by name and room, static recall only | — |
> | Smart scenes (natural light, time-based) | ✅ | ❌ (v2-only) | — |
> | Motion: sensors, grouped motion, MotionAware areas | ✅ | ❌ | ✅ \`motion-sensor\` |
> | Light level, temperature | ✅ | ❌ | ✅ \`light-sensor\` (lux), \`temperature-sensor\` |
> | Battery | ✅ | ❌ | ✅ \`battery\` (badge on the Devices page) |
> | Contact and tamper (Secure contact sensor) | ✅ | ❌ (v2-only) | ✅ \`opening-sensor\`, \`tamper\` |
> | Buttons and remotes: dimmer, smart button, wall switch module, Tap Dial rotation, bell | ✅ event entities + device triggers | ❌ | ✅ \`button\` / \`click\` with \`BUTTON\_STATUS\` (click, double click, long press/release, hold, rotate left/right) |
> | Enable/disable motion and light sensors, Hue automations, MotionAware | ✅ switches | ❌ | ✅ \`switch\` |
> | Zigbee connectivity, entertainment area active | ✅ diagnostics | ❌ | partly |
> | Bridge IP change | ✅ host updated from zeroconf | ❌ needs a new pairing (§4.7) | ✅ |
> | Bridge replacement or migration to Bridge Pro | ✅ | ❌ (§4.6) | ✅ |
> | Request throttling | ✅ v1: 1 request per 250 ms, retries with growing backoff (up to 25)\<br\>✅ v2: at most 3 connections, backoff | ⚠️ none, 1 retry after 400 ms (§4.5) | — |
> 
> \---
> 
> \## 4. Detailed findings
> 
> \### 🟠 4.1 A light powered off at the wall stays "on" in Gladys
> 
> \[\`mapping.js#L279\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/mapping.js#L279) only reads \`state.on\` and never reads \`state.reachable\`.
> 
> \- When a bulb is cut at the wall, the bridge keeps its last state (\`on: true\`) with \`reachable: false\`. So Gladys shows it \*\*on\*\* indefinitely, and scene conditions such as "if the light is on" are wrong.
> \- This is the most common Hue complaint, and the one HA handles in both APIs:
> - v1: \`reachable\` (\[\`v1/light.py#L497\`\](https://github.com/home-assistant/core/blob/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue/v1/light.py#L497));
> - v2: \`zigbee\_connectivity\` (\[\`v2/entity.py#L109\`\](https://github.com/home-assistant/core/blob/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue/v2/entity.py#L109)).
> - HA also offers an option to ignore availability for lights that report it badly.
> 
> \*\*Suggestion:\*\* publish \`GLADYS\_TRANSPORT: unreachable\` for the light (\`gladys.publishTransports\`, shown as a pill on the Devices page), and \`local\` once it is reachable again. Possibly also publish on/off = 0 while it is unreachable, since the bulb is physically off.
> 
> \### 🟠 4.2 State is polled, not pushed
> 
> The default refresh interval is 60 s, with 10 s as the minimum (\[\`config.js#L20\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/config.js#L20)).
> 
> \- A change made with a Hue dimmer, the Hue app or a Hue automation reaches Gladys up to a minute later. Scenes triggered by "light turned on/off" fire late or miss short changes.
> \- HA declares \`iot\_class: local\_push\`: on BSB002/BSB003 bridges it subscribes to the v2 event stream, \`GET https://\<ip\>/eventstream/clip/v2\` with the \`hue-application-key\` header (\[\`aiohue events.py#L190\`\](https://github.com/home-assistant-libs/aiohue/blob/edfdc8a8e320d0f30628f882c0902b4ab0595d19/aiohue/v2/controllers/events.py#L190)).
> \- \*\*The v1 username already stored is a valid v2 application key\*\*, so the stream can be added without a new pairing.
> \- Keep polling as a fallback, and for BSB001. HA's v1 code polls every 5 s; one \`GET /lights\` per bridge every few seconds is cheap.
> \- \`publishChangedStates\` already keeps the Gladys 300 states/min budget under control. Coalesce bursts (a held dimmer button) per feature before publishing.
> 
> \### 🟠 4.3 Only lights are exposed
> 
> The integration reads \`/lights\` only. All the accessories in the table in §3 are missing: sensors, remotes, contact sensors, MotionAware and so on. Gladys already has a category for each of them.
> 
> Two implementation notes:
> \- \*\*Buttons must be published with \`publishState\`, not \`publishChangedStates\`.\*\* Two identical clicks in a row are two events, and the second one would be dropped as "unchanged".
> \- Contact sensors, Tap Dial rotation, bell buttons and MotionAware exist \*\*only in v2\*\*. Motion, light level, temperature and dimmer switches are also in v1 (\`/sensors\`), but without push their value is poor: a motion sensor read every 60 s is not usable.
> 
> \### 🟠 4.4 Rooms and zones are not exposed (\`grouped\_light\`)
> 
> \- HA creates one light entity per Hue room and zone (\[\`v2/group.py#L84\`\](https://github.com/home-assistant/core/blob/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue/v2/group.py#L84)), plus a select per room that lists its scenes and shows the active one (\[\`v2/select.py#L86\`\](https://github.com/home-assistant/core/blob/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue/v2/select.py#L86)).
> \- A group command is a single Zigbee broadcast: all lights change at the same time (no "popcorn" effect), and it costs one request instead of N.
> \- This matters even more in Gladys: the "turn off the lights" scene action calls \`setValue\` \*\*for every light in parallel\*\* (\`server/lib/scene/scene.actions.js\`, \`ACTIONS.LIGHT.TURN\_OFF\`). See §4.5.
> 
> \### 🟠 4.5 No request throttling
> 
> \- \`setValue\` sends a \`PUT\` immediately (\[\`manager.js#L520\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/manager.js#L520)), with a single retry after 400 ms on 429/503 (\[\`bridge.js#L33-L34\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/bridge.js#L33-L34)).
> \- A Gladys scene acting on 15 lights sends 15 concurrent requests. The bridge refuses more than about 3 at once, and Signify recommends about 10 light commands/s (and about 1 group command/s). Commands end up lost.
> \- aiohue spaces out v1 requests (one every 250 ms, \[\`v1/\_\_init\_\_.py#L22\`\](https://github.com/home-assistant-libs/aiohue/blob/edfdc8a8e320d0f30628f882c0902b4ab0595d19/aiohue/v1/\_\_init\_\_.py#L22)), caps v2 at 3 connections (\[\`v2/\_\_init\_\_.py#L217\`\](https://github.com/home-assistant-libs/aiohue/blob/edfdc8a8e320d0f30628f882c0902b4ab0595d19/aiohue/v2/\_\_init\_\_.py#L217)), and retries 429/503 with a growing backoff.
> 
> \*\*Suggestion:\*\* one queue per bridge (about 10 requests/s, at most 3 in flight), and several retries with backoff on 429/503 within the command's timeout. Grouping simultaneous commands into a group action (§4.4) is the next step.
> 
> \### 🟠 4.6 Replacing a bridge or migrating to a Bridge Pro orphans every device
> 
> \- The external\_ids include the bridge id: \`platformId = \<bridge id\>-\<light uniqueid\>\` (\[\`manager.js#L192\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/manager.js#L192)).
> \- After the official BSB002 → BSB003 migration, which Signify has supported since 2025 including multi-bridge migration since 2025-12-15, the bridge id and IP change:
> - every light shows up again as a \*\*new\*\* device in the Discovery tab;
> - the devices already created (with their scenes, rooms and history) stop working;
> - the old bridge stays in \`bridges.json\` \*\*forever\*\*, because there is no action to forget a bridge (\[\`store.js\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/store.js) has no \`remove\`). The status then shows "1 Hue bridge unreachable" for good, and the resync retries without end.
> \- HA detects a migrated bridge: it tries the existing key on the new bridge and moves the entry to it (\[\`config\_flow.py#L303\`\](https://github.com/home-assistant/core/blob/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue/config\_flow.py#L303)).
> 
> \*\*Suggestion:\*\* reuse the existing \`platformKey\` mechanism.
> 1. When a new bridge's lights match, by \`uniqueid\` (a Zigbee MAC, globally unique), the lights of a stored bridge, give the new bridge that bridge's \`platformKey || id\`, then drop the old entry.
> 2. Before asking for the link button, try the stored key on the new bridge.
> 3. Add a "Forget bridge" action.
> 
> \### 🟡 4.7 A bridge whose IP changed needs a new pairing, and the docs say otherwise
> 
> \- Bridges are addressed by their stored IP. Only a new pairing updates it, which means pressing the link button and creating a new user on the bridge.
> \- The docs say: "check that the bridge did not change IP address (fix it in your box), then run a discovery again" (\[\`docs/fr.md#L117-L118\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/docs/fr.md#L117-L118), same in \`en.md\`). But \*\*Discover bridges\*\* does not update the stored IP.
> \- HA updates the host automatically when zeroconf sees the bridge at a new address (\[\`config\_flow.py#L249\`\](https://github.com/home-assistant/core/blob/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue/config\_flow.py#L249)).
> 
> \*\*Suggestion:\*\* when a paired bridge is unreachable, or when \*\*Discover bridges\*\* runs:
> 1. Match the discovered bridges by \`bridgeid\`.
> 2. Update the stored IP (and the \`unreachable\` set, which is keyed by IP), keeping the same username.
> 3. Fix the docs.
> 
> \### 🟡 4.8 Discovery stops at the first method that finds something
> 
> \- SSDP → mDNS → N-UPnP: each method only runs if the previous one found nothing (\[\`discovery.js#L182-L195\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/discovery.js#L182-L195)).
> \- Signify has deprecated UPnP discovery, and the Bridge Pro does not announce itself over UPnP. In a home with a BSB002 and a Bridge Pro, SSDP finds the BSB002, so mDNS is never run and the Pro is never found.
> 
> \*\*Suggestion:\*\* run mDNS first (the method Signify recommends) and SSDP, merge the results by \`bridgeid\`, and keep N-UPnP as the last resort.
> 
> Minor: the comment on \`SCAN\_CACHE\_MS\` says the core allows one mediated scan per 10 s. According to the Gladys spec (\`network-discovery.md\`), that limit only applies to \`udp-active-broadcast\`. SSDP and mDNS are only limited to one concurrent scan.
> 
> \### 🟡 4.9 The reported color gets darker as brightness goes down
> 
> \- \`xyToRgb(state.xy, state.bri)\` uses the brightness as luminance (\[\`mapping.js#L158\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/mapping.js#L158)). Brightness is already its own feature, but here it also darkens the color.
> \- I checked with the same formula:
> 
> | Color | bri 254 | bri 64 (25 %) | bri 25 (10 %) |
> |---|---|---|---|
> | Warm white \`xy 0.4573, 0.41\` | \`#ffaf5d\` | \`#b97d3f\` (brown) | \`#785026\` |
> | Red | \`#ff0000\` | \`#ff0000\` | \`#c60000\` |
> 
> \- Consequences:
> - the color picker shows a wrong color;
> - every brightness change also publishes a color change;
> - a scene that copies the "current color" reapplies a darkened color.
> \- HA keeps the chromaticity (\`xy\`) separate from brightness. Its v1 code also clamps colors to the light's gamut (\`capabilities.control.colorgamut\`); without that clamp, the color Gladys sends and the one the bridge reports back differ, and the picker jumps.
> 
> \*\*Suggestion:\*\* compute the color at full luminance (\`Y = 1\`), and apply the gamut on the command side.
> 
> \### 🟡 4.10 Effects, scene options, transitions
> 
> \- \*\*Effects:\*\* HA exposes the v2 effects and the sunrise/sunset timed effects (\[\`v2/light.py#L134\`\](https://github.com/home-assistant/core/blob/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue/v2/light.py#L134)). Gladys could expose them as \`effect-mode\` with \`supported\_options\`, filled from each light's \`effects.status\_values\`.
> \- \*\*Scenes:\*\* the scene action could gain optional fields for \*dynamic\* (the palette only plays through v2), \*brightness\* and \*transition\*, plus smart scenes (v2-only).
> \- \*\*Gradient lights:\*\* HA now creates one entity per segment (\[\`v2/light.py#L367\`\](https://github.com/home-assistant/core/blob/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue/v2/light.py#L367)).
> 
> \### 🟡 4.11 No recovery path when the certificate changes
> 
> \- Once a fingerprint is pinned, any other certificate is refused as a "possible impersonation" (\[\`https.js#L71\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/https.js#L71)), and the bridge stays unusable until it is paired again.
> \- Signify has already replaced the bridges' self-signed certificates with certificates from its own CA through a firmware update. A certificate renewal would cut the bridge off the same way.
> 
> \*\*Suggestion:\*\* accept a new certificate if it chains to the Signify Hue root CA (published on the developer portal) \*\*and\*\* its CN is the bridge id, then pin it again. Pinning stays the fallback for old self-signed certificates.
> 
> Also, the comment in \[\`https.js#L10\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/https.js#L10) says this is "the same trust model Home Assistant uses". That is not accurate: aiohue disables TLS verification entirely (\`ssl=False\`, \[\`v2/\_\_init\_\_.py#L223\`\](https://github.com/home-assistant-libs/aiohue/blob/edfdc8a8e320d0f30628f882c0902b4ab0595d19/aiohue/v2/\_\_init\_\_.py#L223)). The integration is \*\*stricter\*\* than HA here, which is good; it just needs a way to recover.
> 
> \### 🟢 4.12 Smaller items
> 
> \- \*\*Capabilities:\*\* they are detected from the \`type\` string (\[\`mapping.js#L56\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/mapping.js#L56)).
> - An unknown type falls back to on/off only, whereas HA's v1 code falls back to \*full\* support, and v2 describes capabilities per resource.
> - \`capabilities.control\` (\`colorgamuttype\`, \`ct\`) and the keys present in \`state\` would be more reliable.
> \- \*\*Temperature bounds:\*\* \`ct\` bounds equal to \`0\` are accepted (\[\`mapping.js#L192\`\](https://github.com/cicoub13/gladys-philips-hue/blob/5de09d7e012f56cf3978cc5f32c05a611ee73230/src/hue/mapping.js#L192)). HA falls back to 153–500 when a bound is missing or zero. With \`0\`, the temperature feature becomes unusable.
> \- \*\*Smart plugs\*\* (\`On/Off plug-in unit\`) are published in the \`light\` category. In Gladys, a "turn off the lights" scene action would then cut a plug that may power something else entirely. The \`switch\` category would be safer. HA exposes plugs as lights too, so this would be an improvement over HA.
> \- \*\*Device information:\*\* model, manufacturer and firmware are not published (\`modelid\`, \`productname\`, \`swversion\`); they could go in \`params\`. \*\*Identify\*\* (\`alert: select\`) is not supported either.
> \- \*\*Echoed temperature:\*\* the value echoed after a temperature command is the requested one, not the clamped one actually sent.
> \- \*\*AGENTS.md\*\* says \`CHANGELOG.md\` "stops at 1.1.1"; it now goes up to 2.0.3.
> 
> \---
> 
> \## 5. Already at or above Home Assistant's level
> 
> \- \*\*100 % local\*\*, link-button pairing, and the outcome is split per cause (paired / button not pressed / unreachable / not a bridge) with an actionable message.
> \- \*\*Bridge identification\*\* through \`/api/config\`: printers and NAS found by a noisy mDNS scan are never offered as bridges.
> \- \*\*HTTPS fallback at identification:\*\* new pairings work on firmware 1.78, where HA's pairing currently fails.
> \- \*\*TLS:\*\* certificate CN checked against the bridge id, then the fingerprint is pinned. aiohue does not verify at all.
> \- \*\*Credential care:\*\* the username never appears in logs (\`redact\`), \`bridges.json\` is \`0600\` and written atomically, and a failed write is reported instead of failing the pairing.
> \- \*\*Resilience:\*\*
> - background resync with backoff and jitter;
> - an empty device list is never published, so the Discovery tab is not wiped by a network glitch;
> - \`commandSeq\` stops a stale read from undoing a command;
> - IP-based external\_ids are preserved through \`platformKey\`.
> \- \*\*Hue scenes by name:\*\* forgiving matching, and when it fails the error lists the scenes and rooms that exist.
> \- \*\*BSB001 support\*\*, like HA's v1 code.
> \- \*\*Unit tests\*\* cover the pairing, discovery, HTTPS, store and refresh paths.
> 
> \## 6. Suggested roadmap
> 
> \*\*Phase 0: patch release (urgent)\*\*
> \- Automatic HTTP → HTTPS switch with the same key, and HTTPS first at identification (§1).
> \- Light availability: transport pill, plus on/off = 0 when \`reachable: false\` (§4.1).
> \- "Forget bridge" action (§4.6).
> \- Color at full luminance (§4.9).
> \- Fix the IP-change paragraph in the docs (§4.7).
> 
> \*\*Phase 1: v2 foundation (as HA, homebridge-hue2 and openHAB do)\*\*
> \- Detect a v2 bridge like aiohue's \`is\_v2\_bridge\`: \`GET https://\<ip\>/clip/v2/resource\` answers \`403\` without a key.
> \- Use the v2 API on BSB002/BSB003 and keep v1 for BSB001.
> \- \*\*Keep the external\_ids:\*\*
> - a v2 light carries \`id\_v1\` (\`/lights/\<n\>\`), which maps it back to the v1 \`uniqueid\` used today;
> - this mapping needs a test before any release, because a changed external\_id orphans every device users have created.
> \- Event stream with reconnection, plus polling as a fallback.
> \- One request queue per bridge (§4.5).
> \- Discovery: mDNS first and merge by bridge id (§4.8); automatic IP update (§4.7); detection of a migrated bridge (§4.6).
> 
> \*\*Phase 2: HA parity\*\*
> \- Rooms and zones as grouped lights (§4.4).
> \- Motion, light level, temperature, battery, contact and tamper sensors; buttons and Tap Dial rotation; MotionAware.
> \- Switches to enable/disable sensors and Hue automations.
> \- Effects, gradient segments, scene options (dynamic, brightness, transition), smart scenes.
> 
> \*\*Phase 3: polish\*\*
> \- Device information, identify, plugs as \`switch\`, chain verification against the Signify CA (§4.11).
> 
> \## 7. Suggested hardware test matrix
> 
> \- BSB001
> \- BSB002 on a firmware that still accepts HTTP
> \- BSB002 on 1.78+
> \- BSB003
> \- a BSB002 → BSB003 migration
> \- two bridges at once
> 
> Each one with: an Extended color light, a Color temperature light, a Dimmable light, a smart plug, a third-party bulb (IKEA/Innr), a gradient strip, a motion sensor, a dimmer switch and a Tap Dial.
> 
> \## References
> 
> \- Signify: \[Hue developer news\](https://developers.meethue.com/): "Deprecation of HTTP support" (2025-06-04), "APIs available for MotionAware and migration to Bridge Pro" (2025-09-04), "Multi-bridge migration support is live" (2025-12-15)
> \- HTTP blocked on BSB002 \`1.78.0\`: \[home-assistant-libs/aiohue issue 708\](https://github.com/home-assistant-libs/aiohue/issues/708)
> \- Bridge Pro is HTTPS-only, no UPnP, MotionAware is v2-only, certificates changed: \[ebaauw/homebridge-hue issue 1219\](https://github.com/ebaauw/homebridge-hue/issues/1219), \[soffes/hue pull request 56\](https://github.com/soffes/hue/pull/56)
> \- Home Assistant: \[\`homeassistant/components/hue\`\](https://github.com/home-assistant/core/tree/7deeb959c2a72aaa55d8b7a89b3be321c74c0666/homeassistant/components/hue), \[aiohue\](https://github.com/home-assistant-libs/aiohue/tree/edfdc8a8e320d0f30628f882c0902b4ab0595d19)
> \- Gladys: external integration spec (\`docs/specs/external-integrations/\`: \`publishTransports\`, \`supported\_options\`, \`network\_discovery\`), \`DEVICE\_FEATURE\_CATEGORIES\` in \`server/utils/constants.js\`

**An urgent point:** since firmware 1.78, which is currently being deployed, Hue v2 bridges refuse HTTP and respond with a 403 error « HTTP access is blocked ». However, the integration chooses HTTP or HTTPS once, at the time of pairing, and tries HTTP first. Almost all existing installations are therefore in HTTP: as soon as the bridge updates, no commands go through anymore.

- In the meantime, simply re-pair the bridge.
- The fix does not require new pairing: just try again in HTTPS with the same key.

**To reach Home Assistant’s level** , three things are mainly missing:

- the v2 API with the event stream, to have real-time state changes instead of a refresh every 60 seconds;
- sensors (motion, brightness, temperature, opening) and remotes;
- Hue rooms and zones.

All of this can be represented in Gladys.

There are also very good points: on HTTPS pairing and certificate verification, the integration even does better than Home Assistant. The issue ends with a proposal for a roadmap in 4 phases.

It’s a code review, I haven’t tested anything on a real bridge. Don’t hesitate if a point seems wrong to you or if you want to discuss it!

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [November 24, 2026, 10:02pm UTC](https://community.gladysassistant.com/t/audit-integration-externe-philips-hue/11669/2 "2026-11-24T22:02:07Z")

</div>

Thank you so much for this audit, it is very comprehensive and saved me a lot of time 🙏

The entire phase 0 of the roadmap is corrected and published in the **[v2.1.0](https://github.com/cicoub13/gladys-philips-hue/releases/tag/v2.1.0)** :

- 🔴 **Firmware 1.78 blocking HTTP** : a bridge paired in HTTP automatically switches to HTTPS, with the same key, without pressing the button or re-pairing. New pairings try HTTPS first. **If your bridge has updated recently and your lights no longer respond, update the integration.**
- **Lamp turned off at the switch** : it now appears off in Gladys, with an “unreachable” badge on the Devices page. Scene conditions of the type “if the lamp is on” become accurate again.
- **New “Forget Unreachable Bridges” button** , to clean up after a bridge replacement or migration to a Hue Bridge Pro. A bridge that is simply busy or restarting is never forgotten.
- **The color no longer darkens when lowering the brightness** : a dimmed warm white no longer appears brown.
- The documentation now explains what to do when the bridge IP changes, and how to replace a bridge.

The details are in [this issue comment](https://github.com/cicoub13/gladys-philips-hue/issues/48#issuecomment-7145644011). The remaining small points are tracked in [#51](https://github.com/cicoub13/gladys-philips-hue/issues/51).

I haven’t been able to test everything on real hardware yet. Feedback is therefore welcome, especially if you have a bridge with firmware 1.78 or a Hue Bridge Pro.

Next up is phase 1: switching to API v2, real-time updates instead of polling, and lights that keep their devices after a bridge replacement.

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [November 25, 2026, 9:49am UTC](https://community.gladysassistant.com/t/audit-integration-externe-philips-hue/11669/3 "2026-11-25T09:49:15Z")

</div>

Phase 1 of the roadmap is published in the **[v2.2.0](https://github.com/cicoub13/gladys-philips-hue/releases/tag/v2.2.0)** release:

- ⚡ **Real-time updates** : with a square bridge (firmware 1.48 or newer) or a Hue Bridge Pro, the integration receives the event stream from the API v2. A change made in the Hue app, with a dimmer, a wall switch, or a Hue automation appears immediately in Gladys. Before, you had to wait for the next refresh, up to one minute. Periodic refresh remains active for security and is used for the round bridge. A bridge paired in HTTP automatically switches to HTTPS to take advantage of this, without re-pairing.
- **Gladys scenes that control many lamps no longer lose commands** : requests to a bridge are spread out, and retried when the bridge says it is busy.
- **Bridge changing IP address** : it is found automatically on the network, without re-pairing. „Discover bridges“ also finds it immediately. The only exception is a bridge still paired in simple HTTP, like the round bridge, because there is no way to prove it is the same bridge at the new address. You then need to re-pair it with the button, and its lamps keep their devices.
- **Migration to a Hue Bridge Pro or bridge replacement** : after pairing the new bridge, the integration recognizes that it carries the lamps of the old one. The already created devices continue to work, with their rooms, scenes, and history. Before, all lamps came back as new devices. The button of the new bridge remains necessary: for security, the key of the old one is never sent to a bridge that nothing authenticates.
- **„Discover bridges“ finds all bridges on the network** , including a Pro Bridge next to a square bridge. Discovery goes through mDNS then SSDP and merges the two results. Before, it stopped at the first method that found something.
- **„Pair the bridge“ on an already paired bridge reuses its key** , without a button, instead of creating a new user on the bridge.
- Some robustness fixes, for example for two bridges at the same IP address, or a clock set late at startup.

The details are in [this issue comment](https://github.com/cicoub13/gladys-philips-hue/issues/48#issuecomment-7158388915). The points of [#51](https://github.com/cicoub13/gladys-philips-hue/issues/51) are resolved, except for two known limitations.

For now, the API v2 is only used for real-time. Lamps are still read and controlled in v1, which ensures that existing devices do not change their identifier.

None of this has been tested on a real bridge yet, so your feedback is welcome. It is particularly useful if you have a Hue Bridge Pro, if you have done a migration, or if you can check real-time on a square bridge.

Next up is phase 2: Hue rooms and zones, sensors (motion, brightness, temperature, opening), remotes, and the Tap Dial, then effects.
