Anders-Holst / xled_plus

Addons to the XLED package, to create nice effects for Twinkly LED lights
MIT License
33 stars 8 forks source link

Allow for new movies to be given the UUID instead of always generating it #25

Open jaxzin opened 10 months ago

jaxzin commented 10 months ago

For a group of multiple strings in master/slave configuration to change their movie, the master changes the movie on the slave by ID. But currently if you run show_movie on HighControlInterface against multiple controllers the unique_id of the movie will be different on the master and the slave(s).

Anders-Holst commented 9 months ago

Sorry for taking some time to fix this, you probably fixed it yourself on your local copy already... I have produce a new release with some supporting functionality for grouped devices. However, I did not do it the suggested way, i.e I want to keep the UUID away from users. Instead an updated version of MultiHighControl takes care of it by reusing the same UUID. The easiest way to use the new version is to modify the effect in samples/ that you wish to use, so it imports the "new" setup code by modifying the first code line to: from xled_plus.samples.sample_setup_new import * Then it will create a MultiHighControl object for you if it finds a device group, and if you call show_movie once, it will upload to the whole group, handling the UUID the correct way. Of course, the new code should in the end not be called "_new", but reuse the old name. I will do that when I feel it is appropriately tested, which it is not yet... For the same reason it currently produces some debug outputs. Please tell me if you find any problems, or whether it works as intended.