Sync and Integrations
One controller is a light. Several, plus
a house that already has opinions, are a
system. WLED has four outward faces for
that: it can sync with its siblings,
take buttons and events, join
MQTT, and plug into Home
Assistant and the stage-lighting
world. All are offshoots of the same
state machine, and all are configured on
the Sync settings page (settings_sync.htm)
and its neighbours.
WLED-to-WLED sync
Devices can announce their state to each
other over the local network (UDP), so
one controller's change ripples to the
rest — the classic setup is a row of
shelves or a house outline run from
whichever one you happen to touch.
Membership is by sync groups: the
state object carries the whole idea in
its udpn member —
"udpn": { "send": true, "recv": true, "sgrp": 1, "rgrp": 1 }
— send and receive switches, and the group bitmask each way, so a device can drive group 1, listen to group 2, and ignore a third installation entirely. Alexa emulation and the older sync protocols live on the same settings page; keep the switches you do not use off, because every open door is also a way for stray traffic to change your lights.
Buttons close the loop back to the physical world. A pushbutton (the default pin is GPIO0 on many boards), a touch pad, or a PIR motion sensor can be wired to the board and given actions: the first button defaults to short press toggles power, long press picks a random colour (further buttons default to cycling effects, brightness and palettes) — and any press can instead fire a preset, including a macro preset (chapter 10), which is how a dumb wall switch runs an API command. A relay output on another pin can cut the strip's power entirely when off, so "idle" draws nothing at the wall.
MQTT
WLED can publish its state to an MQTT
broker and take orders from one — the
cfg.json keys are exactly the shape you
would expect (if.mqtt: broker, user,
password, client ID, retain flag, and a
topics group for device and group
topics). It speaks plain JSON state
fragments on its topics, so anything in
an MQTT house — Node-RED, a dashboard, a
shell script with mosquitto_pub — can
drive the lights, and the lights report
back the same way. (The series has a
whole guide to MQTT itself; it is
linked at the end of this one.)
Home Assistant
Home Assistant discovers WLED devices on the network and offers a native integration: each device becomes lights (one per segment), with effect and palette selectors, preset selection, and the switches the firmware exposes. It is the smoothest path from "strip on a shelf" to "scene in the evening automation", and it is entirely local — discovery and control never leave your network.
The integration's limits are worth the
project's own honesty. It exposes the
primary colour of a segment, not the
secondary and tertiary slots some
effects use; custom palettes do not
appear in its palette selector (the
workaround in both cases is the
standing one: build the look in WLED,
save it as a preset, and let Home
Assistant select the preset). A device
configured with a CCT (tunable-white)
bus has a documented incompatibility
with the native integration in recent
Home Assistant versions. None of these
are dead ends — the JSON API is always
underneath, one rest_command away.
Hue, and the stage doors
Two more faces, briefly. WLED can
sync to Philips Hue lights (the
if.hue settings: bridge address,
polling interval, which lights mirror
the first segment) — a one-way mirror
that lets a strip follow a Hue scene.
And for software that thinks in shows
rather than rooms, WLED listens to the
realtime protocols of the lighting
world: E1.31 (sACN) and Art-Net
DMX-over-network, DDP, and TPM2,
plus the UDP realtime mode things like
Hyperion (screen ambilight) feed it.
While a realtime stream is active it
overrides local effects — the state
object's lor (live override) and
info's live flag say so — which is
either exactly what you want or the
answer to "why won't it listen to me",
depending on the evening.