LIFX (LAN)
LIFX Wi-Fi color bulbs, BR30, beams, tiles, strips, and switches via the LIFX LAN protocol on UDP port 56700.
This driver does not require the LIFX cloud account. The bulbs are addressed directly on the LAN by their MAC and respond to a binary UDP packet protocol that LIFX has published as part of their open developer docs.
Prerequisites
- GEM and the LIFX bulbs share the same Layer-2 broadcast domain. UDP broadcast on
255.255.255.255:56700(or the subnet broadcast such as192.168.1.255) must reach the bulbs. - Bulbs onboarded to the same Wi-Fi via the LIFX mobile app at least once. Cloud login is not required for ongoing control.
- No mesh APs or VLANs that block broadcast / multicast between the GEM host and the bulb subnet.
If GEM and the bulbs are on different VLANs, use the optional ip attribute to set a subnet-specific broadcast address (e.g. 192.168.50.255) and route that broadcast explicitly.
Setup
- Create a device of driver type
lifx_lan. - Optionally set
ipto a subnet-specific broadcast (default255.255.255.255). - Send the
get_devicescommand. Each LIFX bulb on the LAN replies with its MAC, IP, and label within ~1 second. - Create one zone per bulb. Set
zone.addressto the colon-separated MAC (e.g.d0:73:d5:12:34:56). The driver caches the bulb's IP, so DHCP renewals are handled by the periodic re-discovery.
Attributes
Device
| Name | Required | Type | Description |
|---|---|---|---|
ip | no | string | Discovery broadcast address. Default 255.255.255.255. |
port | no | int | UDP port. Default 56700 — only override behind a port-translating gateway. |
discovery_interval | no | int (ms) | Re-broadcast cadence. Default 300000. |
status_interval | no | int (ms) | Per-zone GetLight cadence. Default 5000. |
Zone
| Name | Required | Type | Description |
|---|---|---|---|
address | yes | string | Bulb MAC as 6 colon-separated hex bytes. |
duration | no | int (ms) | Default fade duration for on/off/level/color. Default 250. |
The driver writes these zone attributes from inbound state packets:
| Attribute | Type | Notes |
|---|---|---|
state | string | on / off. |
level | int | Brightness 0-100. |
kelvin | int | Last reported color temperature. |
Commands
| Command | Args | Notes |
|---|---|---|
get_devices | — | Broadcast discovery; returns the list of bulbs that replied within 750 ms. |
on | address | Powers the bulb on with the zone's default fade duration. |
off | address | Powers off. |
set_level | address, level (0-100) | Brightness. 0 turns the bulb off. |
set_color | address, hex | RGB hex such as #ff8800. Forces saturation to whatever the hex implies; preserves the zone's last kelvin. |
set_kelvin | address, kelvin (2500-9000) | White color temperature. |
set_hsbk | address, hue, saturation, brightness, kelvin | Native HSBK. h/s/b are 0-100 percent; kelvin 2500-9000. |
get_status | address | Force a one-shot GetLight read for one bulb. |
Zone address format
d0:73:d5:12:34:56 — six lowercase hex bytes, colon-separated. The MAC is shown in the LIFX mobile app under bulb settings, or returned by get_devices. Dashes and dots are tolerated as separators on input but are normalized to colons.
Known limitations
- Broadcast discovery does not cross subnets without a UDP relay.
- This driver implements core lighting commands only. Effects (waveform / pulse / breathe), HEV cycle, infrared on/off (LIFX+ models), and the multi-zone color-strip API are not yet supported.
- LIFX Switch (multi-button) is recognized as a discoverable device but its button-press events are not yet surfaced as triggers.
Troubleshooting
get_devicesreturns an empty list — the bulbs are not on the same broadcast domain, or the host firewall is dropping UDP broadcast. Runtcpdump -ni any port 56700while triggering discovery; expect to see packets going out and replies coming in. If outbound only, your subnet is dropping broadcast.bulb not discovered yet — run get_deviceserror on commands — the driver has not seen a StateService reply for that MAC. Either runget_devices, or wait for the next periodic discovery (default 5 minutes). New zones are not pushed commands until the bulb's IP is cached.- Wrong color or brightness — verify the bulb is in HSBK color mode (not white-only). LIFX A19 / Color models support full HSBK; LIFX White and Filament bulbs honor only the kelvin + brightness fields.