Philips Hue smart home integration, free and open source

Control Philips Hue lights (on/off, brightness, color, white temperature) from Gladys, locally.
Overviewβ
Control your Philips Hue lights from Gladys, directly over your local network (no Hue cloud account required).
What you getβ
Each Hue light is exposed as a Gladys device with the features it supports:
| Hue light type | On/Off | Brightness | Color | White temperature |
|---|---|---|---|---|
| On/Off light | β | |||
| Dimmable light | β | β | ||
| Color temperature light | β | β | β | |
| Color light | β | β | β | |
| Extended color light | β | β | β | β |
Changes made outside Gladys β Hue app, wall switch, dimmer, Hue automations β show up in Gladys at once on a square bridge (firmware 1.48 or later) or a Hue Bridge Pro: the bridge pushes them to the integration. The integration also reads your bridge at the interval you choose in Refresh interval (default: every minute), as a safety net; on the round bridge, which pushes nothing, changes show up within that interval. Changes made from Gladys show up right away.
To receive these changes, a bridge paired over plain HTTP is moved to HTTPS on its own, with no new pairing.
A light powered off at the wall (its switch cut) shows as off in Gladys, with an unreachable badge on the Devices page, until it has power again.
Hue scenes in Gladys scenesβ
Requires Gladys 5.1 or later.
The Activate a Hue scene action of the Gladys scene editor recalls a scene created in the Hue app: all its lights take their color and brightness at once, with the bridge's transition.
- Scene: the name shown in the Hue app, for example
Relax. Case and surrounding spaces are ignored. - Room or zone (optional): only needed when several rooms have a scene with
that name, for example
Living room.
When the name matches no scene, or several, the action fails and the scene logs list the scenes (or the rooms) available. The rest of the Gladys scene keeps running.
Prerequisitesβ
- Gladys 5.1 or later.
- A Philips Hue bridge, with your lights already added to it.
- Physical access to the bridge: pairing asks you to press its round link button.
- No Hue cloud account is needed.
- The container must be able to reach the bridge on your LAN (HTTP on port 80, or HTTPS if your bridge no longer accepts plain HTTP).
Configurationβ
- Make sure your Hue bridge is powered on and connected to the same local network as your Gladys server.
- Open the integration Configuration screen and click Discover bridges.
The IP address of your bridge should appear. If auto-discovery fails, type
the bridge IP address in the Bridge IP address field (a plain address or
hostname, for example
192.168.1.42β anything else is ignored and the button tells you so). - Press the round link button on top of the Hue bridge.
- Within 30 seconds, click Pair bridge. On success, your lights appear in the Discovery tab, ready to be created as devices.
Replacing a bridgeβ
After replacing your bridge or migrating to a Hue Bridge Pro, pair the new one (steps above).
The integration recognizes the new bridge as the replacement of the old one when the old one no longer works (or was forgotten) and the new one holds at least half of its lights created in Gladys. It then takes the old bridge's place: the lights already created keep working, with their rooms, scenes and history, and the message says which bridge it replaces.
Otherwise, the lights of the new bridge appear as new devices in the Discovery tab. Click Forget unreachable bridges: the integration forgets every paired bridge that no longer answers, or no longer accepts the integration, so it stops reporting it unreachable. A bridge that still works is never forgotten, even a busy one, and neither is one that has only just stopped answering (it may be restarting): click again once it has been silent for 5 minutes. Then delete the old devices from the Devices page.
How the bridge is foundβ
- mDNS (
_hue._tcp) on your local network, performed by Gladys on the integration's behalf: the method Philips recommends, and the only one a Hue Bridge Pro answers; - SSDP, same mechanism, for the bridges whose mDNS does not reach Gladys. The bridges both methods find are merged, so several bridges (a square bridge and a Bridge Pro, say) are all found;
- Philips' N-UPnP endpoint (
discovery.meethue.com) as a last resort. This one is a Philips cloud service: it needs Internet access and only returns bridges seen from the same public IP address. It is only used when the two local methods find nothing.
Whichever method finds it, every device is verified before being offered to
you: the integration asks it for its Hue identity card (/api/config). Devices
that do not answer like a Philips Hue bridge β a printer, a NAS, a speaker β are
discarded, and the message tells you how many were.
Notesβ
- The pairing credentials (the bridge username) are stored in the integration
data volume (
/data) and survive restarts. You only pair once. - Controlling your lights is always 100 % local: commands and state reads go straight to the bridge over your LAN. Only the last-resort discovery step above may contact a Philips server, and only while you look for your bridge.
- HTTPS security: a Hue bridge serves a certificate issued by Philips rather than by a public authority. On first contact the integration checks that this certificate carries the bridge's own identifier, then remembers its fingerprint. On later connections any different fingerprint is refused, so a device impersonating your bridge is blocked.
Troubleshootingβ
The integration logs are available in Gladys, from the Configuration tab of the integration, alongside the supervision controls (start, stop, restartβ¦).
"No Hue bridge found" while the bridge is powered on: check that it sits on the same network as Gladys (a guest network or a separate VLAN makes it invisible). If the message says other devices answered but none is a Hue bridge, discovery did see your network but not the bridge: type its address in Bridge IP address. You will find it in the Hue app, under Settings β My devices β Bridge.
"The link button was not pressed": the bridge was found, only the pairing is missing. Press the round button on top of the bridge, then click Pair bridge again within the next 30 seconds.
Lights stopped responding: the bridge may have changed IP address. The integration looks for it on your local network in the background, and follows it to its new address with no new pairing; Discover bridges does the same right away. If the lights still do not come back, press the link button on the bridge, then click Pair bridge again. Your lights keep their devices in Gladys. Reserve the bridge address in your router all the same, so it does not change again. Two exceptions:
- A bridge still paired over plain HTTP (the round bridge, or a square bridge the integration has not moved to HTTPS yet) is not followed: nothing proves that what answers at the new address is your bridge, and its key would be sent there in clear. Pair it again (link button): its lights keep their devices.
- A bridge paired with version 1.1.0 or earlier through Bridge IP address, that the integration has not reached since you updated it, is not followed, and comes back with new devices.
Lights stopped responding after a bridge firmware update: since firmware
1.78, the bridge refuses plain HTTP. A bridge paired over HTTP is switched to
HTTPS automatically, with no new pairing, and the logs say Bridge β¦ blocks plain HTTP, switched to HTTPS. If the logs show HTTPS failed too instead,
press the link button on the bridge and click Pair bridge again: your
lights keep their devices in Gladys.
"Hue bridge unreachable. Check that it is powered on and on the same network
as Gladys." in the connection status: the paired bridge no longer answers.
While it is away, a command may fail with Hue bridge unreachable: light β¦ will be available again as soon as the bridge answers. The integration keeps trying in
the background, and the lights come back on their own once the bridge answers.
If that bridge is gone for good (replaced, migrated to a Hue Bridge Pro), click
Forget unreachable bridges (see "Replacing a bridge"). A bridge that was
reset only needs to be paired again.
"A Hue bridge was found but could not be paired": the bridge answered
discovery, then failed during pairing. Check that it stays reachable from
Gladys, then click Pair bridge again. The integration logs give the reason
(Pairing with β¦ failed: β¦).
"β¦ but the credentials could NOT be saved": pairing worked, but the
integration could not write to its data volume (/data). Your lights work
until the next restart, after which you will have to pair again. Check that the
integration data volume is writable.
Bridge β¦ is no longer paired, pair it again from the Configuration screen
when you control a light, or "No Hue bridge paired yet": run Discover
bridges and Pair bridge again (see "Configuration").
Configuration settingsβ
These are the settings Philips Hue asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Pairing your Hue bridge | section | No | Use the buttons below: first "Discover bridges" to find your Hue bridge on the network, then press the physical link button on top of the bridge and click "Pair bridge" within 30 seconds. You can also fill the bridge IP manually if auto-discovery fails. |
| Bridge IP address (optional) | string | No | Only needed if automatic discovery does not find your bridge. Example: 192.168.1.42 |
| Refresh interval | select | No | How often the light states are read from the bridge. A square bridge or a Bridge Pro also pushes changes at once: this refresh is then a safety net. |
How to install Philips Hue in Gladysβ
- In Gladys, open Integrations: Philips Hue appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/cicoub13/gladys-philips-hue:2.2.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/cicoub13/gladys-philips-hue.
Philips Hue requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
Related guidesβ
- Philips Hue without the bridge: pair Hue bulbs directly with a Zigbee dongle instead.
About external integrationsβ
Philips Hue is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by cicoub13, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub β source of this documentation