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 [05.04.2025] – [Basis-Konfiguration] cs | digitales:hardware:esp:esp32-cam [25.05.2025] (aktuell) – [ESP32-CAM Dokumentation] cs | ||
---|---|---|---|
Zeile 3: | Zeile 3: | ||
====== ESP32-CAM Dokumentation ====== | ====== ESP32-CAM Dokumentation ====== | ||
- | {{..:..: | + | {{..: |
+ | |||
+ | {{..: | ||
- | {{..: | ||
===== Übersicht ===== | ===== Übersicht ===== | ||
Zeile 39: | Zeile 40: | ||
===== Integration in Home Assistant mit ESPHome ===== | ===== Integration in Home Assistant mit ESPHome ===== | ||
+ | |||
+ | [[digitales: | ||
+ | |||
==== Basis-Konfiguration ==== | ==== Basis-Konfiguration ==== | ||
Zeile 106: | Zeile 110: | ||
</ | </ | ||
- | ==== Kamera-Konfiguration ==== | ||
- | |||
- | <code yaml> | ||
- | esp32_camera: | ||
- | name: $upper_devicename | ||
- | id: my_camera | ||
- | external_clock: | ||
- | pin: GPIO0 | ||
- | frequency: 20MHz | ||
- | i2c_pins: | ||
- | sda: GPIO26 | ||
- | scl: GPIO27 | ||
- | data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35] | ||
- | vsync_pin: GPIO25 | ||
- | href_pin: GPIO23 | ||
- | pixel_clock_pin: | ||
- | power_down_pin: | ||
- | idle_framerate: | ||
- | max_framerate: | ||
- | |||
- | # Bildeinstellungen | ||
- | contrast: 0 | ||
- | special_effect: | ||
- | # Belichtungseinstellungen | ||
- | aec_mode: auto | ||
- | aec2: false | ||
- | ae_level: 0 | ||
- | aec_value: 300 | ||
- | # Verstärkungseinstellungen | ||
- | agc_mode: auto | ||
- | agc_gain_ceiling: | ||
- | agc_value: 0 | ||
- | # Weißabgleich-Einstellung | ||
- | wb_mode: auto | ||
- | # Ausrichtung | ||
- | vertical_flip: | ||
- | horizontal_mirror: | ||
- | </ | ||
==== Webserver und LED-Steuerung ==== | ==== Webserver und LED-Steuerung ==== | ||
Zeile 190: | Zeile 156: | ||
</ | </ | ||
- | ===== Code ===== | ||
- | |||
- | <code yaml esp32-cam-01.yaml> | ||
- | substitutions: | ||
- | devicename: esp-cam | ||
- | upper_devicename: | ||
- | |||
- | esphome: | ||
- | name: $devicename | ||
- | friendly_name: | ||
- | |||
- | esp32: | ||
- | board: esp32dev | ||
- | framework: | ||
- | type: arduino | ||
- | |||
- | # Enable logging | ||
- | logger: | ||
- | level: WARN | ||
- | |||
- | packages: | ||
- | wifi: !include packages/ | ||
- | mqtt: !include packages/ | ||
- | ota: !include packages/ | ||
- | |||
- | # Enable Home Assistant API | ||
- | # 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 = false; | ||
- | 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 | ||
- | |||
- | esp32_camera: | ||
- | name: $upper_devicename | ||
- | id: my_camera | ||
- | external_clock: | ||
- | pin: GPIO0 | ||
- | frequency: 20MHz | ||
- | i2c_pins: | ||
- | sda: GPIO26 | ||
- | scl: GPIO27 | ||
- | data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35] | ||
- | vsync_pin: GPIO25 | ||
- | href_pin: GPIO23 | ||
- | pixel_clock_pin: | ||
- | power_down_pin: | ||
- | idle_framerate: | ||
- | max_framerate: | ||
- | |||
- | # Image settings | ||
- | contrast: 0 | ||
- | special_effect: | ||
- | # exposure settings | ||
- | aec_mode: auto | ||
- | aec2: false | ||
- | ae_level: 0 | ||
- | aec_value: 300 | ||
- | # gain settings | ||
- | agc_mode: auto | ||
- | agc_gain_ceiling: | ||
- | agc_value: 0 | ||
- | # white balance setting | ||
- | wb_mode: auto | ||
- | # orientation | ||
- | vertical_flip: | ||
- | horizontal_mirror: | ||
- | |||
- | on_stream_start: | ||
- | light.turn_on: | ||
- | on_stream_stop: | ||
- | light.turn_off: | ||
- | |||
- | # camera webserver | ||
- | esp32_camera_web_server: | ||
- | - port: 80 | ||
- | mode: stream | ||
- | - port: 81 | ||
- | mode: snapshot | ||
- | |||
- | output: | ||
- | - platform: ledc | ||
- | pin: GPIO4 | ||
- | id: gpio_4 | ||
- | channel: 2 | ||
- | frequency: 500Hz | ||
- | |||
- | light: | ||
- | # For the white LED. | ||
- | - platform: monochromatic | ||
- | output: gpio_4 | ||
- | name: $upper_devicename Flash LED | ||
- | # For the red status LED. | ||
- | - platform: status_led | ||
- | name: $upper_devicename Status LED | ||
- | id: cam_streaming | ||
- | pin: | ||
- | number: GPIO33 | ||
- | inverted: true | ||
- | |||
- | switch: | ||
- | - platform: restart | ||
- | name: $upper_devicename Restart | ||
- | |||
- | binary_sensor: | ||
- | - platform: status | ||
- | name: $upper_devicename Status | ||
- | </ | ||
===== Kamera-Zugriff ===== | ===== Kamera-Zugriff ===== | ||
Zeile 363: | Zeile 178: | ||
* Versuchen Sie eine Firmware-Aktualisierung | * Versuchen Sie eine Firmware-Aktualisierung | ||
+ | {{: | ||
===== Nützliche Links ===== | ===== Nützliche Links ===== | ||