Skip to main content

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 as 192.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

  1. Create a device of driver type lifx_lan.
  2. Optionally set ip to a subnet-specific broadcast (default 255.255.255.255).
  3. Send the get_devices command. Each LIFX bulb on the LAN replies with its MAC, IP, and label within ~1 second.
  4. Create one zone per bulb. Set zone.address to 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

NameRequiredTypeDescription
ipnostringDiscovery broadcast address. Default 255.255.255.255.
portnointUDP port. Default 56700 — only override behind a port-translating gateway.
discovery_intervalnoint (ms)Re-broadcast cadence. Default 300000.
status_intervalnoint (ms)Per-zone GetLight cadence. Default 5000.

Zone

NameRequiredTypeDescription
addressyesstringBulb MAC as 6 colon-separated hex bytes.
durationnoint (ms)Default fade duration for on/off/level/color. Default 250.

The driver writes these zone attributes from inbound state packets:

AttributeTypeNotes
statestringon / off.
levelintBrightness 0-100.
kelvinintLast reported color temperature.

Commands

CommandArgsNotes
get_devicesBroadcast discovery; returns the list of bulbs that replied within 750 ms.
onaddressPowers the bulb on with the zone's default fade duration.
offaddressPowers off.
set_leveladdress, level (0-100)Brightness. 0 turns the bulb off.
set_coloraddress, hexRGB hex such as #ff8800. Forces saturation to whatever the hex implies; preserves the zone's last kelvin.
set_kelvinaddress, kelvin (2500-9000)White color temperature.
set_hsbkaddress, hue, saturation, brightness, kelvinNative HSBK. h/s/b are 0-100 percent; kelvin 2500-9000.
get_statusaddressForce 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_devices returns an empty list — the bulbs are not on the same broadcast domain, or the host firewall is dropping UDP broadcast. Run tcpdump -ni any port 56700 while 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_devices error on commands — the driver has not seen a StateService reply for that MAC. Either run get_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.