17 Commits

Author SHA1 Message Date
47210cb068 feat: add per-device check button on WLED devices page
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 23:06:39 +02:00
e88ab3ab08 feat: background device status check every 240s instead of on page load
- Add online, leds, version, last_check columns to wled_devices table
- Background job checks all WLED devices every 4 minutes
- Initial check on startup
- Devices page reads status from DB (instant page load)
- 'Alle jetzt pruefen' button triggers manual check

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 23:03:12 +02:00
a7efb12d5c fix: robust AIDA CSV parsing (handle ~~ vs ~ prefix, comma separator)
CSV format is '~~00341~~,~~0~~' or '~00341~~,~~0~~'.
Strip tildes and compare bare numbers instead of relying on
startswith/endswith which breaks with inconsistent tilde counts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 22:51:56 +02:00
5e9af4e268 feat: show AIDA + Teams status badges in dashboard, keep original WLED logic
- WLED only controlled when AIDA status is known (original behavior:
  abwesend->off, homeoffice->yellow, anwesend->Teams color)
- Teams presence always queried and stored for dashboard display
- Dashboard shows colored badges for both AIDA and Teams status
- Works without AIDA CSV (Teams status still visible in dashboard)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 22:23:22 +02:00
8d178eac6d feat: poll Teams presence independently of AIDA CSV
- Teams status is now always queried, even without AIDA CSV
- Users without personal_nr are also polled (Teams-only mode)
- If AIDA is unavailable, default to 'anwesend' and use Teams color
- Dashboard will now show Teams status even without SMB mount

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 22:14:43 +02:00
ce19dec8c1 docs: rewrite README with Azure setup guide and troubleshooting
Also improve dashboard to show 'Warte auf Status...' instead of
gray bars when user is assigned but no polling result exists yet.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 22:11:57 +02:00
4e659000f7 fix: pass authenticated status to all pages via _ctx helper
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:58:27 +02:00
1bf42250b4 feat: add WLED device status check (online/offline, LEDs, version)
- Query WLED JSON API (/json/info) for device info
- Show online/offline status dot, LED count and firmware version
- Auto-check all devices on page load
- Button to manually check individual or all devices
- Fix hostname placeholder to volksheimstaette.de

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:57:07 +02:00
bc96fed884 fix: correct TemplateResponse arg order (request, name, context)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:48:24 +02:00
2f553295cb fix: TemplateResponse for Starlette 1.0 (request as keyword arg)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:46:39 +02:00
6f52c43aca fix: use keyword args for TemplateResponse (Starlette 0.40+ compat)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:45:13 +02:00
40c9607598 fix: clear old auth record before device code flow to force fresh login
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:22:03 +02:00
dd9e2f4acd fix: use allow_unencrypted_storage for headless Linux token cache
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:15:16 +02:00
3ddb3ce8c4 fix: pin msgraph-core to <1.0.0 (v1.x broke GraphClient API)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:13:21 +02:00
63d8ee3e99 fix: use cp1252 encoding for config.cfg (Windows umlauts)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:11:19 +02:00
a41849ff7d docs: add README with installation and usage instructions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 20:49:59 +02:00
5267baf0b4 feat: rewrite busylight as FastAPI web application with SQLite
Replace the standalone Python script + config.cfg with a full web
application featuring:
- FastAPI backend with REST API
- SQLite database (config, state, activity log separated)
- Bootstrap 5 web interface for configuration
- Pages: Dashboard, Users, Devices, Assignments, Color Rules, Settings, Log
- APScheduler background polling for Teams presence + AIDA status
- systemd service file for Linux deployment
- Migration script to import existing config.cfg data

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 20:46:33 +02:00