Open auditdata opened 4 years ago
I got this working using Rasbian Buster Lite on a Pi3B+. Took me a few tries, but I think I found one more note to add to this. During the installation of Berryconda it asks to add its own PATH variable. On my first run, I answered 'yes', but that seemed to break it. Answering 'no' to that question seemed to make a difference, and all if working now.
I also had to run it once, which generates the .ledfx folder with the config file inside. Once that file is present and editable, I stopped the software and added "host: 0.0.0.0" which allowed me to access the interface from any machine on the network. I also had to learn how to find, test, and add my own audio device to use for this. I am currently using a Logitech webcam with internal microphone for testing.
arecord -L
Listed my USB device several times, but I ended up with something like this:
plughw:CARD=U0x46d0x825,DEV=0
USB Device 0x46d:0x825, USB Audio
Hardware device with all software conversions
Using this, I used this command to test the audio:
arecord -D plughw:CARD=U0x46d0x825,DEV=0 -f cd -d 0 -vv /dev/null
This gave me a live test in the terminal window and bumping the webcam verified that it was recording sound. I then edited my config file again and added:
audio:
device_index: 1
This number may vary for you, but it worked for me. I've seen others use index 2 to get it to work. You may need to test a few numbers. I'm putting all of this here for myself as much as everyone else. I know I'd lose it eventually, lol.
Anyway, I mostly just wanted to say thank you to @ahodges9 and @auditdata for their work on this. It works wonderfully using a NodeMCU running the WLED firmware, and it's gonna be a blast. My only last issue will be on how to start this using the two commands at boot. I've only tried using rc.local for now, but I have a few other things to try. =]
Make sure you are running the latest LedFx! It should have a new Settings page UI that let's you configure the audio device. No need to touch the config anymore. Glad you got it working!
Hi.. I am running ledfx on raspberry Pi 4 , but the cpu usage is high causing a lag in visualization. Is there any way I can fix it ? Thanks a lot for the awesome repo .. π p.s I have also installed Hyperion on that same pi.
Not sure if this is perfect but it worked for me. After hours and hours of trying to get it going on my Pi 4 I finally did. Not wanting to break it I thought I would try on a fresh image of Raspbian on a spare Pi 3 B. After several attempts I have documented a process that works. I've done it from a fresh Raspbian image twice to make sure. So here is my process that works. If anyone else using this gets it to work let me know. Open a Terminal window.
wget https://github.com/jjhelmus/berryconda/releases/download/v2.0.0/Berryconda3-2.0.0-Linux-armv7l.sh chmod +x Berryconda3-2.0.0-Linux-armv7l.sh sudo ./Berryconda3-2.0.0-Linux-armv7l.sh
NOTE need to change install location to /home/pi/berryconda3/
sudo nano /home/pi/.bashrc
NOTE need to add:export PATH="/home/pi/berryconda3/bin:$PATH"
to the end of the file and savesudo reboot -h now conda create -n ledfx source activate ledfx sudo chown pi:pi -R /home/pi/berryconda3/ pip install Cython sudo apt-get install portaudio19-dev pip install ledfx ledfx --open-ui
It will open the UI The next time you want to use it you need activate the environment with
source activate ledfx ledfx --open-ui
Good luck
Thank you for this installation guide... π
Thanks for this guide! Do you know if it's possible to reach the web interface from LEDFX outside the Raspberry Pi but in the same network? I want to manage LEDFX from another device but I can't find a way to do it.
Yep absolutely, just find the IP of the pi and any device on your network should be able to access the interface. It'll be something along the lines of 192.168.1.xxx:8888
On Wed, 29 Apr 2020, 18:07 willie058, notifications@github.com wrote:
Thanks for this guide! Do you know if it's possible to reach the web interface from LEDFX outside the Raspberry Pi but in the same network? I want to manage LEDFX from another device but I can't find a way to do it.
β You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ahodges9/LedFx/issues/62#issuecomment-621342526, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXFVTBAJPHZIYLO4SKNTDLRPBNDZANCNFSM4KD6QRPQ .
Thanks for your comment! I added host: 0.0.0.0 to the LedFx config and now it works fine!
One problem left... I can't select the onboard soundcard from the Raspberry Pi in the LedFX webinterface. It doesn't show up in the list. I see the following message in the shell: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Can I use the onboard soundcard or do I need to buy an external USB soundcard? I'm playing the music over the onboard soundcard from the Raspberry Pi right now.
Thanks in advance!
@jesjhoward please tell me you figured out a way of running those two command at boot :D
Sorry, but I haven't come back to this project for a while. I never did get it all to launch at boot. I may jump back in to it this weekend. I'll let you know if I make any breakthroughs
Thanks for your comment! I added host: 0.0.0.0 to the LedFx config and now it works fine!
One problem left... I can't select the onboard soundcard from the Raspberry Pi in the LedFX webinterface. It doesn't show up in the list. I see the following message in the shell: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Can I use the onboard soundcard or do I need to buy an external USB soundcard? I'm playing the music over the onboard soundcard from the Raspberry Pi right now.
Thanks in advance!
Hi, can you assist with the path for the config file so I can edit it? My Pi is headless so I can't browse the folders and directories. Need to be able to manage from anywhere within the network!
Edit: for anyone finding this and finding themselves in the same predicament, file is located at /home/pi/.ledfx/config.yaml
Sorry, but I haven't come back to this project for a while. I never did get it all to launch at boot. I may jump back in to it this weekend. I'll let you know if I make any breakthroughs
Hey! Did you ever figure out a way of launching it on startup? Tried a few things but nothing seemed to work
I simply run it in crontab after a 1 minute wait time. Works perfectly for me.
Adrian Stucker 513.341.LENS
On Sat, Aug 29, 2020, 4:25 AM erik341 notifications@github.com wrote:
Sorry, but I haven't come back to this project for a while. I never did get it all to launch at boot. I may jump back in to it this weekend. I'll let you know if I make any breakthroughs
Hey! Did you ever figure out a way of launching it on startup? Tried a few things but nothing seemed to work
β You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ahodges9/LedFx/issues/62#issuecomment-683277382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFUGIKAAZMFNSMK4BCLHWLSDDQUJANCNFSM4KD6QRPQ .
Huh... that's actually a very simple solution, didn't think about doing that
I love it
Not sure if this is perfect but it worked for me. After hours and hours of trying to get it going on my Pi 4 I finally did. Not wanting to break it I thought I would try on a fresh image of Raspbian on a spare Pi 3 B. After several attempts I have documented a process that works. I've done it from a fresh Raspbian image twice to make sure. So here is my process that works. If anyone else using this gets it to work let me know. Open a Terminal window.
wget https://github.com/jjhelmus/berryconda/releases/download/v2.0.0/Berryconda3-2.0.0-Linux-armv7l.sh chmod +x Berryconda3-2.0.0-Linux-armv7l.sh sudo ./Berryconda3-2.0.0-Linux-armv7l.sh
NOTE need to change install location to /home/pi/berryconda3/
sudo nano /home/pi/.bashrc
NOTE need to add:export PATH="/home/pi/berryconda3/bin:$PATH"
to the end of the file and savesudo reboot -h now conda create -n ledfx source activate ledfx sudo chown pi:pi -R /home/pi/berryconda3/ pip install Cython sudo apt-get install portaudio19-dev pip install ledfx ledfx --open-ui
It will open the UI The next time you want to use it you need activate the environment with
source activate ledfx ledfx --open-ui
Good luck
Thank you for making this! I tried to install ledfx on my raspberry pi 3b+, but I doesn't get past the pip install ledfx. it stops on the Collecting aubio>=0.4.8 (from ledfx) Downloading https://files.pythonhosted.org/packages/cd/80/302d89240603e5347c7f8026c8b02c59f8dfaec66c91a743d82de7c86006/aubio-0.4.9.tar.gz (479kB) 100% |ββββββββββββββββββββββββββββββββ| 481kB 110kB/s
I looked in the logs of pip and it says this: Using version 0.4.9 (newest of versions: 0.4.3.post1, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9) Using cached https://files.pythonhosted.org/packages/cd/80/302d89240603e5347c7f8026c8b02c59f8dfaec66c91a743d82de7c860$ Downloading from URL https://files.pythonhosted.org/packages/cd/80/302d89240603e5347c7f8026c8b02c59f8dfaec66c91a743d8$ Running setup.py (path:/tmp/pip-build-vv_mszg1/aubio/setup.py) egg_info for package aubio Running command python setup.py egg_info
It seems to be stuck on the setup.py. Did someone have this issue or an solution?
TLDR: Try using "sudo pip3 install ledfx" or "sudo pip3 install ledfx --no-cache"
A couple of days ago I had no problem installing ledfx following this. I then did a clean Raspbian install, tried to install ledfx and had the exact same problem. It got stuck while getting aubio 0.4.9 (even tho it says it is collection aubio>=0.4.8). I searched online how to install aubio (in case it requires other libraries or a specific python version) and finally managed to install aubio using "sudo pip3 install aubio". I still couldn't install ledfx so I tried to use sudo + python3 again and it worked! So try either "sudo pip3 install ledfx" or with no cache just in case. Hope it helps!
I simply run it in crontab after a 1 minute wait time. Works perfectly for me. Adrian Stucker 513.341.LENS
I've been trying to run ledfx on startup (with a 1 minute wait time) with crontab (crontab -e and I add @reboot /home/pi/ledfx.sh) but after loging the result it says "ledfx: command not found". Am I missing something?
Also, if I add:
source activate ledfx ledfx --open-ui
to /home/pi/.bashrc then it actually starts ledfx whenever the pi reboots (problem is it also executes whenever I open a new terminal... as that's when the file is executed). Any idea what I'm doing wrong? Am I missing some path includes?
I simply run it in crontab after a 1 minute wait time. Works perfectly for me. Adrian Stucker 513.341.LENS
I've been trying to run ledfx on startup (with a 1 minute wait time) with crontab (crontab -e and I add @reboot /home/pi/ledfx.sh) but after loging the result it says "ledfx: command not found". Am I missing something?
Also, if I add:
source activate ledfx ledfx --open-ui
to /home/pi/.bashrc then it actually starts ledfx whenever the pi reboots (problem is it also executes whenever I open a new terminal... as that's when the file is executed). Any idea what I'm doing wrong? Am I missing some path includes?
I don't remember how but try use this V
//autostart//
sudo apt -y install lxsession-default-apps Preferences > main menu editor > Default applications for lxsession preferences > default applications ledfx --open-ui
//no hdmi start//
Adding hdmi_force_hotplug=1 to /boot/config.txt
seems to have solved the problem. The Pi4 is running headless,
Worked great for me! thanks
A better way to autostart LedFx is with systemd, I use this service file on my Fedora box but I can't see why it wouldn't work on Raspberry Pi, they both run systemd:
/etc/systemd/system/ledfx.service
Description=LedFx
[Service]
User=martin
Type=simple
ExecStart=/usr/local/bin/ledfx
Restart=on-failure
[Install]
WantedBy=multi-user.target
After that you enable the service which makes it start on boot:
sudo systemctl enable ledfx
Then you can start it manually
sudo systemctl start ledfx
And to check the status and logs you can do:
sudo systemctl status ledfx
or
journalctl -u ledfx
Just spot checking what I'm seeing against some others experiences. Got this running on a Pi 3B+ using the audio injector sound card (uses the 40 pin headers). It "works" but it's amazingly lagy. Does anyone have this running smoothly on a Pi 3? Is it appreciably better on a Pi4? If it's working for you, what are you using for a sound in device on the Pi? Anything else running in the background? I know this Pi also has node red kicking in the background, so I'll try a fresh install on a second one tomorrow just to compare.
I want to setup something next to my stereo running ledfx to drive affects to various lights. I was hoping to use a Pi because it's small and easy to tuck out of sight. Was hoping to not have to stick a full blown computer there.
I have it running on a pi 4 and anything over a couple lights it get pretty laggy, so I'd imagine it's worse on a pi3. How many lights/pixles are you running now?
On Thu, Nov 19, 2020, 4:02 PM cegan09 notifications@github.com wrote:
Just spot checking what I'm seeing against some others experiences. Got this running on a Pi 3B+ using the audio injector sound card (uses the 40 pin headers). It "works" but it's amazingly lagy. Does anyone have this running smoothly on a Pi 3? Is it appreciably better on a Pi4? If it's working for you, what are you using for a sound in device on the Pi? Anything else running in the background? I know this Pi also has node red kicking in the background, so I'll try a fresh install on a second one tomorrow just to compare.
I want to setup something next to my stereo running ledfx to drive affects to various lights. I was hoping to use a Pi because it's small and easy to tuck out of sight. Was hoping to not have to stick a full blown computer there.
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ahodges9/LedFx/issues/62#issuecomment-730664519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFUGIPESIVEFMLXGSCVR4DSQWIXBANCNFSM4KD6QRPQ .
My first test was driving a single device with 99 pixels. My end goal is driving around 4 devices with anywhere from 40 to 100+ pixels in each device. Sounds like I may be out of luck on a Pi.
I am seeing network dropout too. Meaning after a few minutes running ledfx remote desktop will drop it's connection and the light stops receiving the E1.31 data. Once this happens the visual on the ledfx page actually improves and gets less choppy, so I wonder if wifi is too much of a bottleneck on the Pi3. Fun experiment anyway.
I'm running it on a pi 3B+. I got it hooked up to 2 devices with 134 leds each; been using it for about a month now.
I use a simple microphone on the pi to send the data over wifi to the leds (each led device has its own arduino wifi board). It sometimes gets laggy or even stops working (seems like the light stops receiving e1.31 data as @cegan09 mentioned) but I found that going into the ledfx settings page and resetting the microphone (literally just opening the select element and selecting the same microphone) fixes the issue. Usually after reselecting the microphone, it works smoothly for a long time.
I wonder what people use as soundcard on the pi. The builtin soundcard was not recognized for me (devices drop down empty on audio setting page). Any soundcard that is known to work?
I'm using a generic usb sound device as an input.
On Sat, Nov 21, 2020, 8:54 PM Jeroen ter Heerdt notifications@github.com wrote:
I wonder what people use as soundcard on the pi. The builtin soundcard was not recognized for me (devices drop down empty on audio setting page). Any soundcard that is known to work?
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ahodges9/LedFx/issues/62#issuecomment-731698307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFUGIKTGLAYQOOYKFJU7Z3SRCKQBANCNFSM4KD6QRPQ .
@erik341 It just takes a couple hours to install aubio. I wish someone had told me the installation wasn't frozen earlier because I spent days trying to solve this. Your solution can work depending on what pip3 executable is installed, but pip3 is often just aliased to pip.
@ShiromMakkad I left it installing for a few hours and it didn't change, so pretty sure my installation was frozen. Not sure what pip3 executable I had tho
I guess it'll take longer on your system. I actually didn't build this on a Raspi, I built it on my computer using QEMU because I was building my LedFx docker container. You can try that out if direct installation isn't working. It's on my Github.
thanks for the hints with Raspberry Pi and LedFX! Does anyone know how to got it with a hifiberry dacplus working? I used this script (https://github.com/nicokaiser/rpi-audio-receiver) to install bluetooth and raspotify with hifiberry support, but in LedFX I can't use hifiberry dacplus as audio input.
Can this work on pi zerow?
Can this work on pi zerow?
I actually tried it, and it did work, however with poor results. The pi zero CPU is the bottleneck here, even running DietPi with overclocked CPU, I could barely handle 90 leds at 40 FPS. And the Pi turned off after like 5 minutes of usage even with a heatsink. I am currently research if it could run on a Banana Pi M2 Zero which has a more powerful quad core CPU, although I am not sure if LedFX is multithreaded or not, will have to test after I get my hands on it.
Banana Pi M2 Zero
Any update using the Banana Pi M2?
Not sure if this is perfect but it worked for me. After hours and hours of trying to get it going on my Pi 4 I finally did. Not wanting to break it I thought I would try on a fresh image of Raspbian on a spare Pi 3 B. After several attempts I have documented a process that works. I've done it from a fresh Raspbian image twice to make sure. So here is my process that works. If anyone else using this gets it to work let me know. Open a Terminal window.
wget https://github.com/jjhelmus/berryconda/releases/download/v2.0.0/Berryconda3-2.0.0-Linux-armv7l.sh chmod +x Berryconda3-2.0.0-Linux-armv7l.sh sudo ./Berryconda3-2.0.0-Linux-armv7l.sh
NOTE need to change install location to /home/pi/berryconda3/
sudo nano /home/pi/.bashrc
NOTE need to add:export PATH="/home/pi/berryconda3/bin:$PATH"
to the end of the file and savesudo reboot -h now conda create -n ledfx source activate ledfx sudo chown pi:pi -R /home/pi/berryconda3/ pip install Cython sudo apt-get install portaudio19-dev pip install ledfx ledfx --open-ui
It will open the UI The next time you want to use it you need activate the environment with
source activate ledfx ledfx --open-ui
Good luck
GREAT GUIDE! I did have to do a couple of extra steps to get it working. The "pip install ledfx" failed with the message:
RuntimeError: Python version >= 3.7 required.
So I ended up running it this way:
python3.7 pip install ledfx
When it finished I modified my .bashrc as it recommended and added '/home/pi/.local/bin' to the PATH. But the gui wouldn't load because of this error.
ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory
It was also nice enough to provide a link with suggestions on how to fix it. https://numpy.org/devdocs/user/troubleshooting-importerror.html
So I did this to install the missing file.
sudo apt-get install libatlas-base-dev
And Jingle BAM! I've got lights that dance to music.
ledfx --open-gui
I did have to do a couple of extra steps to get it working. The "pip install ledfx" failed with the message:
RuntimeError: Python version >= 3.7 required.
@bprovince this is because pip = python2, pip3 = python 3 so the pip command would work normally if you used "pip3 install ledfx".
Tested in RPI 3B:
Install process:
sudo apt update && sudo apt upgrade
sudo apt-get install portaudio19-dev python3-pip libatlas-base-dev libavcodec-dev libavformat-dev
sudo pip3 install Cython
sudo pip3 install ledfx
ledfx
systemctl to autostart on boot:
[Unit]
Description=Ledfx
After=network-online.target
[Service]
ExecStartPre=/bin/sleep 10
Type=simple
User=pi
ExecStart=/usr/local/bin/ledfx
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
Test: go to ip:8888 enter usb device in settings connect wled device and test effects!
I'm testing it on a Pi 3+ with 144 RGBW LEDs right now, and the CPU is just a bit too slow it seems. I'm using the Apple USB dongle for recording sound, will an I2S based sound input eat less CPU? Has there been any profiling & performance optimization done, are the low-hanging fruits already picked? I'm surprised the Pi 3 couldn't handle this.
I'm just setting mine up with a
1.) Rasberry PI Zero (noob Pi OS) + Sabrent USB External Stereo 3D Sound Adapter
2.) 144 Led RGBW WS2812B + ESP32 WLED (aircookie)
[trying to output the supported dual audio on my tv to my Pi (internal tv speakers + optical/or headphone jack)]
I believe I read somewhere recently after I bought my adapter that the mic/headphone port operates at different frequencies compared to line-in. So I have a feeling that an I2S hat with Line-in input would run stable instead of using a generic mic/headphone USB audio adapter. I know you mentioned a different setup so I figured my two cents may help since I'm experiencing issues right now and still going through troubleshooting. (LED flickering). If I happen to get it working compared to my fully functional desktop setup I'll let ya know.
I'm testing it on a Pi 3+ with 144 RGBW LEDs right now, and the CPU is just a bit too slow it seems. I'm using the Apple USB dongle for recording sound, will an I2S based sound input eat less CPU? Has there been any profiling & performance optimization done, are the low-hanging fruits already picked? I'm surprised the Pi 3 couldn't handle this.
I'm just setting mine up with a 1.) Rasberry PI Zero (noob Pi OS) + Sabrent USB External Stereo 3D Sound Adapter
Just FYI, Iβve given up on LedFX. There is a sound-reactive fork of WLED that uses the 2nd core of an ESP32 to analyze audio, it is still a bit raw but looks promising. No lag issues and works reliably, just the effects arenβt as polished yet.
I'm just setting mine up with a 1.) Rasberry PI Zero (noob Pi OS) + Sabrent USB External Stereo 3D Sound Adapter 2.) 144 Led RGBW WS2812B + ESP32 WLED (aircookie)
[trying to output the supported dual audio on my tv to my Pi (internal tv speakers + optical/or headphone jack)]
I believe I read somewhere recently after I bought my adapter that the mic/headphone port operates at different frequencies compared to line-in. So I have a feeling that an I2S hat with Line-in input would run stable instead of using a generic mic/headphone USB audio adapter. I know you mentioned a different setup so I figured my two cents may help since I'm experiencing issues right now and still going through troubleshooting. (LED flickering). If I happen to get it working compared to my fully functional desktop setup I'll let ya know.
I'm testing it on a Pi 3+ with 144 RGBW LEDs right now, and the CPU is just a bit too slow it seems. I'm using the Apple USB dongle for recording sound, will an I2S based sound input eat less CPU? Has there been any profiling & performance optimization done, are the low-hanging fruits already picked? I'm surprised the Pi 3 couldn't handle this.
The Pi Zero isn't powerful enough, tried it myself. Ended up going with a Banana Pi (Raspberry Pi 2 CPU), which seems to mostly work, although it crashes now and then.
I'm just setting mine up with a 1.) Rasberry PI Zero (noob Pi OS) + Sabrent USB External Stereo 3D Sound Adapter
Just FYI, Iβve given up on LedFX. There is a sound-reactive fork of WLED that uses the 2nd core of an ESP32 to analyze audio, it is still a bit raw but looks promising. No lag issues and works reliably, just the effects arenβt as polished yet.
LedFX is awesome, not sure how it doesn't work on a Pi 3 properly, if on the Pi 2 CPU works almost OK. But if you run it on a laptop, it is really nice, used it for a couple parties and it makes an awesome lights show.
I'm just setting mine up with a 1.) Rasberry PI Zero (noob Pi OS) + Sabrent USB External Stereo 3D Sound Adapter
Just FYI, Iβve given up on LedFX. There is a sound-reactive fork of WLED that uses the 2nd core of an ESP32 to analyze audio, it is still a bit raw but looks promising. No lag issues and works reliably, just the effects arenβt as polished yet.
Oh nice! Is that the Atuline/wled fork? Thank you for that info. I'll check it out - as of right now the PI still had a bit of flickering without using any reactive settings.
-things I haven't tried yet is running a clean/lite with no pre-installed software/GUI(desktop OS) and maybe then even bumping the CPU a bit (Overclock)? and attaching a wifi antenna.
Not sure if this is perfect but it worked for me. After hours and hours of trying to get it going on my Pi 4 I finally did. Not wanting to break it I thought I would try on a fresh image of Raspbian on a spare Pi 3 B. After several attempts I have documented a process that works. I've done it from a fresh Raspbian image twice to make sure. So here is my process that works. If anyone else using this gets it to work let me know. Open a Terminal window.
NOTE need to change install location to /home/pi/berryconda3/
sudo nano /home/pi/.bashrc
NOTE need to add:export PATH="/home/pi/berryconda3/bin:$PATH"
to the end of the file and saveIt will open the UI The next time you want to use it you need activate the environment with
Good luck