scottlawsonbc / audio-reactive-led-strip

:musical_note: :rainbow: Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
MIT License
2.68k stars 644 forks source link

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

Open vladlenskiy opened 4 years ago

vladlenskiy commented 4 years ago

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 😊

d00mfish commented 4 years ago

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.

gaijinsr commented 4 years ago

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 commented 4 years ago

gtk2-udp.pl.txt

d00mfish commented 4 years ago

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

joeybab3 commented 4 years ago

@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.

vladlenskiy commented 4 years ago

@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 commented 4 years ago

@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 commented 4 years ago

@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 :(

joeybab3 commented 4 years ago

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

vladlenskiy commented 4 years ago

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

vladlenskiy commented 4 years ago

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

gaijinsr commented 4 years ago

@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

joeybab3 commented 4 years ago

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

vladlenskiy commented 4 years ago

@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

not-matt commented 4 years ago

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, notifications@github.com 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 .

gaijinsr commented 4 years ago

@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.

vladlenskiy commented 4 years ago

@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.

pupnico92 commented 1 year ago

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