Closed bikerglen closed 5 months ago
Nice stand-alone example for the Tuya device Contrib repo. Thanks for the addition, @bikerglen ! 🙏
No problem. I just noticed I hard coded the number of colors in the chase to 6 in the for loop at the very end of main. I need to replace the 6 with a len(colors) and the 5-i with len(colors)-1-i on lines 110 and 111. I'll try to get a fix in tomorrow night after work.
I have some XMCosy+ RGBW patio string lights that permit the colors of each bulb to be set individually and independently of each other. This example takes a list of colors and assigns them to the bulbs in the string sequentially. The code encodes the list of colors into a string that can be sent to the bulbs using the set_value function with an index of 102. I've tested this with both a set of 15 patio string lights and a string of 6 flood lights. Both use Tuya controllers and are manufactured by the Shenzhen Bling Lighting Technology Company Limited. Index 102 is likely the mechanism used by the "DIY" mode's preview button in the Smart Life app.