Commit Graph

5 Commits

Author SHA1 Message Date
Julian Vollmer 00cf83b04e Fix WiFi connect: add polkit rule for NetworkManager + hostname in /etc/hosts
The Flask service runs as user 'pi' in a non-interactive session.
nmcli device wifi connect requires polkit authorization which was missing,
causing 'Not authorized to control networking' errors.

- config/50-babycam-network.rules: grants pi full NetworkManager access via polkit
- setup.sh: installs polkit rule, restarts polkit, fixes /etc/hosts hostname entry
  (missing 127.0.1.1 entry caused harmless but annoying sudo warnings)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 17:15:49 +02:00
Julian Vollmer a53eceb83a Add audio streaming via USB microphone
- Neuer Endpunkt GET /audio: ffmpeg liest von plughw:2,0 (USB-Soundkarte CM108)
  und streamt Ogg/Opus mit 16kHz Mono 24kbps
- live.html: Ton-Button (🔇/🔊) startet/stoppt Audio-Stream on demand
- setup.sh: ffmpeg installieren, pi zur audio-Gruppe hinzufügen
- pi zur audio-Gruppe hinzugefügt (war nötig für /dev/snd Zugriff)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 18:15:21 +02:00
Julian Vollmer 6f0aa41f9e Fix camera access: add pi to video group
rpicam benötigt Zugriff auf /dev/dma_heap/ (crw-rw---- root:video).
pi war nicht in der video-Gruppe → usermod -aG video pi in setup.sh ergänzt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 16:45:52 +02:00
Julian Vollmer 30180e5923 Persist AP override across reboots
/tmp/babycam-ap-override → /var/lib/babycam/ap-override
setup.sh legt /var/lib/babycam mit chown pi:pi an

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 15:58:14 +02:00
Julian Vollmer ef858f9040 Add complete babycam setup: install script, Flask app, state machine, configs
- setup.sh: vollständiges Install- und Konfigurationsscript für Raspberry Pi OS Trixie
- app/main.py: Flask Webinterface mit MJPEG-Stream, WLAN-Verwaltung und Statusseite
- app/templates/index.html: Dark-Mode UI mit Live-Stream, WLAN-Scan und Verbinden
- scripts/network_state.py: State Machine für Modus A (Heimnetz) / B (Access Point)
- config/hostapd.conf: Access Point BabyCam (192.168.50.0/24)
- config/dnsmasq.conf: DHCP-Server für AP-Netzwerk
- systemd/: babycam-web und babycam-network als autostart Services
- README.md: Schnellstart-Anleitung und Projektstruktur ergänzt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 14:38:26 +02:00