Hi,
I have a ESP32 Cam working to just stream video, I want to be able to Trigger from an automation to do the following:
Turn onboard Flash Light ON
Take a still JPG and display in Lovelace
Turn onboard Flash Light OFF
Can anyone give me pointers where to start with this?
Below is my ESPHOME code
#################################################################
# #
# CAMERA #
# #
#################################################################
esphome:
name: camtest1
platform: ESP32
board: esp-wrover-kit
wifi:
ssid: ######
password: #####
manual_ip:
static_ip: 192.168.1.100
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
esp32_camera:
name: 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: GPIO22
power_down_pin: GPIO32
output:
#flashlight
# - platform: gpio
# pin: GPIO4
# id: gpio_4
#statuslight
- platform: gpio
pin:
number: GPIO33
inverted: True
id: gpio_33
sensor:
- platform: wifi_signal
name: $hostname WiFi Signal
update_interval: 60s
- platform: uptime
name: $hostname Uptime
text_sensor:
- platform: version
name: $hostname ESPHome Version
- platform: wifi_info
ssid:
name: $hostname WiFi
switch:
- platform: restart
name: $hostname restart