WLED UDP Sync
The UDP notifier function of WLED makes it easy to sync multiple lights to the same color/effect, enabled by default. You can set the specific behavior of it in Sync settings, also you can choose if all aspects or only brightness/color/effects are applied.
Additionally, there is a "Sync" quick toggle for it in the main control UI!
In UI settings, you can set whether this button only turns on/off sending (default) or also receiving, with the option
Sync button toggles both send and receive.
If your sync settings are not the way you like on boot, check the
WLED Broadcast section in Sync settings, where you can specify what is sent and received by default:
|If there is a sync notification, whether its brightness should be applied
|Whether the color of the synced device should be applied
|Whether the effect settings should be applied
If all checkboxes are disabled, nothing is received by default after each boot. If the sync is toggled on in the main UI and the corresponding checkbox in UI settings is checked, everything is received.
A sync receiver will not assume the state of the last sender directly after booting, a new packet must be send for it to react.
|Send on direct change
|Whether to send a sync notification when state changed via the web UI or API
|Send on button press
|Whether to send sync when toggled by the physical hardware button
|Send Alexa notifications
|Whether to send sync after changed by Alexa (you may use Alexa groups instead)
|Send Hue notifications
|Whether to send sync after a connected Philips light changed
|Send Macro notifications
|Whether to send sync after a macro was triggered
|Send notifications twice
|Sends notifications twice (if you have issues with UDP packet loss)
The quick toggle in the main UI will only apply to direct changes (UI + API), all other sync type sending behavior remains unaffected.
You can easily group WLED devices (for example all in one room) by changing the UDP port of all devices you want in that group.
From v0.13.0, 8 Sync groups are available. This allows syncing select instances only without changing the UDP port.
For example, you might use one sync group per room you use WLED devices in.
Make sure the sender and receiver you want to sync both have the same sync group ticked (a sender can send to multiple groups and a receiver can listen to multiple groups).
Sync packets received from pre-0.13.0 instances are treated as if sent in sync group 1 only.
Note: this info is partly out of date, see updated functionality in the code (udp.cpp)
When enabled, the module where a value was changed will send an UDP broadcast to a port (default 21324). Other modules that listen on this port will set themselves to the same color.
For interoperability, the protocol was designed so that even modules with different WLED versions can sync. Therefore, if a WLED 0.4 system receives a WLED 0.3 UDP notification it will apply the primary color but keep its current secondary color.
The UDP packet is currently 24 bytes long. It is laid out in the following:
|Packet Purpose Byte*
|Primary Red Value
|Primary Green Value
|Primary Blue Value
|Primary White Value
|Secondary Red Value
|Secondary Green Value
|Secondary Blue Value
|Secondary White Value
|Transition Duration Upper
|Transition Duration Lower
*The notifier protocol is only used if this byte is 0. Otherwise, one of the UDP Realtime protocols will be used.
**The callMode variable specifies the reason for the notification. Every color update has the potential to trigger a notification.
|Do not notify
|Direct Change via UI or API
|Button was pressed
|Update by other notification
|Do not notify
|Other (Req. with &NN)
|Do not notify
|Hue light changed
|Preset Cycle active
|Updated via Blynk
***This is the version of the UDP protocol.
|White Value supported
|Secondary Color supported
|Effect Intensity supported
|Transition Time supported