Metainformationen zur Seite
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
digitales:hardware:esp:esp32-cam [02.04.2025] – [Troubleshooting] cs | digitales:hardware:esp:esp32-cam [25.05.2025] (aktuell) – [ESP32-CAM Dokumentation] cs | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
{{tag> | {{tag> | ||
- | ====== ESP32-Cam ====== | + | ====== ESP32-CAM Dokumentation |
- | {{..:..: | + | {{..: |
- | {{..:..: | + | {{..: |
- | Das Board hat einen ESP32-S Chip. | ||
- | Dieses Board muss erstmalig mit einem [[..: | + | ===== Übersicht ===== |
- | Anschließend muss das **Kabel** wieder **entfernt** und das Board **neu gestartet/ | + | Das ESP32-CAM |
- | Oder es wird das [[.: | + | ===== Hardware Eigenschaften ===== |
- | Wird die Kamera mit mit dem Arduino-Sketch betrieben, dann lautet die Kamera-IP in motioneye //(ersetze 192.168.1.6 durch die IP-Adresse deines Boards)// | + | * Mikrocontroller: |
+ | * Kamera: OV2640 (2MP) | ||
+ | * Flashlicht: Integrierte weiße LED | ||
+ | * GPIO-Pins: Mehrere verfügbare Pins für Erweiterungen | ||
+ | * Kommunikation: | ||
+ | * Stromversorgung: | ||
- | - http:// | + | ===== Ersteinrichtung ===== |
- | - [[http:// | + | |
+ | ==== Flashen des Boards ==== | ||
- | ===== Troubleshooting ===== | + | Das Board muss für die erste Programmierung in den Flash-Modus versetzt werden: |
- | | + | - Verbinden Sie das Board über einen USB-zu-TTL-Adapter (z.B. FTDI oder CP2102) mit Ihrem Computer |
- | * [[https://youtu.be/NvmyCBbTGPs|YouTube | + | - Stellen Sie folgende Verbindungen her: |
+ | * ESP32-CAM | ||
+ | * ESP32-CAM 5V/3.3V → Adapter 5V/3.3V (je nach Adapter) | ||
+ | * ESP32-CAM U0R (RX) → Adapter TX | ||
+ | * ESP32-CAM U0T (TX) → Adapter RX | ||
+ | - Verbinden Sie GPIO0 (IO0) mit GND, um den Flash-Modus zu aktivieren | ||
+ | - Drücken Sie kurz den RST-Button | ||
+ | - Führen Sie das Flashen mit Arduino IDE, ESPHome oder esptool | ||
+ | - Nach dem Flashen: Entfernen Sie die Verbindung zwischen GPIO0 und GND | ||
+ | | ||
- | {{: | + | ===== Integration in Home Assistant mit ESPHome ===== |
+ | [[digitales: | ||
- | ===== Nützliche Links ===== | ||
- | |||
- | * [[https:// | ||
- | * [[https:// | ||
- | ===== Code ===== | + | ==== Basis-Konfiguration |
- | <file yaml esp32-cam-01.yaml> | + | <code yaml> |
substitutions: | substitutions: | ||
devicename: esp-cam | devicename: esp-cam | ||
Zeile 50: | Zeile 60: | ||
type: arduino | type: arduino | ||
- | # Enable logging | + | # Aktiviere Logging |
logger: | logger: | ||
level: WARN | level: WARN | ||
+ | # Externe Pakete einbinden | ||
packages: | packages: | ||
wifi: !include packages/ | wifi: !include packages/ | ||
mqtt: !include packages/ | mqtt: !include packages/ | ||
ota: !include packages/ | ota: !include packages/ | ||
+ | </ | ||
- | # Enable Home Assistant API | + | ==== Kamera-Konfiguration |
- | # Für ESP32 Camera Component siehe: https:// | + | |
- | # Für lambda siehe: https:// | + | |
- | api: | + | |
- | services: | + | |
- | # change camera parameters on-the-fly | + | |
- | - service: camera_set_param | + | |
- | variables: | + | |
- | name: string | + | |
- | value: int | + | |
- | then: | + | |
- | - lambda: |- | + | |
- | bool state_return | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | if ((" | + | |
- | + | ||
- | if (true == state_return) { | + | |
- | id(my_camera).update_camera_parameters(); | + | |
- | } | + | |
- | else { | + | |
- | ESP_LOGW(" | + | |
- | } | + | |
- | wifi: | + | |
- | manual_ip: | + | |
- | # Set this to the IP of the ESP | + | |
- | static_ip: 192.168.178.40 | + | |
- | # Set this to the IP address of the router. Often ends with .1 | + | |
- | gateway: 192.168.178.1 | + | |
- | # The subnet of the network. 255.255.255.0 works for most home networks. | + | |
- | subnet: 255.255.255.0 | + | |
- | + | ||
- | captive_portal: | + | |
- | + | ||
- | time: | + | |
- | - platform: homeassistant | + | |
- | id: esptime | + | |
+ | <code yaml> | ||
esp32_camera: | esp32_camera: | ||
name: $upper_devicename | name: $upper_devicename | ||
Zeile 127: | Zeile 91: | ||
max_framerate: | max_framerate: | ||
- | # Image settings | + | # Bildeinstellungen |
contrast: 0 | contrast: 0 | ||
special_effect: | special_effect: | ||
- | # exposure settings | + | # Belichtungseinstellungen |
aec_mode: auto | aec_mode: auto | ||
aec2: false | aec2: false | ||
ae_level: 0 | ae_level: 0 | ||
aec_value: 300 | aec_value: 300 | ||
- | # gain settings | + | # Verstärkungseinstellungen |
agc_mode: auto | agc_mode: auto | ||
agc_gain_ceiling: | agc_gain_ceiling: | ||
agc_value: 0 | agc_value: 0 | ||
- | # white balance setting | + | # Weißabgleich-Einstellung |
wb_mode: auto | wb_mode: auto | ||
- | # orientation | + | # Ausrichtung |
vertical_flip: | vertical_flip: | ||
horizontal_mirror: | horizontal_mirror: | ||
+ | </ | ||
- | on_stream_start: | ||
- | light.turn_on: | ||
- | on_stream_stop: | ||
- | light.turn_off: | ||
- | # camera webserver | + | ==== Webserver und LED-Steuerung ==== |
+ | |||
+ | <code yaml> | ||
+ | # Kamera-Webserver | ||
esp32_camera_web_server: | esp32_camera_web_server: | ||
- port: 80 | - port: 80 | ||
Zeile 165: | Zeile 129: | ||
light: | light: | ||
- | # For the white LED. | + | # Für die weiße |
- platform: monochromatic | - platform: monochromatic | ||
output: gpio_4 | output: gpio_4 | ||
name: $upper_devicename Flash LED | name: $upper_devicename Flash LED | ||
- | # For the red status | + | # Für die rote Status-LED |
- platform: status_led | - platform: status_led | ||
name: $upper_devicename Status LED | name: $upper_devicename Status LED | ||
Zeile 176: | Zeile 140: | ||
number: GPIO33 | number: GPIO33 | ||
inverted: true | inverted: true | ||
+ | </ | ||
- | switch: | + | ==== WLAN-Konfiguration (Beispiel) ==== |
- | | + | |
- | name: $upper_devicename Restart | + | |
- | binary_sensor: | + | <code yaml> |
- | - platform: status | + | wifi: |
- | | + | |
+ | manual_ip: | ||
+ | | ||
+ | gateway: 192.168.178.1 | ||
+ | subnet: 255.255.255.0 | ||
+ | # Alternative: | ||
+ | # ssid: " | ||
+ | # password: " | ||
+ | </ | ||
- | </file> | + | ===== Kamera-Zugriff ===== |
+ | |||
+ | Nach erfolgreicher Einrichtung können Sie auf die Kamera zugreifen: | ||
+ | |||
+ | * Livestream: '' | ||
+ | * Einzelbild: '' | ||
+ | * In MotionEye einbinden: '' | ||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | |||
+ | ==== Bekannte Probleme ==== | ||
+ | |||
+ | - **Niedrige Bildrate (FPS)** | ||
+ | * Mögliche Ursache: Interferenzen zwischen IO0 und der WLAN-Antenne | ||
+ | * Lösung: Abschirmung des IO0-Pins mit antistatischer Folie oder durch Berührung | ||
+ | * Alternativ: Positionierung des Boards entfernt von Störquellen | ||
+ | - **Verbindungsprobleme** | ||
+ | * Überprüfen Sie die Stromversorgung (mindestens 5V/1A empfohlen) | ||
+ | * Stellen Sie sicher, dass sich das Board in Reichweite des WLAN-Routers befindet | ||
+ | * Versuchen Sie eine Firmware-Aktualisierung | ||
+ | |||
+ | {{: | ||
+ | ===== Nützliche Links ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||