ESP32-CAM - FT232RL ESPHome

Hello
comme demandé

esphome:
  name: espcam001
  platform: ESP32
  board: esp32cam

wifi:
  networks:
  - ssid: "Livebox-abcdef"
    password: "password"
 
  manual_ip:
    static_ip: 192.168.1.xyz
    gateway: 192.168.1.254
    subnet: 255.255.255.0
    dns1: 192.168.1.254
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Espcam 001 Fallback Hotspot"
    password: "fallback"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
switch:
  - platform: restart
    name: "Espcam_001 reboot"
time:
  - platform: sntp
    id: sntp_time
    timezone: Europe/Paris

web_server:
  port: 80

binary_sensor:
  - platform: status
    name: "Espcam 001 Status"

sensor:
  - platform: uptime
    id: uptime_seconds
    name: "Uptime Sensor"
    update_interval: 60s
    unit_of_measurement: s
    accuracy_decimals: 0
    force_update: false
    icon: mdi:timer
    internal: True  # Hide to HA
  - platform: wifi_signal
    name: "EspCam 001 WiFi Signal Sensor"
    update_interval: 60s

text_sensor:
  - platform: template
    name: espcam_001 - Uptime
    update_interval: 60s
    icon: mdi:clock-start
    lambda: |-
      int seconds = (id(uptime_seconds).state);
      int days = seconds / (24 * 3600);
      seconds = seconds % (24 * 3600);
      int hours = seconds / 3600;
      seconds = seconds % 3600;
      int minutes = seconds /  60;
      seconds = seconds % 60;
      if ( days ) {
        return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else if ( hours ) {
        return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else if ( minutes ) {
        return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else {
        return { (String(seconds) +"s").c_str() };
      }


esp32_camera:
  name: ESPCam_001
  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: GPIO22
  power_down_pin: GPIO32
  test_pattern: false
  vertical_flip: false
  horizontal_mirror: true
  resolution: 640x480
  max_framerate: 10 fps
  idle_framerate: 0.1 fps
  
output:
  # Register the  LED as a dimmable output ....
  - platform: ledc
    id: cam001_led
    pin: GPIO4
    channel: 2
    inverted: false

light: 
  # ... and then make a light out of it.
  - platform: monochromatic
    name: "Espcam 001 LED"
    output: cam001_led

esp32_camera_web_server:
  - port: 8080
    mode: stream

1 « J'aime »