LIFX smart home integration, free and open source

LIFX bulbs, strips and matrices on the local network: colors, whites, effects, pulse.
Control your LIFX bulbs, strips and matrices from Gladys, on the local network, with the official LIFX LAN protocol: no cloud, no account, no key.
Developed without the hardware: feedback welcome. The integration was built from the public LIFX protocol and tested against simulated lights. If something does not behave as described, please open an issue: https://github.com/guim31/gladys-lifx/issues
This integration is not affiliated with LIFX.
Overview
- Every LIFX light becomes a Gladys light: on/off, brightness, color, white temperature (in kelvins, within the range of your model).
- Nightvision bulbs get their infrared level.
- Strips (Z, Beam, Neon, String, Permanent Outdoor...) and matrices (Tile, Candle, Ceiling, Spot, Path, Tube...) are controlled as a whole (on/off, brightness, one color for the whole light), and get the list of their built-in effects.
- Two scene actions: Pulse a LIFX light (an alert in color that ends by itself) and Start a LIFX effect (Move, Morph, Flame).
- The connection of each light is shown, and kept in the history.
Requirements
- Gladys 5.1 or later.
- LIFX lights set up in the LIFX app and connected to the same network as Gladys. The LIFX app is no longer needed afterwards.
- The lights answer on UDP port 56700. Gladys finds them by a broadcast on the local network: if Gladys and the lights are on different networks (VLAN, guest Wi-Fi), enter their IP addresses in the configuration.
Configuration
- Install the integration (Integrations → Install from GitHub, or from the store).
- Open the Configuration tab. Every field is optional:
- IP addresses of LIFX lights: only for the lights the automatic discovery does not find, separated by commas. Give them a fixed address in your router.
- Refresh interval: how often each light is read (10, 15, 30 or 60 seconds, 15 by default), to follow the changes made from the LIFX app, a voice assistant or a wall switch.
- Transition: a fade for the changes made from Gladys (none by default, up to 5 seconds).
- Language of the feature names: the language of the names given to the features of new lights (French by default).
- Open the Discovery tab and add your lights. Their names are the ones given in the LIFX app; you can rename them in Gladys.
The Search for LIFX lights button of the Configuration tab looks for the lights again and lists the ones found, with their address and model.
Devices and features
Each light is one Gladys device, keyed on its serial number: it keeps its history, scenes and dashboards when its IP address changes.
| Feature | Lights | What it does |
|---|---|---|
| Light | all | on/off |
| Brightness | all | 0 to 100 %; 0 turns the light off |
| Color | color lights | the color; never changes the brightness |
| Color temperature | lights with a white range | the white in kelvins, within the range of the model and firmware |
| Infrared | Nightvision | 0 to 100 % of the infrared power |
| LIFX effect | strips and matrices | None, the effects of the light, Other effect (read only) |
| Connection | all | 1 when the light answers, 0 when it does not (read only) |
A color, a white or a brightness also turns the light on. A light that is off takes its new color first, then fades on: it never flashes its old color. A color or a white stops the running effect, which would cover it.
The color is shown while the light shows a color, the color temperature while it shows a white. A light that no longer answers (switched off at the wall, power cut) is shown off, with Connection at 0 and the "unreachable" badge.
Effects of the LIFX effect list: Move slides the colors of a strip; Morph blends colors and Flame flickers on a matrix. From the list, they start with their default settings; the scene action gives the choice of the speed, the direction and the colors. An effect started from the LIFX app that the integration does not start itself (Sky, Color sweep...) shows as Other effect.
Scene actions
Pulse a LIFX light
The light blinks or breathes in a color, a number of times, then goes back to what it showed. A light that is off lights up for the pulse and goes back off after it, with its color. Made for alerts: a door left open, the washing machine done, someone at the door.
- LIFX light: the light.
- Color: red, orange, yellow, green, cyan, blue, purple, pink or white (white bulbs pulse in white).
- Pulse: Blink (on and off) or Breathe (smooth).
- Length of one cycle: 0.25 to 5 seconds.
- Number of cycles (1-50): 3 by default.
Output: Duration of the pulse (s), to wait for its end in the scene.
Start a LIFX effect
Turns the light on and starts a built-in effect, which runs until stopped (another effect, a color, a white, or Stop the effect).
- Effect: Move (strips), Morph (matrices), Flame (matrices) or Stop the effect.
- Speed: slow, normal or fast.
- Direction (Move): right or left.
- Colors: rainbow, fire, ocean, forest, pastel, or Colors already shown (Move). Move paints them along the strip before sliding them; Morph blends them; Flame keeps its own colors.
Output: Effect running (move, morph, flame, none).
Why no widget
The Gladys light box already shows and controls everything a LIFX light does: on/off, brightness, color, white, infrared and the effect list. The pulse and the effects with their settings are scene actions, where they are useful (alerts, ambiances). A LIFX widget would only repeat the light box, so there is none.
Scene examples
- Door left open: when the door sensor stays open 5 minutes → Pulse a LIFX light, the living room light, orange, Blink, 1 second, 5 cycles.
- Doorbell: when the doorbell rings → Pulse a LIFX light, the office light, blue, Breathe, 0.5 seconds, 6 cycles (one action per light to warn).
- Movie night: at 9 pm, when the TV turns on → Start a LIFX effect, the TV strip, Move, slow, ocean; and Stop the effect when it turns off.
- Light switched off at the wall: when Connection of a light goes to 0 for 10 minutes → send a message "the hall light is unpowered".
Network traffic and limits of the protocol
- The LIFX protocol has no push: each light added to Gladys is read at the refresh interval (one or two small UDP packets, three for a strip or a matrix). LIFX asks clients to stay under 20 messages per second per light: the integration sends one message at a time per light, far below.
- Gladys only receives the values that changed, plus the unchanged ones every 6 hours so that the history stays fresh.
- The lights are searched again every 15 minutes, to follow their address changes and find new ones.
- The integration reads the lights with its own timer: Gladys does not poll
them (the devices are published with
should_poll: false).
Troubleshooting
- No light found: check that the lights are set up in the LIFX app and on the same network as Gladys. Automatic discovery goes through Gladys (Gladys 5.1 or later); on another network, enter the IP addresses.
- A light is "unreachable": it is switched off at the wall, or its address changed. The integration finds it again by itself at the next search; give it a fixed address in your router to avoid it.
- The changes made in the LIFX app show late: they show at the next read; choose a shorter refresh interval.
- An effect does nothing: Move only exists on strips, Morph and Flame on matrices. Move with Colors already shown (Move) on a strip of one color shows no movement: choose a palette.
- Logs: the integration logs only what matters (start, lights found, lost
and back, errors). For the details, set
LOG_LEVEL=debugon the container.
Limitations
- Developed without the hardware: the behavior on real LIFX lights is still to be confirmed.
- Strips and matrices are controlled as a whole: no color per zone.
- The color shown for a strip or a matrix is the one the light reports for the whole device (its first zone).
- Not handled: the LIFX Switch (relays and buttons), the HEV cleaning cycle of the LIFX Clean bulbs (the bulb itself works as a color light), the Sky and Color sweep effects (shown as Other effect), the LIFX cloud and scenes of the LIFX app.
- A product newer than the product list of the integration is handled as a color light with a 1500-9000 K white range, until an update.
Configuration settings
These are the settings LIFX asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Finding your LIFX lights | section | No | LIFX lights on the same network as Gladys are found automatically: open the Discovery tab. Set them up in the LIFX app first. If one is missing, enter its IP address below. |
| IP addresses of LIFX lights | string | No | Optional, separated by commas. Only needed for the lights automatic discovery does not find. |
| Refresh interval | select | No | How often each light is read, to follow the changes made from the LIFX app, a voice assistant or a wall switch. |
| Transition | select | No | Fade of the changes made from Gladys: on, off, brightness, color and white. |
| Language of the feature names | select | No | Names given to the features of new lights (Light, Brightness, LIFX effect...). The light names come from the LIFX app. |
How to install LIFX in Gladys
- In Gladys, open Integrations: LIFX appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-lifx:1.0.1), 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/guim31/gladys-lifx.
LIFX 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.
About external integrations
LIFX 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 guim31, not by the Gladys core team.
- Browse all external integrations
- Discover the native integrations built into Gladys
- Build and publish your own external integration
- Source code on GitHub — source of this documentation