Commit Graph
10 Commits
Author SHA1 Message Date
christianandClaude Opus 5 086b21dc2b feat: Zentrale per Durchwahl selbst besetzen
Das Busylight im Empfangsbereich wird wechselnd besetzt. Mitarbeiter
koennen sich jetzt selbst darauf setzen, ohne Admin-Passwort.

- Neue Seite /zentrale (Durchwahl eingeben) und /zentrale/{durchwahl}
  als Direktlink fuer QR-Codes. Der Direktlink zeigt nur an und aendert
  nichts, damit Link-Vorschau und Prefetch niemanden versetzen.
- Neue Tabelle home_assignments merkt das eigene Tuerschild, solange der
  Mitarbeiter in der Zentrale sitzt. Beim Verlassen wird es
  wiederhergestellt, das Zentral-Segment wird freigegeben.
- Der Vorgaenger bleibt ohne Zuordnung - er ist nicht da. Sein gemerkter
  Heimatplatz bleibt erhalten, er kann jederzeit zurueckkehren.
- Ist der Heimatplatz inzwischen belegt, wird die Rueckkehr abgelehnt
  und nichts geaendert.
- Eine ausdrueckliche Admin-Zuordnung verwirft den gemerkten Heimatplatz.
  Ein reines Loeschen der Zuordnung nicht, sonst kaeme niemand mehr von
  der Zentrale zurueck.
- Farbe wird sofort ans Geraet geschickt (scheduler.push_user_light).
  Das Polling allein reicht nicht: _process_user sendet nur bei einer
  Statusaenderung, und beim Platzwechsel bleibt der Status gleich.
- Neue Settings selfservice_device_id und selfservice_segment,
  einstellbar unter Einstellungen.
- Jeder Wechsel landet im Protokoll (zentrale / zentrale_frei).

Die Durchwahl ist eine Kennung, kein Geheimnis - im README dokumentiert.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 08:12:42 +00:00
christianandClaude Opus 4.6 0d080ff885 refactor: AIDA -> modulare Zeiterfassung
- Alle AIDA-Referenzen durch generische Begriffe ersetzt
  (aida -> attendance im Code, "Zeiterfassung" im UI)
- DB-Spalten: last_aida_status -> last_attendance_status
- Settings: aida_csv_path -> attendance_csv_path
- REST API fuer Zeiterfassung auf Port 8081:
  POST /api/attendance/{personal_nr} mit {"status": "anwesend"}
  GET  /api/attendance - alle Status abfragen
- Automatische DB-Migration fuer bestehende Installationen
- CSV bleibt als Option, API als Echtzeit-Alternative

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-03 10:28:45 +02:00
christian 5294e8ef50 fix: keep MAC, version, LEDs in DB when device goes offline 2026-04-24 13:35:41 +02:00
christianandClaude Opus 4.6 9716dfd9bb feat: show WLED MAC address on Tuerschilder page
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-24 11:36:45 +02:00
christianandClaude Opus 4.6 7f2858aab6 feat: phone webhook integration (callstart/callend on port 8081)
- New webhook server on port 8081 for phone system (PBX)
- Endpoints: GET/POST /{extension}/callstart and /{extension}/callend
- New 'phone_extension' field on users (Durchwahl)
- Only activates when user is anwesend or homeoffice (AIDA)
- Sets WLED to phone_active color (red) on callstart
- Restores previous Teams/AIDA color on callend
- Polling skips WLED update while phone is active
- Dashboard shows phone badge when user is in a call
- New color rule 'phone_active' (configurable via web UI)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 23:15:51 +02:00
christianandClaude Opus 4.6 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
christianandClaude Opus 4.6 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
christianandClaude Opus 4.6 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
christianandClaude Opus 4.6 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
christianandClaude Opus 4.6 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