423 lines
7.7 KiB
Markdown
423 lines
7.7 KiB
Markdown
# 🖥️ Kiosk-Modus Setup für Ubuntu Boot-Server
|
|
|
|
Diese Anleitung zeigt, wie du das boWave Dashboard im Vollbild-Kiosk-Modus auf einem Ubuntu-Server (z.B. Raspberry Pi oder Mini-PC) auf dem Boot einrichtest.
|
|
|
|
---
|
|
|
|
## Ziel-Setup
|
|
|
|
- **Hardware:** Ubuntu Server (ARM64 oder x86_64)
|
|
- **Display:** Touchscreen oder Monitor
|
|
- **Modus:** Chromium im Kiosk-Modus (Vollbild, keine Browser-UI)
|
|
- **Autostart:** System startet direkt ins Dashboard
|
|
- **Audio:** ALSA-Output zu echten Lautsprechern in 4 Zonen
|
|
|
|
---
|
|
|
|
## 1. Ubuntu Server Vorbereitung
|
|
|
|
### System Update
|
|
|
|
```bash
|
|
sudo apt update && sudo apt upgrade -y
|
|
```
|
|
|
|
### Docker installieren
|
|
|
|
```bash
|
|
curl -fsSL https://get.docker.com -o get-docker.sh
|
|
sudo sh get-docker.sh
|
|
sudo usermod -aG docker $USER
|
|
```
|
|
|
|
**Nach Docker-Installation ausloggen und wieder einloggen!**
|
|
|
|
### X Server für GUI (falls Server-Edition ohne Desktop)
|
|
|
|
```bash
|
|
sudo apt install -y \
|
|
xorg \
|
|
openbox \
|
|
chromium-browser \
|
|
unclutter \
|
|
pulseaudio
|
|
```
|
|
|
|
---
|
|
|
|
## 2. Repository Setup
|
|
|
|
### Code auf den Boot-Server kopieren
|
|
|
|
```bash
|
|
cd /opt
|
|
sudo git clone https://github.com/YOUR_USERNAME/boWave.git
|
|
sudo chown -R $USER:$USER /opt/boWave
|
|
cd /opt/boWave
|
|
```
|
|
|
|
### .env Datei anpassen
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
nano .env
|
|
```
|
|
|
|
**Wichtige Einstellungen:**
|
|
```bash
|
|
SPOTIFY_NAME=Yacht_Bordanlage
|
|
BOAT_NAME=My Yacht
|
|
MUSIC_PATH=/media/usb/music # USB-Stick mit Musik
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Audio Hardware Konfiguration
|
|
|
|
### ALSA Audio-Karten identifizieren
|
|
|
|
```bash
|
|
aplay -l
|
|
```
|
|
|
|
**Output Beispiel:**
|
|
```
|
|
card 0: Headphones [bcm2835 Headphones], device 0
|
|
card 1: USB [USB Audio Device], device 0
|
|
card 2: USB2 [USB Audio Device 2], device 0
|
|
```
|
|
|
|
### Zonen zu Hardware mappen
|
|
|
|
In `docker-compose.yml` die Zonen-Konfiguration anpassen:
|
|
|
|
```yaml
|
|
zone-salon:
|
|
build: ./docker/snapclient
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- snapserver
|
|
command: ["--hostID", "zone-salon", "--player", "alsa", "--soundcard", "hw:0,0"]
|
|
devices:
|
|
- /dev/snd:/dev/snd
|
|
networks:
|
|
- bordanlage
|
|
|
|
zone-cockpit:
|
|
# ... gleiches Schema mit hw:1,0 usw.
|
|
command: ["--hostID", "zone-cockpit", "--player", "alsa", "--soundcard", "hw:1,0"]
|
|
devices:
|
|
- /dev/snd:/dev/snd
|
|
```
|
|
|
|
**Mapping:**
|
|
- `hw:0,0` → Salon Lautsprecher
|
|
- `hw:1,0` → Cockpit Lautsprecher
|
|
- `hw:2,0` → Bug Lautsprecher
|
|
- `hw:3,0` → Heck Lautsprecher
|
|
|
|
---
|
|
|
|
## 4. NMEA Hardware (GPS, Sensoren)
|
|
|
|
### USB-Serial Geräte finden
|
|
|
|
```bash
|
|
ls -l /dev/ttyUSB* /dev/ttyACM*
|
|
```
|
|
|
|
### In docker-compose.yml aktivieren
|
|
|
|
```yaml
|
|
signalk:
|
|
image: signalk/signalk-server:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- signalk-data:/home/node/.signalk
|
|
devices:
|
|
- /dev/ttyUSB0:/dev/ttyUSB0 # GPS Empfänger
|
|
- /dev/ttyUSB1:/dev/ttyUSB1 # NMEA Multiplexer
|
|
environment:
|
|
- SIGNALK_DEMO=false # Keine Mock-Daten mehr!
|
|
networks:
|
|
- bordanlage
|
|
```
|
|
|
|
**SignalK konfigurieren:**
|
|
1. Dashboard starten: `make boot`
|
|
2. Browser: `http://<boat-ip>:3000`
|
|
3. Login: `admin` / `bordanlage`
|
|
4. Connections → Add → NMEA 0183/2000 Serial
|
|
5. Device: `/dev/ttyUSB0`, Baudrate: `4800` (Standard) oder `38400`
|
|
|
|
---
|
|
|
|
## 5. Kiosk-Modus Autostart
|
|
|
|
### Openbox Autostart konfigurieren
|
|
|
|
```bash
|
|
mkdir -p ~/.config/openbox
|
|
nano ~/.config/openbox/autostart
|
|
```
|
|
|
|
**Inhalt:**
|
|
```bash
|
|
#!/bin/bash
|
|
|
|
# Bildschirmschoner deaktivieren
|
|
xset s off
|
|
xset -dpms
|
|
xset s noblank
|
|
|
|
# Mauszeiger verstecken nach 5 Sekunden Inaktivität
|
|
unclutter -idle 5 &
|
|
|
|
# Docker Services starten
|
|
cd /opt/boWave && docker compose up -d
|
|
|
|
# Warte bis Dashboard bereit ist
|
|
sleep 30
|
|
|
|
# Chromium im Kiosk-Modus starten
|
|
chromium-browser \
|
|
--kiosk \
|
|
--noerrdialogs \
|
|
--disable-infobars \
|
|
--disable-session-crashed-bubble \
|
|
--disable-restore-session-state \
|
|
--disable-features=TranslateUI \
|
|
--no-first-run \
|
|
--fast-start \
|
|
--disable-pinch \
|
|
--overscroll-history-navigation=0 \
|
|
http://localhost:8080
|
|
```
|
|
|
|
**Ausführbar machen:**
|
|
```bash
|
|
chmod +x ~/.config/openbox/autostart
|
|
```
|
|
|
|
### X Server beim Boot starten
|
|
|
|
```bash
|
|
sudo nano /etc/systemd/system/kiosk.service
|
|
```
|
|
|
|
**Inhalt:**
|
|
```ini
|
|
[Unit]
|
|
Description=Boat Dashboard Kiosk
|
|
After=network.target docker.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=pi
|
|
Environment=DISPLAY=:0
|
|
ExecStart=/usr/bin/startx /usr/bin/openbox-session
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
```
|
|
|
|
**Service aktivieren:**
|
|
```bash
|
|
sudo systemctl daemon-reload
|
|
sudo systemctl enable kiosk.service
|
|
sudo systemctl start kiosk.service
|
|
```
|
|
|
|
---
|
|
|
|
## 6. Touchscreen Kalibrierung (optional)
|
|
|
|
### Touchscreen-Support installieren
|
|
|
|
```bash
|
|
sudo apt install -y xinput-calibrator
|
|
```
|
|
|
|
### Kalibrierung durchführen
|
|
|
|
```bash
|
|
DISPLAY=:0 xinput_calibrator
|
|
```
|
|
|
|
Folge den Anweisungen und speichere die Kalibrierungsdaten in:
|
|
|
|
```bash
|
|
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
|
|
```
|
|
|
|
---
|
|
|
|
## 7. Netzwerk-Discovery für Spotify/AirPlay
|
|
|
|
### docker-compose.yml anpassen
|
|
|
|
Für Spotify Connect und AirPlay benötigt man `network_mode: host`:
|
|
|
|
```yaml
|
|
librespot:
|
|
build: ./docker/librespot
|
|
restart: unless-stopped
|
|
network_mode: host # Wichtig für mDNS/Zeroconf Discovery!
|
|
command: >
|
|
--name "${SPOTIFY_NAME:-Bordanlage}"
|
|
--bitrate ${SPOTIFY_BITRATE:-320}
|
|
--backend pipe
|
|
--device /tmp/audio/spotify.pcm
|
|
volumes:
|
|
- pipes:/tmp/audio
|
|
|
|
shairport:
|
|
image: mikebrady/shairport-sync:latest
|
|
restart: unless-stopped
|
|
network_mode: host # Wichtig für AirPlay Discovery!
|
|
volumes:
|
|
- ./config/shairport.conf:/etc/shairport-sync.conf:ro
|
|
- pipes:/tmp/audio
|
|
```
|
|
|
|
**Hinweis:** Bei `network_mode: host` fallen die `ports:` Mappings weg.
|
|
|
|
---
|
|
|
|
## 8. Production Build starten
|
|
|
|
### Services im Production Mode starten
|
|
|
|
```bash
|
|
cd /opt/boWave
|
|
docker compose up -d
|
|
```
|
|
|
|
**Unterschiede zu Dev-Mode:**
|
|
- Dashboard wird als optimiertes Bundle gebaut (nginx)
|
|
- Port 8080 (statt 8090 dev server)
|
|
- Kein HMR/Live-Reload
|
|
- Echte Audio-Hardware (ALSA)
|
|
- Echter NMEA Input (kein Demo-Mode)
|
|
|
|
---
|
|
|
|
## 9. System-Monitoring
|
|
|
|
### Logs ansehen
|
|
|
|
```bash
|
|
docker compose logs -f dashboard
|
|
docker compose logs -f snapserver
|
|
docker compose logs -f signalk
|
|
```
|
|
|
|
### Container Status
|
|
|
|
```bash
|
|
docker compose ps
|
|
```
|
|
|
|
### System neu starten
|
|
|
|
```bash
|
|
sudo reboot
|
|
```
|
|
|
|
Das Dashboard sollte automatisch nach ~30 Sekunden im Vollbild erscheinen.
|
|
|
|
---
|
|
|
|
## 10. Wartung & Updates
|
|
|
|
### Code aktualisieren
|
|
|
|
```bash
|
|
cd /opt/boWave
|
|
git pull
|
|
docker compose down
|
|
docker compose build --no-cache
|
|
docker compose up -d
|
|
```
|
|
|
|
### Backup der Konfiguration
|
|
|
|
```bash
|
|
# SignalK Daten sichern
|
|
docker run --rm -v boWave_signalk-data:/data -v $(pwd):/backup \
|
|
alpine tar czf /backup/signalk-backup.tar.gz -C /data .
|
|
|
|
# Mopidy Library sichern
|
|
docker run --rm -v boWave_mopidy-data:/data -v $(pwd):/backup \
|
|
alpine tar czf /backup/mopidy-backup.tar.gz -C /data .
|
|
```
|
|
|
|
---
|
|
|
|
## Troubleshooting
|
|
|
|
### Dashboard zeigt nicht im Vollbild
|
|
|
|
```bash
|
|
# Prüfe ob X Server läuft
|
|
ps aux | grep X
|
|
|
|
# Prüfe Kiosk Service
|
|
sudo systemctl status kiosk.service
|
|
sudo journalctl -u kiosk.service -f
|
|
```
|
|
|
|
### Audio funktioniert nicht
|
|
|
|
```bash
|
|
# Prüfe ALSA Devices
|
|
aplay -l
|
|
|
|
# Teste Audio direkt
|
|
aplay /usr/share/sounds/alsa/Front_Center.wav
|
|
|
|
# Prüfe Snapclient Logs
|
|
docker compose logs zone-salon
|
|
```
|
|
|
|
### Spotify wird nicht gefunden
|
|
|
|
```bash
|
|
# Prüfe ob network_mode: host gesetzt ist
|
|
docker compose config | grep network_mode
|
|
|
|
# Prüfe librespot Logs
|
|
docker compose logs librespot
|
|
```
|
|
|
|
### SignalK zeigt keine Daten
|
|
|
|
```bash
|
|
# Prüfe ob SIGNALK_DEMO=false
|
|
docker compose config | grep SIGNALK_DEMO
|
|
|
|
# Prüfe Serial Device
|
|
ls -l /dev/ttyUSB*
|
|
|
|
# SignalK Logs
|
|
docker compose logs signalk
|
|
```
|
|
|
|
---
|
|
|
|
## Fertig! 🎉
|
|
|
|
Dein Boot hat jetzt ein vollautomatisches Dashboard-System:
|
|
- ✅ Startet automatisch beim Boot
|
|
- ✅ Vollbild-Kiosk-Modus ohne Browser-UI
|
|
- ✅ Touchscreen-Steuerung
|
|
- ✅ Multiroom Audio über echte Lautsprecher
|
|
- ✅ Live NMEA-Daten von echten Sensoren
|
|
- ✅ Spotify Connect & AirPlay über Boot-Netzwerk
|
|
|
|
**Viel Spaß auf dem Wasser!** ⛵🌊
|