Code Monkey home page Code Monkey logo

ledfx's People

Contributors

a-reda avatar ahodges9 avatar arirobinson avatar austinh-msft avatar dshokouhi avatar gabedahl avatar madlittlemods avatar mattallmighty avatar not-matt avatar shauneccles avatar simon-wh avatar thatdonfc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ledfx's Issues

Energy effect not working

Changes to mel code leave energy effect not working

File "...\effects\energy.py", line 22, in audio_data_updated lows_idx = int(np.mean(self.pixel_count * data.melbank_lows()) ** self._config['scale']) AttributeError: 'MelbankInputSource' object has no attribute 'melbank_lows'

How to get Playstation Eye Camera working on Raspberry Pi?

I am running the latest Raspbian Buster (as of 2-5-2020) on a raspberry pi 3 with a PS3 Eye camera attached. I am able to select the device in the web ui [Current device: USB Camera-B4.09.24.1: Audio (hw:1,0)] and it populates the config.yaml file with "device: 2". I have also used arecord to verify I can record audio to a wav file correctly. I am getting the following error when trying to select an audio reactive effect in the ledfx ui. I suspect the error has something to do with the PS Eye camera having 4 different audio channels. Has anyone got the PS Eye camera working with ledfx on a raspberry pi or otherwise? I am using Python 3.7.3 which is installed by default on my version of Raspbian.

pi@raspberrypi:~/.ledfx $ ledfx --open-ui
Loading configuration file from /home/pi/.ledfx
Started webinterface at http://127.0.1.1:8888
/home/pi/.local/lib/python3.7/site-packages/ledfx/effects/gradient.py:94: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
gradient = np.hstack(self._color_ease(len(ease_chunks[i]), *color_pairs[i]) for i in range(n_colors-1))
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 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2719
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843
[2020-02-08 00:53:45] ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 378, in start
resp = await self._request_handler(request)
File "/home/pi/.local/lib/python3.7/site-packages/aiohttp/web_app.py", line 341, in _handle
resp = await handler(request)
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/api/init.py", line 26, in handler
return await method(**{arg_name: available_args[arg_name] for arg_name in wanted_args})
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/api/device_effects.py", line 51, in put
device.set_effect(effect)
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/devices/init.py", line 49, in set_effect
self._active_effect.activate(self.pixel_count)
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/effects/audio.py", line 496, in activate
self._ledfx.audio.subscribe(self._audio_data_updated)
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/effects/audio.py", line 126, in subscribe
self.activate()
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/effects/audio.py", line 108, in activate
stream_callback = self._audio_sample_callback)
File "/home/pi/.local/lib/python3.7/site-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/pyaudio.py", line 441, in init
self._stream = pa.open(**arguments)
OSError: [Errno -9997] Invalid sample rate

How do you set up audio?

I am running "scottlawsonbc audio-reactive-led-strip" firmware on a NodeMCU esp8266 board and I followed the installation guide. I can get nonreactive effects like "Gradient" to work seamlessly. But whenever I select a reactive effect like "Energy", nothing happens. I'm on a mac, maybe that's the problem? I'm totally new to all of this so sorry for the (maybe) stupid question, but how do I get audio input to work? I'm sure I should provide more info, but I don't know what to provide so just tell me what and I'll provide it.

[windows 10] configuration lost when closing / create a shortcut to activate the env AND executing "ledfx" command

First of all, thanks a lot for this project, it's awesome!

So, i'm on windows and installed ledfx in Anaconda.
To run the visualization i needed a shortcut without entering the environment, so i found the executable in
C:\Users"myuser"\Anaconda3\envs\ledfx\Scripts\ledfx.exe
and so far no problems.
BUT, when i close the window it seems i lose the configuration file,
C:\Users"myuser"\AppData\Roaming.ledfx\config.yaml
or however i can't run the visualization no more because it fires me an error:

Loading` configuration file from C:\Users\mbibox\AppData\Roaming\.ledfx
Traceback (most recent call last):
  File "c:\users\mbibox\anaconda3\envs\ledfx\lib\site-packages\voluptuous\schema_builder.py", line 267, in __call__
    return self._compiled([], data)
  File "c:\users\mbibox\anaconda3\envs\ledfx\lib\site-packages\voluptuous\schema_builder.py", line 553, in validate_dict
    raise er.DictInvalid('expected a dictionary', path)
voluptuous.error.DictInvalid: expected a dictionary

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\mbibox\anaconda3\envs\ledfx\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\mbibox\anaconda3\envs\ledfx\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\mbibox\Anaconda3\envs\ledfx\Scripts\ledfx.exe\__main__.py", line 7, in <module>
  File "c:\users\mbibox\anaconda3\envs\ledfx\lib\site-packages\ledfx\__main__.py", line 88, in main
    ledfx = LedFxCore(config_dir = args.config)
  File "c:\users\mbibox\anaconda3\envs\ledfx\lib\site-packages\ledfx\core.py", line 23, in __init__
    self.config = load_config(config_dir)
  File "c:\users\mbibox\anaconda3\envs\ledfx\lib\site-packages\ledfx\config.py", line 87, in load_config
    return CORE_CONFIG_SCHEMA(yaml.load(file))
  File "c:\users\mbibox\anaconda3\envs\ledfx\lib\site-packages\voluptuous\schema_builder.py", line 271, in __call__
    raise er.MultipleInvalid([e])
voluptuous.error.MultipleInvalid: expected a dictionary`

Thanks in advance!

with further investigations it seems that executing that exe could be the problem, because running the script inside the anaconda environment could resolve the issue.
So i'm trying to create a shortcut to activate the env AND execute "ledfx" command.

Using 3.5mm Audio Jack on Pi

I've been playing around with it for awhile but can't seem to get LedFx to find any audio devices on the Pi 3b, when I think it should be able to find the onboard device.

I was looking to have the Pi be used as a bluetooth or spotify device and play sound through the audio jack to speakers. The sound works coming out of the jack, but can't seem to get it to work with LedFx.

I also tried manually adding the device in the config file but this would crash LedFx (Seg Fault).

Not sure if this is a problem with a dependency or not.

Windows Launch Error

Install completed successfully (?), but upon running program gives error "failed to create process." with no further info.

Activating a preset via API

Is it possible to activate a preset via the API so I can control LedFx via HomeAssitant

I found a integration for Home Assistant but it seems like its a full version of LedFx (which is awesome just not what I was hoping for) as opposed to a integration more geared up towards control

Also as a bonus is it possible to stop control via the api?

btw sorry if I'm being thick and the solutions fairly obvious

General Discussion

Just wanted to start up a thread for general discussions about the project. My main focus currently is building up the core backed to be extensible such that adding new devices and effects is easy. My second focus will be on updating the front end to support the full REAT API (essentially user friendly version of the developer tools page) which I am looking into using React.js

Is there any core functionality that people think is missing? Open to any architectural changes as well (better sooner rather than later!)

Please create new issues (tagged with enhancement) for any feature request

I also created a discord channel to make discussions easier if necessary: https://discord.gg/wJ755dY

Error on installation

When installing fastled on windows 10 I get this error message:

ERROR: Failed building wheel for aiohttp
Running setup.py clean for aiohttp
Failed to build aiohttp
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Zafri\Anaconda3\envs\ledfx\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Zafri\AppData\Local\Temp\pip-install-20kry1sc\pyaudio\setup.py'"'"'; file='"'"'C:\Users\Zafri\AppData\Local\Temp\pip-install-20kry1sc\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Zafri\AppData\Local\Temp\pip-wheel-dq_b4n6b' --python-tag cp37
cwd: C:\Users\Zafri\AppData\Local\Temp\pip-install-20kry1sc\pyaudio
Complete output (55 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying src\pyaudio.py -> build\lib.win-amd64-3.7
running build_ext
building 'portaudio' extension
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Zafri\AppData\Local\Temp\pip-install-20kry1sc\pyaudio\setup.py", line 122, in
extra_link_args=extra_link_args)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\site-packages\setuptools_init
.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\site-packages\setuptools\command\build_ext.py", line 205, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils\command\build_ext.py", line 534, in build_extension
depends=ext.depends)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils_msvccompiler.py", line 346, in compile
self.initialize()
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\distutils_msvccompiler.py", line 239, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\site-packages\setuptools\msvc.py", line 1620, in return_env
if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist):
File "C:\Users\Zafri\Anaconda3\envs\ledfx\lib\genericpath.py", line 30, in isfile
st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType


ERROR: Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for aiohttp which use PEP 517 and cannot be installed directly

Could anyone help me? Thanks in advance.

Enhancement ideas

1. Editable Device

Environment: Device Management
Ability to edit the device.

2. Basic Device Effect Saving (bug)

Fixed and Deployed
https://github.com/simon-wh/LedFx/commits?author=simon-wh
Tested and is working. Thanks @simon-wh 👍
Got this bug though: https://github.com/Mattallmighty/LedFx/issues/2

3. Dashboard

Environment: Dashboard
Deployed
Added display current effect - pulled from the API, and can have an overview of what is being pushed to devices.
dashboard

4. Audio Channels

Environment: Device
Within effect, can select to assign reactive audio settings for channels from one of the following options:

  • mono
  • stereo
  • left
  • right
    Would also be good to have Material UI: Range sliders for the audio frequency you will use on the effect.
    Front end done, but backend audio.py needs to be actioned;
    image

5. Click on device name loads current effect of the device

Environment: Device
Fixed and Deployed
When you click on the device name, will do an API call: http://127.0.0.1:8888/api/devices/102/effects, loads front end material-ui inputs with the current set effects.
For example:
Click on device 102
Does API call: http://127.0.0.1:8888/api/devices/102/effects
API call is: {"effect": {"config": {"brightness": 1.0, "blur": 4.0, "scale": 1.0, "Audio_Channel": "Mono", "mirror": true, "flip": false}, "name": "Energy", "type": "energy(Reactive)"}}
And will put the front end options in place from the API call

6. Front End change Material UI: Slider in device effect

Environment: Device
Add in Material UI: Slider to replace brightness and other device effect settings.
https://material-ui.com/components/slider/ - Tooltip value label
image
image

7. Group Devices

Environment: Device Management
Within Manage Devices, ability to group devices, so can set effect and deploys to two devices at the same time.
Example: Manage Devices, can edit: LED1 to link with LED2. When LED1 is updated, so is LED2. LED2 will be greyed out/cannot select device option.

8. New effect: WLED

Environment: Device
Rethinking this, I don't this is possible via the WLED API due to the delay in E1.31 mode to WLED effect mode.
Within Device, effect option will be: WLED.
Need to get from API 'ip_address' feild to use as a string, for example: http://127.0.0.1:8888/api/devices/102
As soon as selected WLED from dropdown (Async), disables E1.31 multicast of the device, and will then have full flexibility to select Effects, Palettes, Effect Intensity - as the option is selected.
Like what Frenck has done on Home Assistant: https://github.com/frenck/python-wled
https://cdn.discordapp.com/attachments/621678796101124106/641272718574223372/68167769-f42f5300-ff66-11e9-896c-3c29c8da3252.gif

Backend: https://github.com/Aircoookie/WLED/wiki/HTTP-request-API

9.0 Save Presets

Environment(New): Presets
Deployed
Create "Presets" of all LEDs devices current effect settings.
Under Device Management, bottom right hand corner have a button that, pops out that allows the user to create a name of the preset(For example: Default), upon clicking save, saves all the current effect settings pulled from: http://127.0.0.1:8888/api/devices and save to config.yaml.
C:\Users\mattallmighty\AppData\Roaming.ledfx\config.yaml
When you click on preset, it will POST in place all the current effects for all the devices.
the vision

9.1 Keyboard & MIDI input trigger

Environment(New): Presents
Rethinking this, we can achieve this in Q light plus - Fuctions: Script - LedFx API Activate preset and assign MIDI button on launchpad to deploy effect.

Keeping the below as backup...
Assign a keyboard key, or MIDI key to a preset.
Ability to be direct switch or momentary switch (ie holding down keyboard (a) will POST the assigned preset.
image

9.2 Spotify API - View song, Play/Pause, Next track.

Environment(New): Web page banner, like Soundcloud
Via Spotify API get users current track.
Front end banner displays Spotify User's Currently Playing Track, with buttons for Play/Pause, Next track.
spotify-ledfx

9.3 Spotify API - song + right time = output API

As defined in "Preset Management"
Button in "Preset Management" that shows There will be a drop down of the current presets saved, and can create a button that creates a trigger for if this song, and this time, then apply this Preset.
https://github.com/plamere/spotipy

Audio device not found

I have a Pi4, ledfx seems to work but as soon as I try an interactive pattern it terminates.

I have tried two different USB microphones, both have the same outcome.

Here is the output

ubuntu@ubuntu:~/.ledfx$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 2: Elf [Maono Elf], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

ubuntu@ubuntu:~/.ledfx$ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Elf
Maono Elf, USB Audio
Default Audio Device
sysdefault:CARD=Elf
Maono Elf, USB Audio
Default Audio Device
front:CARD=Elf,DEV=0
Maono Elf, USB Audio
Front speakers
surround21:CARD=Elf,DEV=0
Maono Elf, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Elf,DEV=0
Maono Elf, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Elf,DEV=0
Maono Elf, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Elf,DEV=0
Maono Elf, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Elf,DEV=0
Maono Elf, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Elf,DEV=0
Maono Elf, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Elf,DEV=0
Maono Elf, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Elf,DEV=0
Maono Elf, USB Audio
Direct sample mixing device
dsnoop:CARD=Elf,DEV=0
Maono Elf, USB Audio
Direct sample snooping device
hw:CARD=Elf,DEV=0
Maono Elf, USB Audio
Direct hardware device without any conversions
plughw:CARD=Elf,DEV=0
Maono Elf, USB Audio
Hardware device with all software conversions

Error running ledfx

yaml.scanner.ScannerError: mapping values are not allowed here
in "C:\Users\Preston\AppData\Roaming.ledfx\config.yaml", line 3, column 5

install seemed to work fine, however getting this every time I try to run it.

LedFx Raspbian - Error when activating devices "Unknown PCM"

Hi,
thanks for your great work - with Windows/Anaconda everything is running fine, the combination with WLED looks awesome.

Now i tried to use my Raspberry Pi, installation with miniconda went smooth, the webserver starts and i can add WLED devices.

But when activating devices the following error occurs - i'm using a USB mic with the following settings in .asoundrc and added the user pi to the audio group.

pcm.!default{
type asym
capture.pcm{
type plug
slave.pcm "hw:1, 0"
}
}

ctl.!default{
type hw
card 0
}

Loading configuration file from /home/pi/.ledfx
Started webinterface at http://192.168.178.173: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 pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM speaker

Thanks in advance!

Effects not the same as the original

Hi,

First, just like to say this project is amazing! Good job! I'm just noticing the effects specifically the scroll effect is not the same as the original. The one by @not-matt (Systematic-LEDs) is a lot smoother and looks nicer. I know there are settings to tweak but I can't seem to perfect it. I tried his fork but the same problem persists.

Thanks in advance,

lpearl

LedFx with Strip on Rasp3B GPIO

Hi.
I have an LED Strip directly connected to an Raspberry pi 3b Pin 18(GPIO5), controlled via
Scott’s audio-reactive-led-strip. working good.
Now i wanted to try LedFx, got the software running on the Raspberry but
have Problems to get the LEDs lit.

As writen in the wiki i did

  • Add the device as a UDP
  • Click ‘Additional Properties’ and check ‘Include Indexes’

but what to enter for UDP-Port? and hostname?
entering the IP of the Raspberry and some random udp port does not lead to success.

Any hints? Thanks!

Failed to building wheel for aubio

Getting the following error after trying to install pip install ledfx
Running windows 10 64 bit
Anaconda 32 bit

Failed building wheel for aubio
Running setup.py clean for aubio
Failed to build aubio
Installing collected packages: pywin32, pypiwin32, aubio, MarkupSafe, jinja2, aiohttp-jinja2, ledfx
Found existing installation: pywin32 221
Cannot uninstall 'pywin32'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

pip install ledfx [WinError 87]

Hi

I followed the instructions with a fresh install of Anaconda on Windows till pip install ledfx.

Terminal spits out the followin:

(ledfx) C:\Users\admin>pip install ledfx

Collecting ledfx
Using cached https://files.pythonhosted.org/packages/49/c6/d4d2e0faa94b43b983ec4185094ea0f0176ae117037528a3a58a504e5aa8/ledfx-0.3-py3-none-any.whl

Collecting pypiwin32>=223; platform_system == "Windows" (from ledfx)
Downloading https://files.pythonhosted.org/packages/d0/1b/2f292bbd742e369a100c91faa0483172cd91a1a422a6692055ac920946c5/pypiwin32-223-py3-none-any.whl

Collecting pyaudio>=0.2.11 (from ledfx)
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
ERROR: Error [WinError 87] The parameter is incorrect while executing command python setup.py egg_info

ERROR: Could not install packages due to an EnvironmentError: [WinError 87] The parameter is incorrect

Googled for solutions but didn't finde anythin usefull. I'm quite new to python.

Using python 3.7.3, setuptools 41.0.1

Any help is appreciated.

Choose system sound of Win10 as audio input

The project works fine when doing audio effects, however it uses my mic as the input. I would like to choose the system sounds as the input, this way I'd be able to use Spotify or whatever music player to actually be the input.

Thanks in advance!

Select audio input?

Hey, on my Odroid device the default audio device doesn't seem to work for input. Doesn't look like there's a config value for specifying one in particular.

I've used arecord -L to list my devices and arecord -D plughw:CARD=Device,DEV=0 -f cd -d 0 -vv /dev/null to test monitoring the levels with success.

First impressions (Linux Mint 19)

Hi again,

seems there’s still some work to do.

  • WebUI looks simple (no CSS?)
    bildschirmfoto vom 2018-07-21 11-54-22-ledfx-dash
  • Where do I find a hint what’s supposed to go into "Effects config"?
  • Upon each and every effect, a 405: Method Not Allowed is returned.
  • Upon first run, after creating the default config,yaml, it responds (due to creating a config with no devices):
matthias@e6410-mch:~/Projekte/local/LedFx$ ledfx --open-ui
Failed to find configuration file. Creating default configuration file in /home/matthias/.ledfx/config.yaml
Loading configuration file from /home/matthias/.ledfx
Traceback (most recent call last):
  File "/usr/local/bin/ledfx", line 11, in <module>
    load_entry_point('ledfxcontroller==0.1.0a0', 'console_scripts', 'ledfx')()
  File "/usr/local/lib/python3.6/dist-packages/ledfxcontroller-0.1.0a0-py3.6.egg/ledfxcontroller/__main__.py", line 88, in main
    ledfx = LedFxController(config_dir = args.config)
  File "/usr/local/lib/python3.6/dist-packages/ledfxcontroller-0.1.0a0-py3.6.egg/ledfxcontroller/core.py", line 22, in __init__
    self.config = load_config(config_dir)
  File "/usr/local/lib/python3.6/dist-packages/ledfxcontroller-0.1.0a0-py3.6.egg/ledfxcontroller/config.py", line 94, in load_config
    return CORE_CONFIG_SCHEMA(yaml.load(file))
  File "/usr/local/lib/python3.6/dist-packages/voluptuous-0.11.1-py3.6.egg/voluptuous/schema_builder.py", line 267, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.6/dist-packages/voluptuous-0.11.1-py3.6.egg/voluptuous/schema_builder.py", line 587, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.6/dist-packages/voluptuous-0.11.1-py3.6.egg/voluptuous/schema_builder.py", line 425, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: expected dict for dictionary value @ data['devices']

My config.yaml:

devices:
  esps1:
    channel_count: 180
    channel_offset: 0
    host: 192.168.170.66
    max_brightness: 1.0
    name: esps1
    type: e131
    universe: 1
host: 127.0.0.1
port: 8888
  • The docs should probably remind of using python3 and pip3 for Linuxes that still have Python 2.x as default (Mint 19 has 2.7.15, Arch has 3.6 and so on).

cannot install due to 'PyYAML' please help

Hi everybody,

I just heard about this project and it sounds super fun! Unfortunately, I cannot install it. When I run (sudo) pip install ledfx, it will collect multiple requirements (and/or check whether they have already been satisfied), then stop with this error

Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python3.8/site-packages (from jinja2>=2.7->aiohttp-jinja2==1.0.0->ledfx) (1.1.1)
Installing collected packages: voluptuous, pyyaml, sacn, multidict, yarl, async-timeout, aiohttp, pyaudio, aubio, aiohttp-jinja2, ledfx
  Found existing installation: PyYAML 5.1.2
ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Apparently, PyYAML 5.1.2 is already installed on my system; it has been installed by distutils and therefore I am not comfortable manually trying to uninstall it so that pip can start fresh. However, since it is already installed, why should it be uninstalled, anyway?

I am running Arch Linux 5.3.11 x86_64 on an Intel NUC. Usually don't have problems with pip at all.

What can I do to fix this? Thank you for your solutions :)

Raspberry PI now working. Finally .....

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 save

sudo 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

voluptuous.error

root@raspberrypi:~# ledfx
Loading configuration file from /root/.ledfx
Started webinterface at http://192.168.178.107:8888
[2019-11-21 17:41:33] ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 267, in call
return self._compiled([], data)
File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 553, in validate_dict
raise er.DictInvalid('expected a dictionary', path)
voluptuous.error.DictInvalid: expected a dictionary

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 378, in start
resp = await self._request_handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 341, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.6/site-packages/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.6/site-packages/ledfx/api/device_effects.py", line 50, in put
device.set_effect(effect)
File "/usr/local/lib/python3.6/site-packages/ledfx/devices/init.py", line 49, in set_effect
self._active_effect.activate(self.pixel_count)
File "/usr/local/lib/python3.6/site-packages/ledfx/effects/audio.py", line 433, in activate
self._ledfx.audio = MelbankInputSource(self._ledfx, self._ledfx.config.get('audio', {}))
File "/usr/local/lib/python3.6/site-packages/ledfx/effects/audio.py", line 203, in init
config = self.CONFIG_SCHEMA(config)
File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 271, in call
raise er.MultipleInvalid([e])
voluptuous.error.MultipleInvalid: expected a dictionary

How can I fix this? Thanks for your time & support :-)

Access the GUI from another PC on the lan?

Hi, really cool project.
I've completed installation on Debiun 10, when I start it, it starts the web server, but on address 127.0.0.1, how do I get it to bind to a different interface?

Run on Linux?

I’m just trying to test this, because I like the ideas behind it (see my comments at not-matt/Systematic-LEDs#3 (comment)).

I’m currently working on a Linux Mint 19 (→ Ubuntu 18.04 → Debian) system and can’t get it installed—it claims it needs some pywin module:

Searching for pywin32>=223
Reading https://pypi.org/simple/pywin32/
No local packages or working download links found for pywin32>=223
error: Could not find suitable distribution for Requirement.parse('pywin32>=223')

(Not to myself: Seems to require Python 3.)

pip install ledFX fails

Hey!

When trying to install ledFX I get following error:

~/LedFx$ pip install ledfx
Collecting ledfx
Could not find a version that satisfies the requirement ledfx (from versions: )
No matching distribution found for ledfx

Any idea?

Installation

how do I install on Raspberry Pi.

I get error that no suitable version found.

Unable to start ledfx

Raspbian Buster-lite.

Installing ledfx seems to have succeeded but upon trying to start ledfx I get the following errors:

Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/numpy/core/init.py", line 17, in
from . import multiarray
File "/home/pi/.local/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in
from . import overrides
File "/home/pi/.local/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in
from numpy.core._multiarray_umath import (
ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pi/.local/bin/ledfx", line 6, in
from ledfx.main import main
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/main.py", line 26, in
from ledfx.core import LedFxCore
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/core.py", line 11, in
from ledfx.http import HttpServer
File "/home/pi/.local/lib/python3.7/site-packages/ledfx/http.py", line 7, in
import numpy as np
File "/home/pi/.local/lib/python3.7/site-packages/numpy/init.py", line 142, in
from . import core
File "/home/pi/.local/lib/python3.7/site-packages/numpy/core/init.py", line 47, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.

  • Try uninstalling and reinstalling numpy.

  • If you have already done that, then:

    1. Check that you expected to use Python3.7 from "/usr/bin/python3",
      and that you have no directories in your PATH or PYTHONPATH that can
      interfere with the Python and numpy version "1.17.4" you're trying to use.
    2. If (1) looks fine, you can open a new issue at
      https://github.com/numpy/numpy/issues. Please include details on:
      • how you installed Python
      • how you installed numpy
      • your operating system
      • whether or not you have multiple versions of Python installed
      • if you built from source, your compiler versions and ideally a build log
  • If you're working with a numpy git repository, try git clean -xdf
    (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory

setting up

somebody can guide me in how can i set up the led strips im using an esp8622

High CPU Usage

Hello,
I got LedFX on my Raspberry Pi 4 Working, but it use 60% of the cpu.

Is this normal?

If Not, how i can fix the high usage of cpu?

Other than multiple-of-3-channel (RGB) devices possible/planned?

I have some H801 (RGB2W) controllers lying around and plan to use them with penfold42’s ESPixelBoard.

I’d use these to control:

  • a "dumb" RGB strip
  • an additional "black light" strip on White 1
  • an additional "warm white" strip on White 2 (mainly for room lighting)

So I’m thinking it’d be nice to use audio control for other-than-RGB DMX devices, like

  • 4 channels on a H801 (RGB + black light)
  • 3 channels on a H801 (RGB)
  • 1 channel on a H801 (white, for strobe other other effects)
  • 1 channel on general DMX devices, like PAR 16/36/64 stage lights, strobe, fog machine, etc.

I do assume it should be possible to consolidate any number of mel bands into any number of channels, right? Could the live visualizer handle arbitrary channel configurations?

MacOS

Could some good soul port this to MacOS? I've tried installing using the Linux installation docs but to no avail.

Visualization Stuck

This affects 0 volume inputs , e.g. from virtual audio devices (direct playback from audio output). Occured while routing audio with Volume Control from PulseAudio in Linux.

Affected Code in ledfx/effects/audio.py:
self._volume = aubio.db_spl(self._raw_audio_sample) self._volume_filter.update(self._volume) - line 155-156

If you look up aubio.db_spl function https://aubio.org/manual/latest/py_utils.html, it is calculating the Sound Pressure Level by using log - resulting in -inf, if 0 input volume is provided, which is then used to update the volume_filter

Once -inf is applied to ExpFilter Implementation of Scott Lawson it will keep this value, even if volume rises again after an 0 volume intput (song change, ...) -> disabling all further audio processing, since -inf is always smaller than the min_volume (default -70)

if self._volume_filter.value > self._config['min_volume']: #process audio

Possible Solution:
Add a check between lines 155 to 156:
if self._volume < self._config['min_volume']: self._volume = -0.1 # set it to other value than -inf

No Longer Working

Hi,

Thanks for a great program! I had this setup and working on windows 10 for some time. The other day I started ledfx from anaconda terminal as usual and deleted all devices, as I wanted to start from scratch since the IP's have changed. LedFX crashed and when I tried to restart, I get the following error:

(ledfx) C:\Users\henry>ledfx --open-ui
Loading configuration file from C:\Users\henry\AppData\Roaming\.ledfx
Started webinterface at http://192.168.56.1:8888
Traceback (most recent call last):
  File "c:\users\henry\anaconda3\envs\ledfx\lib\site-packages\ledfx\effects\audio.py", line 142, in _audio_sample_callback
    self._invoke_callbacks()
  File "c:\users\henry\anaconda3\envs\ledfx\lib\site-packages\ledfx\effects\audio.py", line 149, in _invoke_callbacks
    callback()
  File "c:\users\henry\anaconda3\envs\ledfx\lib\site-packages\ledfx\effects\audio.py", line 512, in _audio_data_updated
    self.audio_data_updated(self.audio)
  File "c:\users\henry\anaconda3\envs\ledfx\lib\site-packages\ledfx\effects\rain(Reactive).py", line 99, in audio_data_updated
    self.pixels = self.get_drops()
  File "c:\users\henry\anaconda3\envs\ledfx\lib\site-packages\ledfx\effects\__init__.py", line 186, in pixels
    pixels = blur_pixels(pixels=pixels, sigma=self._config['blur'])
  File "c:\users\henry\anaconda3\envs\ledfx\lib\site-packages\ledfx\effects\__init__.py", line 49, in blur_pixels
    rgb_array[0] = smooth(rgb_array[0], sigma)
ValueError: could not broadcast input array from shape (5) into shape (10)
[2020-02-26 19:18:00] ERROR:ledfx.core:Exception in core event loop: Task exception was never retrieved
Traceback (most recent call last):
  File "c:\users\henry\anaconda3\envs\ledfx\lib\genericpath.py", line 19, in exists
    os.stat(path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Windows\\system32\\seamonkey.WSF'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\henry\anaconda3\envs\ledfx\lib\site-packages\ledfx\core.py", line 100, in async_start
    import webbrowser
  File "c:\users\henry\anaconda3\envs\ledfx\lib\webbrowser.py", line 531, in <module>
    if shutil.which(browser):
  File "c:\users\henry\anaconda3\envs\ledfx\lib\shutil.py", line 1157, in which
    if _access_check(name, mode):
  File "c:\users\henry\anaconda3\envs\ledfx\lib\shutil.py", line 1113, in _access_check
    return (os.path.exists(fn) and os.access(fn, mode)
  File "c:\users\henry\anaconda3\envs\ledfx\lib\genericpath.py", line 19, in exists
    os.stat(path)
ValueError

It looks like possibly "C:\Windows\system32\seamonkey.WSF" is missing. I tried restarting the computer and even tried to restore the whole env/ledfx folder, from a backup, but still get the error. Any help is greatly appreciated.

AttributeError: type object 'RestEndpoint' has no attribute '_registry'

How to fix that?

Traceback (most recent call last):
File "/home/gpaquin/.local/bin/ledfx", line 7, in
from ledfx.main import main
File "/home/gpaquin/.local/lib/python3.5/site-packages/ledfx/main.py", line 26, in
from ledfx.core import LedFxCore
File "/home/gpaquin/.local/lib/python3.5/site-packages/ledfx/core.py", line 11, in
from ledfx.http import HttpServer
File "/home/gpaquin/.local/lib/python3.5/site-packages/ledfx/http.py", line 6, in
from ledfx.api import RestApi
File "/home/gpaquin/.local/lib/python3.5/site-packages/ledfx/api/init.py", line 8, in
class RestEndpoint(BaseRegistry):
File "/home/gpaquin/.local/lib/python3.5/site-packages/ledfx/utils.py", line 137, in no_registration
del cls._registry[name]
AttributeError: type object 'RestEndpoint' has no attribute '_registry'

numpy/arrayobject.h: No such file or directory

Hi,

i get this problem when trying to install ledfx on Ubuntu 19.10

creating build/temp.linux-x86_64-3.7/python/gen
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DAUBIO_VERSION=0.4.9 -DUSE_LOCAL_AUBIO=1 -DHAVE_STDLIB_H=1 -DHAVE_STDIO_H=1 -DHAVE_MATH_H=1 -DHAVE_STRING_H=1 -DHAVE_ERRNO_H=1 -DHAVE_C99_VARARGS_MACROS=1 -DHAVE_LIMITS_H=1 -DHAVE_STDARG_H=1 -DHAVE_MEMCPY_HACKS=1 -DHAVE_WAVWRITE=1 -DHAVE_WAVREAD=1 -Ipython/ext -Isrc -Ipython/gen -I/usr/include/python3.7m -c python/ext/aubiomodule.c -o build/temp.linux-x86_64-3.7/python/ext/aubiomodule.o
In file included from python/ext/aubiomodule.c:2:
python/ext/aubio-types.h:17:10: fatal error: numpy/arrayobject.h: No such file or directory
17 | #include <numpy/arrayobject.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for aubio

Any idea?

Thanks Stefan

issue raspberry pi

On the latest raspbian stretch i get the following error after install

Finished processing dependencies for ledfxcontroller==0.1.0a0
root@raspberrypi:/home/pi/ledfx# ledfx --open-ui
Traceback (most recent call last):
File "/usr/local/bin/ledfx", line 11, in
load_entry_point('ledfxcontroller==0.1.0a0', 'console_scripts', 'ledfx')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2291, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python3.5/dist-packages/ledfxcontroller-0.1.0a0-py3.5.egg/ledfxcontroller/main.py", line 26, in
from ledfxcontroller.core import LedFxController
File "/usr/local/lib/python3.5/dist-packages/ledfxcontroller-0.1.0a0-py3.5.egg/ledfxcontroller/core.py", line 11, in
from ledfxcontroller.http import LedFxControllerHTTP
File "/usr/local/lib/python3.5/dist-packages/ledfxcontroller-0.1.0a0-py3.5.egg/ledfxcontroller/http.py", line 7, in
from ledfxcontroller.api import RestApi
File "/usr/local/lib/python3.5/dist-packages/ledfxcontroller-0.1.0a0-py3.5.egg/ledfxcontroller/api/init.py", line 28, in
class RestEndpoint(BaseRegistry):
File "/usr/local/lib/python3.5/dist-packages/ledfxcontroller-0.1.0a0-py3.5.egg/ledfxcontroller/utils.py", line 92, in no_registration
del cls._registry[name]
AttributeError: type object 'RestEndpoint' has no attribute '_registry'

ERROR: Failed to create process.

Looks like there are some issues with setuptools which can cause "ledfx" to fail with "Failed to create process." This will only occur if your python install path contains spaces. You can workaround this by using a virtual python environment such as anaconda or using virtualenvwrapper:

$ pip install virtualenvwrapper-win # virtualenvwrapper if not Windows
$ mkvirtualenv ledfx
(ledfx) $ pip install ledfx
(ledfx) $ ledfx --open-ui

Then, when you need to launch from a new shell first run:
$ workon ledfx

Will continue to look into the issue to make it more seamless.

Config Loading/Creation

Two things.

in ledfxcontroller\devices_init_.py", line 151, in create_from_config
name = device_config.get('type'))
AttributeError: 'str' object has no attribute 'get'

Changed to:
name = type(device_config))

Now error is:
ledfxcontroller\utils.py", line 196, in create
name, self._cls.name.lower()))
AttributeError: Couldn't find '<class 'str'>' in the device registry

Which I imagine is linked to what you mentioned about the config file needing fixing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.