ahodges9 / LedFx

LedFx is a network based LED effect controller with support for advanced real-time audio effects! LedFx can control multiple devices and works great with cheap ESP8266 nodes allowing for cost effectvice syncronized effects across your entire house!
MIT License
387 stars 90 forks source link

Installation #46

Closed sjude68 closed 4 years ago

sjude68 commented 5 years ago

how do I install on Raspberry Pi.

I get error that no suitable version found.

sladaar commented 4 years ago

probably you are trying with python 2.7 Use 3.6 or above instead

sjude68 commented 4 years ago

I managed to install Python3.7 and then install ledfx on Raspberrypi. Now I get the webpage only on localhost:8888 or 127.0.0.1:8888. I cannot get the webpage on the IP address of the Raspberrypi. Also the ledfx does not work with wled. I get error on the console

pi@raspberrypi:~ $ ledfx Loading configuration file from /home/pi/.ledfx Started webinterface at http://127.0.0.1:8888 Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.front.0:CARD=0' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM front ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround40.0:CARD=0' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround40 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround41 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround50 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround51 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround71.0:CARD=0' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround71 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958 ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device' ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514 Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818 [2019-10-24 14:01:09] ERROR:aiohttp.server:Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/aiohttp-3.3.2-py3.7-linux-armv7l.egg/aiohttp/web_protocol.py", line 378, in start resp = await self._request_handler(request) File "/usr/local/lib/python3.7/dist-packages/aiohttp-3.3.2-py3.7-linux-armv7l.egg/aiohttp/web_app.py", line 341, in _handle resp = await handler(request) File "/usr/local/lib/python3.7/dist-packages/ledfx-0.3-py3.7.egg/ledfx/api/init.py", line 26, in handler return await method(*{arg_name: available_args[arg_name] for arg_name in wanted_args}) File "/usr/local/lib/python3.7/dist-packages/ledfx-0.3-py3.7.egg/ledfx/api/device_effects.py", line 50, in put device.set_effect(effect) File "/usr/local/lib/python3.7/dist-packages/ledfx-0.3-py3.7.egg/ledfx/devices/init.py", line 49, in set_effect self._active_effect.activate(self.pixel_count) File "/usr/local/lib/python3.7/dist-packages/ledfx-0.3-py3.7.egg/ledfx/effects/audio.py", line 437, in activate self._audio_data_updated) File "/usr/local/lib/python3.7/dist-packages/ledfx-0.3-py3.7.egg/ledfx/effects/audio.py", line 117, in subscribe self.activate() File "/usr/local/lib/python3.7/dist-packages/ledfx-0.3-py3.7.egg/ledfx/effects/audio.py", line 99, in activate stream_callback = self._audio_sample_callback) File "/usr/local/lib/python3.7/dist-packages/PyAudio-0.2.11-py3.7-linux-armv7l.egg/pyaudio.py", line 750, in open stream = Stream(self, args, kwargs) File "/usr/local/lib/python3.7/dist-packages/PyAudio-0.2.11-py3.7-linux-armv7l.egg/pyaudio.py", line 441, in init self._stream = pa.open(arguments) OSError: [Errno -9998] Invalid number of channels

sladaar commented 4 years ago

about accessing the visualizer remotely i'm still trying to do it myself, so i can't help!

about the ledfx issue i don't know much about the pi, to be honest. It seems some installation/library problem tho. Like, are you using a mic or the mixed audio? It looks like there's no audio input configured. I would try with python3.6 also, but first check the audio input.

sjude68 commented 4 years ago

I am using a USB Mic on the RaspberryPi.

On a Windows 10 laptop Ledfx works fine within Anaconda.

SDLyle commented 4 years ago

I had the same issue. I believe its trying to use the on board sound vs your USB. I found the solution in closed issue #31 The only other problem was trying to figure out which device was which. For that I installed a littte python script with the following : pi@raspberrypi:~ $sudo python3.7 -m pip install sounddevice

followed by

pi@raspberrypi:~ $ python3.7 -m sounddevice

which returned

0 bcm2835 ALSA: IEC958/HDMI (hw:0,1), ALSA (0 in, 8 out) 1 bcm2835 ALSA: IEC958/HDMI1 (hw:0,2), ALSA (0 in, 8 out) 2 2 Channel USB Audio: - (hw:1,0), ALSA (2 in, 2 out) 3 dmix, ALSA (0 in, 2 out)

so in my instance I added the following to my /home/pi/.ledfx/config.yaml file

audio: device_index: 2

I just pasted it at the top and it worked!

ahodges9 commented 4 years ago

@sjude68, the latest LedFx should now auto-detect your IP settings. Just delete the "host" line from your config and restart. We are also working on adding a setting page for the audio settings. For now, you will need to add it manually. Let me know if you have other issues. Closing this out

sjude68 commented 4 years ago

Thanks for the update. It works with USB Mic connected to Raspberry Pi.

On Wed, Jan 15, 2020 at 11:06 PM Austin Hodges notifications@github.com wrote:

Closed #46 https://github.com/ahodges9/LedFx/issues/46.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ahodges9/LedFx/issues/46?email_source=notifications&email_token=AD35TYYNLAIRURY3JEHOYSLQ55CRTA5CNFSM4IECVIG2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOV7XXQLQ#event-2951706670, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD35TY3PLMYCRGCN7ZAOKNLQ55CRTANCNFSM4IECVIGQ .

TurboTronix commented 3 years ago

Would it work with a pi zero with a SPH0645LM4H mic?