My christmas tree controller broke and would not do the modes it was supposed to. The Power supply was fine, but the controller had failed. Of course the fly-by-nite manufacturers could not sell a replacement and the ones I could locate were not quite the same connectors or voltages.
So the tree simply uses a 29v dc power supply and the controller used pulse width modulation and reverses voltage polarity to change color modes and do fades. So the ESP32 with PWM outputs and the H bridge on the L298n are a perfect replacement with a little programming. I repurposed the connectors from the original control board to the L298n, then used a voltage regulator to drop the 29v to 5v for the processor and logic side of the L298n.
In case someone else need a replacement tree controller or just feels the need to run their tree from a web page, I attached an esp32 code example. It hosts the webpage in the esp32 and you get the menu in the picture to change modes. You can see in the program pins 26, 27, and 14 are used on the esp32 to control the L298n.
The author marked this model as their own original creation.