audio-reactive-led-strip icon indicating copy to clipboard operation
audio-reactive-led-strip copied to clipboard

Is it possible to connect 2-3 Nodemcu and controll with PC?

Open vladlenskiy opened this issue 5 years ago • 18 comments

Your project is wonderful! Everything works fine, but can I connect a few Nodemcu and control them all? I do not much work with Python, but if there is such an opportunity, then I will try to do it! Thx 😊

vladlenskiy avatar Jun 25 '20 22:06 vladlenskiy

The easiest way is probably to direct broadcast the data on your subnet. This may be a little problematic though due to the many data packets that spam every devices connection.

d00mfish avatar Jun 27 '20 19:06 d00mfish

I had the same problem and tried the same route - I would not recommend this, broadcasts over WLAN really mess up your network performance. I modified the Arduino code to accept packets of any length (up to a maximum to prevent memory corruption) and wrote a GTK-perl script to accept data from audio-reactive-led-strip and distribute them to my various LED strips. For each strip one can decide whether to display the audio data or a fixed colour (configurable with sliders) so that not all the strips in the room flash all the time. The code is not really clean (work in progress), but it works. Maybe it helps.

gaijinsr avatar Jun 29 '20 11:06 gaijinsr

gtk2-udp.pl.txt

gaijinsr avatar Jun 29 '20 11:06 gaijinsr

Wow that is a good Idea! Maybe I try to implement this into my setup :D

d00mfish avatar Jun 29 '20 15:06 d00mfish

@VladlenKaveev This is similar to #272 and a number of people have asked for multi-client support. I'm mostly on here for support and troubleshooting and I don't really have the python knowledge to add these features but if anyone's willing to submit a PR I'd definitely consider.

joeybab3 avatar Jun 29 '20 15:06 joeybab3

@joeybab3 Hey! I can connect 2 device, but i need to run 2 .py programs. Now, i try to add many devices, but i too don't have the python knowledge. Now I'm at the stage of the second graph and 2 Nodemcu is working, but i cant change a frequency to each device. If I don’t succeed, then I will have to use several windows :(

vladlenskiy avatar Jun 30 '20 13:06 vladlenskiy

@joeybab3 For simultaneous work, you need to create a schedule for each device. But in the code the author use pygraph and idn how can edit it to pyqt5 gui to add a tabs with device 1, 2 and etc

vladlenskiy avatar Jun 30 '20 13:06 vladlenskiy

@gaijinsr If i run 5 windows .py program, and use 5 Nodemcu my network is down? I try to edit code and add 5 device in 1 windows, but its so hard for me :(

vladlenskiy avatar Jun 30 '20 13:06 vladlenskiy

@VladlenKaveev try the changes in #201 I haven't been able to test them myself but intuitively it seems like it might work

joeybab3 avatar Jun 30 '20 15:06 joeybab3

@joeybab3 https://cloud.vspace.one/s/TTazm83FFjrR83m is not work(

vladlenskiy avatar Jun 30 '20 15:06 vladlenskiy

@joeybab3 I need to change frequency in Device 1 to 0-200 and Device 2 400-600 for example.

vladlenskiy avatar Jun 30 '20 15:06 vladlenskiy

@VladlenKaveev Adding devices is easy, see attachment. Sending data to a couple of devices is no problem, but multicasting the data to every device on the network (which we are not doing) is not a good idea on a WLAN. @joeybab3 The multi-IP change looks good, but for my use case (showing up at parties with a couple of lengths of LED strips) my solution is more flexible because I can change IP addresses on the fly, even while the visualisation is running. I can also do things like keeping the lights above the buffet at a fixed colour while people are eating and use them for effects later in the evening... gtk2-udp.pl-6dev.txt

gaijinsr avatar Jun 30 '20 15:06 gaijinsr

@gaijinsr I'm sure there are lots of better ways to do this but not many that don't require rewriting the core

joeybab3 avatar Jun 30 '20 18:06 joeybab3

@gaijinsr Hey! I run a Systematic LEDs today, on Mac I had a lot of mistakes, but still managed to run. How many device you try to connect on one wi fi network? Now i have only 2, but i need to connect 5-6 devices. What do you think about it? Sometimes i have a microphone error, but i think i fix it. This project so good for me, i try ledfx and wled, but Systematic LEDs fits best :3

vladlenskiy avatar Jul 03 '20 21:07 vladlenskiy

Regarding multiple devices, LedFx is made specifically for this! No multicast, connect as many devices as you like. It's originally based on this project, but has been taken much further now. Loads of effects, nice UI, so on.

https://github.com/ahodges9/LedFx

If you're having trouble installing (dependencies are a pain), feel free to ask for help on the discord server. Usually someone's around to lend a hand.

https://discord.com/invite/wJ755dY

On Fri, 3 Jul 2020, 22:05 VladlenKaveev, [email protected] wrote:

@gaijinsr https://github.com/gaijinsr Hey! I run a Systematic LEDs today, on Mac I had a lot of mistakes, but still managed to run. How many device you try to connect on one wi fi network? Now i have only 2, but i need to connect 5-6 devices. What do you think about it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/scottlawsonbc/audio-reactive-led-strip/issues/278#issuecomment-653677076, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXFVTFCB6DGQMKA7EV6MG3RZZBYFANCNFSM4OIZIY2A .

not-matt avatar Jul 04 '20 08:07 not-matt

@VladlenKaveev I have been running 6 devices: no problem at all. Also, you could lower the FPS to 30. @not-matt I tried LedFx, but - as you wrote - installation is a PITA. In a way it is great that you can assign different effects to all the LED strips, but for me this was overkill: I just want all my strips to show the same animation.

gaijinsr avatar Jul 04 '20 09:07 gaijinsr

@not-matt I tried ledfx, but it seemed to me that switching effects is very slow. I'm doing a light party project in Russia and I want to use 5-6 devices and quickly change effects through a PC. It seemed to me that the Systematic Leds interface is faster and easier to understand and add own buttons and effects. I think that ledfx more convenient for home use. Thanks for the answer, be sure to join in discord. @gaijinsr But Systematic Leds it makes it possible to launch different effects with different frequencies on different devices and its works well.

vladlenskiy avatar Jul 04 '20 12:07 vladlenskiy

Still searching for a solution to running 5-7 controllers with this.

pupnico92 avatar Jan 17 '23 01:01 pupnico92