Joining several devices #11
Replies: 7 comments 2 replies
-
I have now made an attempt to fix the MultiHighControlInterface so it can find the master itself. Thus you can provide the ip-addresses in any order. Untested... please let me know if there are problems. |
Beta Was this translation helpful? Give feedback.
-
I got another set of twinkly lights and just tried to connect them. The code runs without error and both light strings react, but only the slave seems to actually get the effect. The master returns to the effect it was running previously. If I use a different effect sometimes they both go black. The MultiHighControlInterface doesn't seem to have all of the functions of the HighControlInterface (or am I missing something). Should the Multi interface be able to do everything the High interface does (or is it unfinished)? I'm new to python in the last few weeks, so still struggling to make sense of it all. Thanks again for creating and sharing this library. I'm having fun in between all the moments that aren't. 😏 |
Beta Was this translation helpful? Give feedback.
-
I spent some more time trying to get this working after adding a 3rd set of lights (this is getting slightly out of hand). I couldn't get the MultiHighControlInterface to work as the lights just go black and revert to the last setting. I'd grouped them with the Sync method in the Twinkly app. They're all RGB sets. I got a RGBW set, but didn't like how the bulbs looked. The diffuser on those didn't fully cover the led and so there were bright spots that I didn't care for. And a very similar "warm" look (the claimed advantage of the RGBW bulbs) can also be achieved by setting the RGB bulbs to be slightly orange. My workaround: Cheers! |
Beta Was this translation helpful? Give feedback.
-
That version of multicontrol was experimental and not tested so much. I have now checked in a new version (in this repo - but not released it yet since I will do some more changes in other files, so you need to download it from here) that is at least a little more tested. I updated highcontrol.py as well, you will need those fixes too I think. Try it and see if it works better! Of course it is possible to start the three lights separately in many cases. It may just be more convenient if this multicontrol works as intended. And continuous effects will be difficult without it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for spending time on this. Unfortunately, I'm getting this error when I try the day1 effect without using any of my modified code:
If I comment out line 85, in stop_rt Without commenting out the line, I get the same error as above when I try using a custom glow effect. The first couple of times I tried my modified code with that line commented out, the first light strand worked, but the other 2 strands didn't. But then I tried it again (with the above line commented out) and the custom effects worked on all 3 strands. I tried a few more and it seems like it's working great! Either way, seems like there's an issue with last_mode? Thanks again so much! |
Beta Was this translation helpful? Give feedback.
-
It appears that I managed to add a bug with my modification of effect_base. Thanks for detecting it. I now believe I have fixed it by wrapping line 85 with an if-statement to only run it if last_mode is set. (Did you send another message too? I got notified by mail, but it is not here. Maybe you sorted it out yourself already?) |
Beta Was this translation helpful? Give feedback.
-
Great! Those changes work. Thank you! The other message I posted, I then deleted because I wondered if the problem was related to me commenting out that line of code. However, it doesn't seem to be the case. After sending multiple movies to the strings, I eventually get this:
Looks like I'm filling up the memory of the lights? If I opened up the Twinkly app > Home (top left) > Settings > Erase Device Effects Maybe I just need to call this on occasion? (haven't tried this yet) As an aside, sending a movie to 3 strings takes 15+ seconds, way slower than sending to an individual string (and way slower than my workaround of calling your code 3 times in parallel). |
Beta Was this translation helpful? Give feedback.
-
Many of the recent daily effects assume or work best on dense 2D displays. A typical situation would be when you have a wall covered with leds. However, then you typically have several Twinkly lights connected as a unit, and so far the HighControlInterface used from python assumes a single device.
I have written a class MultiHighControlInterface, and included in the file "multicontrol.py" in xled_plus from today's release (Dec 30), in an attempt to solve this. Assume that you have used the app to join several devices, and produce a joint layout mapping for them by some of the methods offered on the app. Then you can create a combined control object for them as:
where you insert the ip-addresses of the connected devices, starting with the master. (How do you know which is the master? Probably the device on the first line in the app. It was in my case. Maybe I should fix the code so it finds out itself. I need to get back on this one.) Then you can use
mctr
just as you would have with a normal HighControlInterface object:This is an experimental code, and I don't have any large wall with lights myself, so I appreciate any feedback and bug reports!
/ Anders
Beta Was this translation helpful? Give feedback.
All reactions