Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add example for a string of XmCosy+ RGBW patio string lights #445

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

bikerglen
Copy link
Contributor

@bikerglen bikerglen commented Jan 17, 2024

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.

@jasonacox jasonacox merged commit c90f1bd into jasonacox:master Jan 17, 2024
11 checks passed
@jasonacox jasonacox added the tuya_device Support for specific Tuya Devices label Jan 17, 2024
@jasonacox
Copy link
Owner

Nice stand-alone example for the Tuya device Contrib repo. Thanks for the addition, @bikerglen ! 🙏

@bikerglen
Copy link
Contributor Author

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.

@bikerglen bikerglen deleted the xmcosy-stringlight-example branch January 17, 2024 23:12
@bikerglen bikerglen restored the xmcosy-stringlight-example branch January 17, 2024 23:12
@bikerglen bikerglen deleted the xmcosy-stringlight-example branch January 17, 2024 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tuya_device Support for specific Tuya Devices
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants