Directly send sync broadcast from Python

I have several WLED controllers that I want to sync to the same color and effect.

The way I am doing it now is send a JSON command to one instance, and that in turn sends a sync message to all others.

But to avoid some (unreliable) wifi hops, I would like to send the sync broadcast directly from python.

When I listen to the UDP packages, they do not conform to the protocol stated on the website as they are >1000 bytes long. But I can’t figure out how to decode the package either.

So my questions:

  • can I send the UDP sync packets directly from Python? (I am sure I can..)
  • can I send JSON directly over UDP (to get better control then the regular sync packets)
  • if so, how do I encode them?

Thanks!