Updated UDP Realtime Control (WARLS) (markdown)

This commit is contained in:
Aircoookie 2018-04-12 12:17:25 +02:00
parent f20fc9fed0
commit 08ec543f69
1 changed files with 35 additions and 5 deletions

View File

@ -1,12 +1,23 @@
WLED offers a way to directly drive the connected LEDs via UDP. The protocol is referred to as WLED [Audio-Reactive-Led-Strip](https://github.com/scottlawsonbc/audio-reactive-led-strip) (WARLS), since the support of that project was its primary goal. However, it can also be used for other realtime applications like an ambilight.
WARLS uses the same UDP port the notifier uses (default 21324, can be changed in settings).
At the moment, the HTTP API and webserver will be disabled while active, Alexa and button control remains functional.
It does not support the white channel of RGBW LEDs yet and uses the current brightness and gamma correction settings.
At the moment, the web UI will be disabled while active, the HTTP API, Alexa and button control remains functional.
It uses the current brightness and gamma correction settings.
Byte 0 of the UDP packet has the value 1 which tells the server to use WARLS instead of the default notifier protocol.
Byte 1 tells the server how many seconds to wait after the last recieved packet before returning to normal mode, in practice you should use 1-2 (seconds) here in most cases so that the module returns to normal mode quickly.
After this the LED color information is transmitted like:
Byte 0 of the UDP packet tells the server which realtime protocol to use.
Value | Description
--- | ---
1 | WARLS
2 | DRGB
3 | DRGBW
0 | WLED Notifier
In every protocol, Byte 1 tells the server how many seconds to wait after the last received packet before returning to normal mode, in practice you should use 1-2 (seconds) here in most cases so that the module returns to normal mode quickly after the end of transmission.
After this the LED color information is transmitted like this:
WARLS
Byte | Description
--- | ---
@ -15,6 +26,25 @@ Byte | Description
4 + n*4 | Green Value
5 + n*4 | Blue Value
DRGB:
This mode has the difference that the LED indices are not part of the packet, instead every LED is updated. This leads to a higher speed when all LEDs are changed, but a drastically lower speed if only one LED is updated per packet.
Byte | Description
--- | ---
2 + n*3 | Red Value
3 + n*3 | Green Value
4 + n*3 | Blue Value
DRGBW:
Like DRGB, but supports the White value for RGBW strips.
Byte | Description
--- | ---
2 + n*4 | Red Value
3 + n*4 | Green Value
4 + n*4 | Blue Value
5 + n*4 | White Value
When WARLS mode starts, all LEDs will be black. However, you don't have to change all LEDs using one packet.
Changing a single LED therefore only requires a packet of 2+4 bytes. All LEDs maintain their color until it is changed or the module exits WARLS mode because of a timeout.