When the user enables "Start with Windows" in the installer, the app
launches on every PC login. Previously each login popped a fresh WebUI
tab, which is noisy for a tray-resident background service.
The autostart shortcut now passes --autostart to start-hidden.vbs, which
sets LEDGRAB_AUTOSTART=1 in the child env. __main__ checks this flag
alongside LEDGRAB_RESTART when deciding whether to open the browser.
Manual launches (desktop/start-menu shortcuts) and the installer's
post-install "Launch LedGrab" finish-page action are unchanged — they
don't pass the arg, so they still open the WebUI tab.
Three separate bugs in the VBS launcher wedged together:
1. The previous fix added a UTF-8 em-dash in a comment. wscript.exe
on Windows refused to execute the file with "Execution of the
Windows Script Host failed. (Not enough memory resources are
available to complete this operation.)" — a misleading error that
actually means "I could not parse this file as ANSI VBScript".
Fix: keep the file pure ASCII, convert to CRLF.
2. The launcher was invoking pythonw.exe. WshShell.Run spawning
pythonw.exe inside the wscript host exited immediately (no process,
no log). python.exe with WindowStyle=0 works reliably and matches
the pattern used by the Media Server sibling app's VBS launcher,
which has been running on this machine without issue.
3. The env vars (PYTHONPATH, WLED_CONFIG_PATH) must be set before the
child process spawns, otherwise config.py falls back to the CWD
default path that does not exist at install time.
The VBS launcher (used by Start Menu, desktop, and autostart shortcuts
created by the NSIS installer) ran pythonw.exe without setting any env
vars. LedGrab.bat sets PYTHONPATH and WLED_CONFIG_PATH; the VBS did not.
With CWD set to the install root, config.py fell through to its default
lookup (./config/default_config.yaml), which does not exist there — the
real file is at app/config/default_config.yaml. The server silently ran
with built-in defaults on every shortcut launch: no devices, wrong data
dir, nothing persisted where the user expected.
The fix uses WshShell.Environment("Process") to set env vars on the
current VBS process, which child processes spawned via .Run inherit.
Kept CurrentDirectory = appRoot to preserve prior behavior for anyone
depending on CWD-relative paths inside the app.
Add pystray-based system tray icon with Open UI / Restart / Quit
actions. Add __main__.py for `python -m wled_controller` support.
Update start-hidden.vbs with embedded Python fallback for both
installed and dev environments.
- Add DDP client for LED strips >500 LEDs (UDP port 4048), with automatic
fallback from HTTP JSON API when LED count exceeds limit
- Wrap blocking operations (screen capture, image processing) in
asyncio.to_thread() to prevent event loop starvation
- Turn on WLED device and enable live mode when starting DDP streaming
- Add LED strip offset field to calibration (rotates color array to match
physical LED position vs start corner)
- Add server management scripts (start, stop, restart, background start)
- Fix WebUI auth error handling and auto-refresh loop
- Add development API key to default config
- Add i18n translations for offset field (en/ru)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>