LedFx icon indicating copy to clipboard operation
LedFx copied to clipboard

Update to 2.1.6 breaks ledfx for me

Open PPPAnimal opened this issue 8 months ago • 24 comments

Describe the bug

After installing 2.1.6, unable to open webUI and no connection to lights. entering 0 as audio device ID and its starts up again. Set audio device in WebUI and it works, sets it as ID 28 restart service and again unable to connect. Deleted config.json and it works again Add a device with non-reactive effect and its fine over restarts Add a sound reactive effect and it works for that session but after restart again, no webUI or connection to devices. Reverted to 2.1.5 and copied my old config back in and all is fine now.

Traceback (most recent call last): File "ledfx\effects\audio.py", line 624, in activate open_audio_stream(device_idx) File "ledfx\effects\audio.py", line 619, in open_audio_stream AudioInputSource._stream.start() File "sounddevice.py", line 1129, in start File "sounddevice.py", line 2836, in _check sounddevice.PortAudioError: Error starting stream: Unanticipated host error [PaErrorCode -9999]: 'GetNameFromCategory: usbTerminalGUID = 7D1E ' [Windows WDM-KS error -9999]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "ledfx\core.py", line 506, in async_start self.virtuals.create_from_config( File "ledfx\virtuals.py", line 1627, in create_from_config new_virtual.set_effect(effect) File "ledfx\virtuals.py", line 654, in set_effect self._active_effect.activate(self) File "ledfx\effects\audio.py", line 1204, in activate self._ledfx.audio = AudioAnalysisSource( ^^^^^^^^^^^^^^^^^^^^ File "ledfx\effects\audio.py", line 898, in init self.subscribe(self.melbanks) File "ledfx\effects\audio.py", line 662, in subscribe self.activate() File "ledfx\effects\audio.py", line 634, in activate open_audio_stream(default_device) File "ledfx\effects\audio.py", line 619, in open_audio_stream AudioInputSource._stream.start() File "sounddevice.py", line 1129, in start File "sounddevice.py", line 2836, in _check sounddevice.PortAudioError: Error starting stream: Unanticipated host error [PaErrorCode -9999]: 'GetNameFromCategory: usbTerminalGUID = 7D1E ' [Windows WDM-KS error -9999] 2026-04-05 15:23:27,902 ledfx.sentry_config INFO Sentry Configuration: 2026-04-05 15:23:27,902 ledfx.sentry_config INFO DSN (first ten): dc6070345a 2026-04-05 15:23:27,902 ledfx.sentry_config INFO Sample rate: 0 2026-04-05 15:23:27,902 ledfx.sentry_config INFO LedFx release: [email protected] 2026-04-05 15:23:28,198 main INFO LedFx Core is initializing 2026-04-05 15:23:28,198 ledfx.config INFO Loading config file: C:\Users\PPPAnimal\AppData\Roaming.ledfx\config.json 2026-04-05 15:23:28,200 ledfx.config INFO LedFx Configuration Version: 2.3.6 2026-04-05 15:23:28,227 ledfx.utils INFO Final sorted IP list: ['192.168.0.134'] 2026-04-05 15:23:28,255 ledfx.core INFO Using standard asyncio loop 2026-04-05 15:23:28,661 ledfx.core INFO Starting LedFx, listening on 0.0.0.0:8888 2026-04-05 15:23:28,679 ledfx.utils INFO Image cache initialized: max 500MB, 500 items 2026-04-05 15:23:29,901 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': 'wled-9a0e58.local', 'name': 'Panel', 'pixel_count': 1024, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'panel', 'type': 'wled'} 2026-04-05 15:23:29,902 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': 'wled-287374.local', 'name': 'Dragon1', 'pixel_count': 20, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'dragon1', 'type': 'wled'} 2026-04-05 15:23:29,902 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'icon_name': 'mdi:guy-fawkes-mask', 'name': 'panel-mask', 'pixel_count': 1024, 'refresh_rate': 66, 'rows': 16}, 'id': 'panel-mask', 'type': 'dummy'} 2026-04-05 15:23:29,902 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'icon_name': 'mdi:wallpaper', 'name': 'panel-background', 'pixel_count': 1024, 'refresh_rate': 66, 'rows': 16}, 'id': 'panel-background', 'type': 'dummy'} 2026-04-05 15:23:29,902 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'icon_name': 'mdi:star', 'name': 'panel-foreground', 'pixel_count': 1024, 'refresh_rate': 66, 'rows': 16}, 'id': 'panel-foreground', 'type': 'dummy'} 2026-04-05 15:23:29,904 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': 'wled-4f3585.local', 'name': 'Stage', 'pixel_count': 63, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'stage', 'type': 'wled'} 2026-04-05 15:23:29,904 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': 'wled-ab05fc.local', 'name': 'Dragon2', 'pixel_count': 30, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'dragon2-1', 'type': 'wled'} 2026-04-05 15:23:29,904 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': 'wled-ab5344.local', 'name': 'Dragon 3', 'pixel_count': 30, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'dragon-3-1', 'type': 'wled'} 2026-04-05 15:23:29,904 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': 'Ceiling.local', 'name': 'Ceiling', 'pixel_count': 1890, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'ceiling', 'type': 'wled'} 2026-04-05 15:23:29,905 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': '192.168.0.39', 'name': 'Cube', 'pixel_count': 62, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'cube', 'type': 'wled'} 2026-04-05 15:23:29,905 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': 'wled-fd5910.local', 'name': 'Headset', 'pixel_count': 47, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'headset-1', 'type': 'wled'} 2026-04-05 15:23:29,906 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': '192.168.0.123', 'name': 'Animal', 'pixel_count': 50, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'animal', 'type': 'wled'} 2026-04-05 15:23:29,906 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': '192.168.0.57', 'name': 'MOON', 'pixel_count': 4, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'moon', 'type': 'wled'} 2026-04-05 15:23:29,906 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': True, 'icon_name': 'wled', 'ip_address': 'house.local', 'name': 'House', 'pixel_count': 477, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'house', 'type': 'wled'} 2026-04-05 15:23:29,907 ledfx.devices INFO Loading device from config: {'config': {'center_offset': 0, 'create_segments': False, 'icon_name': 'wled', 'ip_address': 'SullySSignS.local', 'name': 'SullySSignS', 'pixel_count': 90, 'refresh_rate': 62, 'rgbw_led': False, 'sync_mode': 'DDP', 'timeout': 1}, 'id': 'sullyssigns-1', 'type': 'wled'} 2026-04-05 15:23:29,910 ledfx.devices INFO Device Cube: Resolved destination to 192.168.0.39 2026-04-05 15:23:29,910 ledfx.utils INFO WLED 192.168.0.39: Attempting to contact device... 2026-04-05 15:23:29,967 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.39 configuration received 2026-04-05 15:23:29,967 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:30,126 ledfx.devices INFO Device Animal: Resolved destination to 192.168.0.123 2026-04-05 15:23:30,126 ledfx.utils INFO WLED 192.168.0.123: Attempting to contact device... 2026-04-05 15:23:30,214 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.123 configuration received 2026-04-05 15:23:30,214 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:30,407 ledfx.devices INFO Device MOON: Resolved destination to 192.168.0.57 2026-04-05 15:23:30,408 ledfx.utils INFO WLED 192.168.0.57: Attempting to contact device... 2026-04-05 15:23:30,448 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.57 configuration received 2026-04-05 15:23:30,448 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:30,553 ledfx.devices INFO Device Dragon2: Resolved destination to 192.168.0.219 2026-04-05 15:23:30,553 ledfx.utils INFO WLED 192.168.0.219: Attempting to contact device... 2026-04-05 15:23:30,582 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.219 configuration received 2026-04-05 15:23:30,582 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:30,675 ledfx.devices INFO Device Dragon 3: Resolved destination to 192.168.0.149 2026-04-05 15:23:30,676 ledfx.utils INFO WLED 192.168.0.149: Attempting to contact device... 2026-04-05 15:23:30,707 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.149 configuration received 2026-04-05 15:23:30,707 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:30,775 ledfx.devices INFO Device Stage: Resolved destination to 192.168.0.209 2026-04-05 15:23:30,775 ledfx.utils INFO WLED 192.168.0.209: Attempting to contact device... 2026-04-05 15:23:30,830 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.209 configuration received 2026-04-05 15:23:30,830 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:30,940 ledfx.devices INFO Device Panel: Resolved destination to 192.168.0.55 2026-04-05 15:23:30,940 ledfx.utils INFO WLED 192.168.0.55: Attempting to contact device... 2026-04-05 15:23:30,992 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.55 configuration received 2026-04-05 15:23:30,992 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:31,088 ledfx.devices INFO Device Ceiling: Resolved destination to 192.168.0.183 2026-04-05 15:23:31,088 ledfx.utils INFO WLED 192.168.0.183: Attempting to contact device... 2026-04-05 15:23:31,130 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.183 configuration received 2026-04-05 15:23:31,130 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:31,336 ledfx.devices INFO Device House: Resolved destination to 192.168.0.8 2026-04-05 15:23:31,336 ledfx.utils INFO WLED 192.168.0.8: Attempting to contact device... 2026-04-05 15:23:31,367 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.8 configuration received 2026-04-05 15:23:31,368 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2603250 2026-04-05 15:23:32,659 ledfx.devices INFO Device Dragon1: Resolved destination to 192.168.0.116 2026-04-05 15:23:32,659 ledfx.utils INFO WLED 192.168.0.116: Attempting to contact device... 2026-04-05 15:23:32,716 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.116 configuration received 2026-04-05 15:23:32,717 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:32,861 ledfx.devices INFO Device Headset: Resolved destination to 192.168.0.46 2026-04-05 15:23:32,861 ledfx.utils INFO WLED 192.168.0.46: Attempting to contact device... 2026-04-05 15:23:32,922 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.46 configuration received 2026-04-05 15:23:32,922 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2508020 2026-04-05 15:23:33,293 ledfx.devices INFO Device SullySSignS: Resolved destination to 192.168.0.94 2026-04-05 15:23:33,293 ledfx.utils INFO WLED 192.168.0.94: Attempting to contact device... 2026-04-05 15:23:33,341 ledfx.utils INFO WLED compatible device brand:WLED at 192.168.0.94 configuration received 2026-04-05 15:23:33,341 ledfx.devices.wled INFO WLED Build Supports Sync Setting API: 2603310 2026-04-05 15:23:33,590 ledfx.virtuals INFO ------------------------------------------------------------------------------- 2026-04-05 15:23:33,591 ledfx.virtuals INFO Virtual is_device Active Streaming 2026-04-05 15:23:33,591 ledfx.virtuals INFO ------------------------------------------------------------------------------- 2026-04-05 15:23:33,591 ledfx.virtuals INFO panel panel False False
2026-04-05 15:23:33,591 ledfx.virtuals INFO Active Devices: set() 2026-04-05 15:23:33,594 ledfx.virtuals INFO Panel fallback_clear: suppress = False 2026-04-05 15:23:33,594 ledfx.effects.audio INFO Activating AudioReactiveEffect. 2026-04-05 15:23:33,594 ledfx.effects INFO Effect Equalizer2d activated. 2026-04-05 15:23:33,598 ledfx.effects.audio INFO Loopback device detected: Speakers (Realtek High Definition Audio) [Loopback] with 2 channels 2026-04-05 15:23:33,618 ledfx.effects.audio INFO Audio source opened: Windows WASAPI: Speakers (Realtek High Definition Audio) [Loopback] 2026-04-05 15:23:33,618 ledfx.effects.audio ERROR Error starting stream: Unanticipated host error [PaErrorCode -9999]: 'GetNameFromCategory: usbTerminalGUID = 7D1E ' [Windows WDM-KS error -9999], Reverting to default input device 2026-04-05 15:23:33,628 ledfx.effects.audio INFO Loopback device detected: Speakers (Realtek High Definition Audio) [Loopback] with 2 channels 2026-04-05 15:23:33,636 ledfx.effects.audio INFO Audio source opened: Windows WASAPI: Speakers (Realtek High Definition Audio) [Loopback] 2026-04-05 15:23:33,636 ledfx.core ERROR Exception in core event loop: Task exception was never retrieved

LedFx Host Information (please complete the following information):

  • OS: [WIN 11]
  • Installation Method: [Windows EXE setup package]
  • LedFx-2.1.6-win-x64-setup.zip
  • LedFx Version: [LedFx 2.1.6]

If you get time, check out my command center for WLED and LEDFX and much more. Even has a Spectrum Analyzer built in. https://github.com/PPPAnimal/WLEDCC/releases

Image

Thanks for you time looking into this. Awesome software bud. [email protected]

PPPAnimal avatar Apr 06 '26 00:04 PPPAnimal

Can you share your config.json that breaks please?

bigredfrog avatar Apr 06 '26 00:04 bigredfrog

Likely difficult to reproduce, looks like related to audio handling on fallback.

We have churned audio hotplu behaviour. But we can't see for sure from the above:-(

bigredfrog avatar Apr 06 '26 00:04 bigredfrog

This is the one i am using now that works in 2.1.5

On Sun, Apr 5, 2026 at 8:38 PM bigredfrog @.***> wrote:

bigredfrog left a comment (LedFx/LedFx#1759) https://github.com/LedFx/LedFx/issues/1759#issuecomment-4189828396

Can you share your config.json that breaks please?

— Reply to this email directly, view it on GitHub https://github.com/LedFx/LedFx/issues/1759#issuecomment-4189828396, or unsubscribe https://github.com/notifications/unsubscribe-auth/BI5VGZ25NEQKPIR4WLDBMHD4UL4ADAVCNFSM6AAAAACXNSH4DGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOBZHAZDQMZZGY . You are receiving this because you authored the thread.Message ID: @.***>

PPPAnimal avatar Apr 06 '26 00:04 PPPAnimal

Odd that it works when you hack around it until the next session start. I haven't completed rework for the startup audio hardening, so that should not of mutated much.

I might have to get some diagnostic builds together for you :-/

bigredfrog avatar Apr 06 '26 00:04 bigredfrog

willing to help out any way i can bud.

PPPAnimal avatar Apr 06 '26 00:04 PPPAnimal

Appreciated, will scratch around...

bigredfrog avatar Apr 06 '26 00:04 bigredfrog

Image

PPPAnimal avatar Apr 06 '26 00:04 PPPAnimal

We have the log that shows what audio device breaks critically for you on 2.1.6

Can you get a log of the successful case on 2.1.5

I want to see if what actually is activated and good is different.

bigredfrog avatar Apr 06 '26 00:04 bigredfrog

ledfx.log

PPPAnimal avatar Apr 06 '26 00:04 PPPAnimal

Also kinda odd that i reverted back to version 2.1.5 yet it reports that it is still at version 2.1.6. the about page in UI shows 2.1.5

PPPAnimal avatar Apr 06 '26 01:04 PPPAnimal

This is what my program does to find latest version.

def check_ledfx_updates(self): try: resp = requests.get(LEDFX_RELEASES_URL, timeout=10).json() self.ledfx_latest_ver = resp.get("tag_name", "").replace("v", "") path_missing = not self.ledfx_path or not os.path.exists(self.ledfx_path) needs_update = self.ledfx_latest_ver != self.ledfx_current_ver if needs_update and not path_missing: self.log(f"LedFx: installed v{self.ledfx_current_ver} → update available v{self.ledfx_latest_ver}", color="yellow700") for _u in self._ledfx_update_btns: _u.text = "UPDATE LEDFX"; _u.visible = True self.page.update() else: if path_missing: self.log(f"LedFx: No path saved (latest: v{self.ledfx_latest_ver}) — use START LEDFX button, it will auto search path, prompt to install or browse to path") else: self.log(f"LedFx: v{self.ledfx_current_ver} (up to date)") except: pass

PPPAnimal avatar Apr 06 '26 01:04 PPPAnimal

Shift + f5 to force reload of front end in browser

bigredfrog avatar Apr 06 '26 01:04 bigredfrog

It looks like it is trying your saved device, failing badly and then falling back to the most obvious audio device, which happens to be the same as you saved device.

The fallback is not protected with a try, so whereas the first failure gracefully fell back, the fallback explodes :-(

Now why that is failing in normal startup from the config, but works when you get to select it from the user interface I don't know.

Also why it works in 2.1.5 but not in 2.1.6 I also don't know right now.

No matter what our fallback should gracefully fail, giving you a chance to go select audio again rather than going bang.

Then we need to work out those other two questions.

It might be a startup race condition of some form, though seems odd.

Can we get a log of 2.1.5 startup through to effects running please?

bigredfrog avatar Apr 06 '26 03:04 bigredfrog

Builds here should contain a first stage fix that addresses the bad fallback behaviour.

PLEASE WAIT FOR BETTER DEBUG BUILD BELOW

If you can get a -vv log of opening your 2.1.5 working config with that build. It should not crash on startup, however, I expect audio to not be working, so you would then need to select your audio again under settings.

If audio then works right through to effects, it will be a very interesting log!

I think this issue is in the area that I was actually going to work on next, hardening the behavior of audio on startup, but this particular path was not on my radar, I was more concerned with churn in indexes from hotplugging. Its handled better now in runtime, but startup does not have the same name matching protection.

Still I cannot work out why 2.1.5 would be good, but 2.1.6 bad.

So this will be good discovery, thanks for your help!

bigredfrog avatar Apr 06 '26 04:04 bigredfrog

Actually I am going to make a build with a little more debug, please hold...

bigredfrog avatar Apr 06 '26 04:04 bigredfrog

You awesome dude. Thanks for jumping into this right away. I have a couple other things i would like to chat about but think you would likely rather i start a new issue on them to keep chats focused. I will do that now.

PPPAnimal avatar Apr 06 '26 04:04 PPPAnimal

Builds will be here

https://github.com/bigredfrog/LedFx/actions/runs/24018999326

I have upped the debug a little around the audio path.

If you can delete the ledfx.log before launching this version

Then launch this version with -vv for verbose logging.

Hopefully it does not crash when consuming your preexisting config.json this time

I expect that audio will not be working

Then enable audio in the settings / audio selector.

If audio is then working, that will be an interesting log.

So I haven't fixed anything except for the initial hard crash scenario, but we will have better debug.

Thanks again for the help.

bigredfrog avatar Apr 06 '26 04:04 bigredfrog

How many speakers do you have? Is it stereo or 5.1 or something?

bigredfrog avatar Apr 06 '26 04:04 bigredfrog

I don't have a smoking gun, but I did introduce the hotplug monitoring in 2.1.6

I might need to stage it to wait a while before starting.

Lets get logs off the build above first, then I will spam a bunch of debug around all of the richer audio behaviour.

bigredfrog avatar Apr 06 '26 04:04 bigredfrog

Discord would be much easier.

https://discord.gg/n4nKk2kvx7

Just post in #dev_chat when you can and mention this issue.

bigredfrog avatar Apr 06 '26 04:04 bigredfrog