Blank excess LED's (to avoid random color)

I have a WS281x strip with 300 LEDs, of which I use 254. I wired my data pin to GPIO3, so I run into problems on my ESP8266, when I run more than 266 LEDs. WLED just prevents me from controlling those extra LEDs.
This is basically no problem, as the strip is mounted behind a roundish ceiling plate, and only 254 LEDs are to be used; the rest I just left there, not willing to cut the strip.
However, the other 48 LEDs now show a random color, as WLED does not address them. I tried the “Off Refresh” option, but that does not help.
I can imagine that all colored LEDs require a buffer space and that memory is limited, but I would like to blank those extra LEDs and that does not require more storage than the number of items to blank, such that before the colorful information, WLED sends a number of zeros over the data bus.
And those even do not have to be blanked every frame, just once, I suppose. The excess light is random, and stays random, so the bits just don’t reach those last LEDs.
My question is: how can I make WLED blank them initially? Is there an option for that, or is this a new case?
(If I could easily dismount the plate from the ceiling, I would connect the data pin to GPIO02 and/or cut the LED strip, but I need two ladders and 3 people for that. So I’d like a software solution.)

That doesn’t sound like typical behavior.
What happens if you reduce the strip count in WLED to something small - like 25.
Do you still get random colored lights?

If not, try building up the LED count until the effect starts.

Normally if you address the starting portion of a strip, the remaining (unnaddressed) portion stays dark.

I’ts all about initial behavior: when powered on (so before WLED does anything), the LED strip gets into an undefined state: some LEDs are on, with various intensities. All lit LEDs that are on at that time remain on, until explicitly told to assume a different color (or off).
So for the LEDs beyond my reach (25 in your suggestion), the state remains random. The smaller the number, the more undefined LEDs. And by setting the number to 266 (the max at this moment given the GPIO3 configuration which was advised by Neopixelbus), I can blank the largest number, leaving only some undefined.
It would be ideal if WLED could blank the full strip (300 LEDs in my case, but I guess that should be configurable as the controller doesn’t know about the length of the full strip) before upon startup, and then don’t bother about the rest and only address the 254 LEDs I use.

None of that matches the behaviour of any of my strips.

Normally if I apply power only to a strip (no controller at all) I get - nothing, all off.
The only time I’ve seen random colour appearance is when either power supply or data pin are noisy (or both). How are you powering this setup?

Long time, no issues. Today, it popped up again, when I rebooted WLED via the web interface. I suppose that this is due to my configuration, with the data pin connected to GPIO03 (which is the Tx pin for serial communication as well). At reboot, the EPS8266 sends some diagnostic data out, which switches some LEDs randomly on/off.
The solution was to switch off power (via the fuse box in the house), but this is not the right way, of course. I am sure that WLED could send a series of commands to switch off all excess LEDs in the strip, to solve this, if I could set the number of LEDs to more than the 266 limit when using pin GPIO03. And that that would be a solution.
Could someone indicate maybe how I should modify the source code, to achieve this?

Normally I would suggest just setting 300 as the LED count and using a segment 254 LEDs long, but of course in your case that is not an option since you used GPIO3.

While it would most likely be possible to zero out these LEDs without having buffer space for them, that is unfortunately not something the NeoPixelBus library implements, as it is not a common use case at all.

As such, there is no easy modification to make this happen :frowning: All you could try would be to change line 657 of bus_wrapper.h from if (offset > 3) offset = 3; to if (offset > 1) offset = 3; which will use software bitbang instead of DMA to drive the LEDs, that will decrease memory usage 5x and thus allow you to define all 300 LEDs in WLED. However, I would absolutely not recommend doing so as bitbang causes sporadic reboots from time to time.