Controlling moving head light via DMX

Hello everyone,

I currently have an ESP32 with WLED SR controlling led strips, and everything works perfectly. I also have a moving head wash light, which I always used with its integrated sound reactive mode.
I would like to upgrade the whole setup by connecting this light to my ESP32 via DMX, so that all lights are synchronized. But I believe that by doing that, the head will not be moving, which clearly downgrades its effect for parties.

So, here’s my question : is it possible for WLED to control the color, intensity, etc. of the moving head light, but to also have its position still randomized (or cycling throught position presets, idk) ?

Also, if anybody has any idea to achieve this effect another way, please lmk :slight_smile:

Thanks!

As far as I know WLED can only send a 0, 255, red value, green value, blue value or brightness value on a given DMX channel…

It doesn`t have any understanding of movement…

You could try assigning the R,G or B values to the X/Y channels of your moving light and you would get movement related to those values…

If that makes sense…

Update: I achieved what I wanted to do! :slight_smile:
I modified the WLED 0.13.3 code myself in VSCode with PlatformIO (I was having issues with the 0.14.0-b1 for some reason).

In the wled00/dmx.cpp file, I defined two arrays of numbers equally spaced between 0 and 255, one for the TILT (vertical) value of the light, one for the PAN (horizontal) value. They basically represent the angles I want the moving head to get to. For example, I wrote 8 values for the PAN, so that there’s a position every 45°.

In the same file, I added two new switch cases that each pick a random number in the corresponding array, and send it to the DMX output, just like the existing cases.

Finally, to be able to select these options in the WLED DMX output menu, I added two new “option” tags (“TILT random” and “PAN random”) in the “select” tag of the element with the id “dmxchannels” in the wled00/data/settings_dmx.htm file. The value of each tag is the corresponding integer in the switch case I talked about above.

Once the firmware is compiled (binary & HTML!), flashed on the device, and the DMX channels are configured, everything sould be working!
The effect is very similar to the embedded modes of the moving head light, selecting random positions over and over.

It’s not synced with what the lights are doing, but since I use my WLED device with LedFx, the leds of the moving head are already synchronized with the music, so there’s no need for more. It’s exactly how I envisioned it. And the motor is not fast enough to follow the rythm most of the time anyway.

If you need some help achieving something similar, don’t hesitate to ask me, I would be happy to help, maybe even provide you my modified version of WLED!

One last thing: before doing all that, I did tried to map the RGB values of WLED to the TILT and PAN channels of my light (as @packetbob suggested). It was working more or less (depending on the colors of course), but it wasn’t using all angles, and most of all the movement was quite stuttery (it looked like the moving head didn’t know where to go, which was quite funny). That’s why I tried to do my own thing.

1 Like

Thanks for posting the update…
It’s great that you got it working.
Is there an adjustable delay between movements?

Any chance this could appear as a Usermod?

Always DMX questions and applications floating about. :+1:

I did not try with an ajustable delay, but I thought about it. I’m going to do some testing, but it should be easy. It would be great to also allow users to set specific values to DMX channels. This would be especially useful to adjust the motor speed of the moving head, which has its own channel.

I would love to! Do you know how to proceed to publish it?

Per the GitHub site:

According to it you create a pull request in Github…
But I’ve never done such a thing so not 100% sure of the details…
I do have a quite un-official page with info on using DMX with WLED so will add your instructions to it when you publish them: