Skip to content

Latest commit

 

History

History
81 lines (47 loc) · 2.01 KB

File metadata and controls

81 lines (47 loc) · 2.01 KB

HTTP-API

Basis-URL Rotlicht: http://<device-ip>:80/
Kamera-Stream: http://<device-ip>:81/ (ESP32-P4)

Alle Anfragen sind GET. Der Token ist Pflicht.

Authentifizierung

Query-Parameter token muss der Geräte-Konfiguration entsprechen:

Plattform Token-Konfiguration
Arduino API_TOKEN in firmware/RecLightEthernet/config.h
ESP32-S3 (Referenz) firmware/RecLightEsp32/config.h
ESP32-P4 (Produktion) menuconfig → RecLight Configuration → HTTP API token
  • Fehlt oder falsch → 401 Unauthorized ({"error":"unauthorized"})

Endpunkte

GET /light/on?token=…

Schaltet die LED ein.

Antwort 200: {"on":true}

GET /light/off?token=…

Schaltet die LED aus.

Antwort 200: {"on":false}

GET /status?token=…

Liefert den aktuellen Zustand.

Antwort 200: {"on":true} oder {"on":false}

GET /health?token=…

Einfacher Erreichbarkeitstest.

Antwort 200: {"ok":true}

Kamera-Stream (ESP32-P4)

Gerät: Waveshare ESP32-P4-WIFI6-POE-ETH-C, Sensor OV5647 (MIPI-CSI).

Basis-URL: http://<device-ip>:81/

GET /stream?token=…

MJPEG-Livestream für Dirigenten-Preview.

Antwort 200: multipart/x-mixed-replace mit JPEG-Frames
Antwort 401: {"error":"unauthorized"}

Hinweis: Chrome rendert MJPEG-Streams oft nicht; Firefox oder VLC verwenden.

curl -v --max-time 3 "http://192.168.2.50:81/stream?token=your-secret" | head -20

Multi-Client

Mehrere Clients (Windows, Mac, Browser) können dieselbe API nutzen. Das Gerät speichert den letzten Schaltzustand. Es gibt keine Sitzungen.

  • Automatik / suppressAuto existiert nur in der Windows-App, nicht auf dem Gerät.
  • Während einer Sequoia-Aufnahme: „Aus trotz Record“ nur über die Windows-App.

AVB (ESP32-P4 only)

Kein HTTP — siehe avb-setup.md.

Beispiel

curl "http://192.168.1.50/light/on?token=your-secret"
curl "http://192.168.1.50/status?token=your-secret"