Based on the work I did last year using ws2812b lights. I created a very simple hack in order to enable the lights of a Christmas tree to be painted.
I made use of Flask (a Python Web framework) along with the Flask socket.io library, in order to enable touch events from pressing a HTML5
canvas to be sent to my Pi Zero, which controls the setting of the lights.
The position of the lights which are used by the web application, where obtained through a calibration phase which is documented in the above link.
For some reason I’ve found these lights rather temperamental, with the first light in the chain occasionally breaking, despite using a capacitor
to help protect against in-rush current. I was able to fix these broken chains, by cutting the first LED off and soldering the power & data lines onto the next light.
Occasionally the lights ‘glitch’ and random colours appear, I had assumed this may be due to the Pi being used for controlling the lights (as the library I am using makes use of a hack to drive the lights. If APA102 LEDs where used instead, the Pi’s SPI support could be used instead), however I have been told “adding a 100Ohm inline with each output” may help fix this glitching.
I recently found the following best practices to follow which mentions about a much larger capacitor than I had used across the power rails of the LED strips, to protect them from surges. It also mentions about using a resistor on the output line.
See https://github.com/anfractuosity/lightfantastic for the source