Output TypeError with DMX and WS2812 LEDs

This is similar in concept to this question ESP32 with DMX Output TypeError when LED count changed. However, I am not using more than 600, or even 512 LEDs.

My hardware setup is a string of 150 WS2812 LEDs on GPIO14 and a separate DMX decoder using GPIO5 with a string of LEDs attached. This works as expected when using the default LED count defined as 30. However, when I try to update the LED count to 150, which is the correct length of my WS2812 string, I receive a “TypeError : Cannot read properties of undefined (reading’shift’)”, and am no longer to able to make any main page setting changes.

This error only occurs when compiling with DMX enabled. The 150 WS2812 strip works normally without DMX enabled.

Any help in troubleshooting this would be greatly appreciated.

I was able to get around this error with some modifications to my configuration. I’m not sure that this is how this type of setup is intended to function:

In Led & Hardware setup:

  • defined the LED Outputs for my WS2812 strip to be of length 151 even though it’s only 150.

In DMX Output:

  • Set “DMX Fixtures start LED” to 150

Now if I go back to the main page settings, I no longer encounter any errors. I am able to define two Segments:

  • Segment 0: from LEDs 0-150, representing the true WS2812 strip
  • Segment 1: From LED 150-151, representing the LED strip attached to my DMX decoder

It appears that the reason I received the original error was due to setting my DMX start LED at an index that exceeded the definitions in Led & Hardware, which makes sense. I don’t see any particular issues with this solution but it feels a bit hacky. Since I am defining a length of nonexistent LEDs in my WS281X hardware setup, then co-opting that for my DMX output later.

It’s possible that this is how the DMX configuration is supposed to work given there’s an option for setting “DMX fixtures start LED”. If so, it’s just a matter of confusion over how these are represented in the UI.

Would still appreciate any additional thoughts from anyone else who has had a similar experience.

I had a similar experience as you did with using DMX. I ended up compiling my own version where I hard coded the last 10 LED’s as my DMX fixtures so I would never exceed one universe of DMX which appears to be the problem.

I was under the gun on a project with a deadline so I made it work the quickest I could.

I intend to go back into the code and modify the DMX code to limit it to one 512ch universe no matter the settings which I think will avoid the type error from ever showing up.