
DDP is a connectionless LED light control protocol based on UDP. DDP supports various color formats, but usually 24-bit RGB or 32-bit RGBW is used. One packet can contain multiple colors, so DDP can also be used to control LED strips such as WS2812. By using connectionless UDP (as opposed to TCP), DDP is suitable for real-time applications and allows you to create fast and responsive animations. The disadvantage of this solution is the lack of retransmission of the packet if it does not reach its destination, but when this protocol is used for animation, it should not be noticeable because new data is constantly being sent and nothing will happen if one packet is lost.
Detailed DDP documentation can be found on the 3waylabs website:
http://www.3waylabs.com/ddp/
But its popular implementations are much more stripped down.
For example Tasmota only loads RGB data from a given offset in the package:
Code: C / C++
IN OpenBeken it works similarly, but there, pixel groups for LED strips are also supported:
Code: C / C++
This is really enough to animate any groups of our LEDs and "smart" strips via the WiFi network.
How to send DDP data?
There are many tools that support DDP, and it`s just as easy to send DDP packets from your own program, but one of the more popular ways to create and manage animations is xLights : :

xLights allows you to combine independent LEDs into groups, create advanced effects, arrange them freely in 2D and 3D space and configure them on the timeline.
To send data to a device, you only need to know it IP address . In this case, it is worth using a fixed IP or IP reservation, otherwise after restarting the router our LEDs may get mixed up...
As for the device itself, I will use an LED lamp from OpenBeken:

On the side OBK turn on the driver DDP : :
startDriver DDP
It is best to enter this in the startup command so that the controller starts every time you reboot. After that, we restart the device:

Then, on the xLights side, we open the Test options from Tools:

We mark the channels of our lamp and make sure on the OBK side whether the lamp is turned on.
As a result, the LED plays a test animation:
The LED strip can be operated similarly .
On the OBK side, the LED strip driver must also be turned on. You also need to specify how many pixels we have on the strip itself. As in this topic:
OpenBeken WS2812B driver (compatible with SM16703P etc.) - short script presentation
// start DDP
startDriver DDP
// start WS2812 etc driver
startDriver SM16703P
// init
SM16703P_Init 50
On the xLights side we also change the number of channels:

Result:
In case of color incompatibilities, we can also set the GRB standard:
// init
SM16703P_Init 50 GRB
Of course, the video only shows a test animation, we can send any combinations we want from xLights, but more about that in the xLights topic.
Summary
DDP is an extremely easy-to-use and useful protocol for creating LED animations. It allows you to control both individual lamps and LED strips. Combined with systems such as xLights, it allows you to create complex LED animations for an entire room or even a house, which I will try to discuss in the next part.
DDP is so simple that we can basically send such packets from our own program or receive them in our own program, which I will present soon.
Basically, the only downside to DDP that I see is what also makes it very light and fast - its connectionlessness. DDP is based on UDP, which does not offer retransmission in the event of a lost packet, so if our target use of DDP assumes that we will send one packet that will set the color and forget about the light, we may be quite surprised if this packet does not arrive.
The solution in such a case is to use MQTT or at least HTTP, both of these protocols operate on TCP, which ensures greater transmission reliability than TCP.
The entire organization of DDP-based effects is so cool that we don`t have to worry about cables and can freely change the configuration many times in the software itself. On the hardware side, all you need is that the lamp/LED has power and access to WiFi, and you can control it.
Has anyone reading created LED effects based on DDP?
The possibilities are really great. Feel free to comment.
Cool? Ranking DIY Helpful post? Buy me a coffee.