mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-01-02 11:37:28 +01:00
102 lines
2.2 KiB
YAML
102 lines
2.2 KiB
YAML
esphome:
|
|
name: camera-2
|
|
platformio_options:
|
|
build_flags: "-DBOARD_HAS_PSRAM -UARDUINO_USB_CDC_ON_BOOT"
|
|
upload_speed: 921600
|
|
monitor_speed: 115200
|
|
friendly_name: "Camera 2"
|
|
libraries:
|
|
- XPowersLib=https://github.com/lewisxhe/XPowersLib.git
|
|
- "Wire"
|
|
includes:
|
|
- AXP2101_component.h
|
|
|
|
custom_component:
|
|
- lambda: |-
|
|
auto axp2101 = new AXP2101Component();
|
|
return {axp2101};
|
|
components:
|
|
- id: axp2101
|
|
|
|
esp32:
|
|
board: esp32s3box
|
|
framework:
|
|
type: arduino
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
encryption:
|
|
key: "XXX" # Replace with your API encryption key
|
|
|
|
ota:
|
|
password: "XXX" # Replace with your OTA password
|
|
|
|
wifi:
|
|
ssid: !secret wifi_ssid # Replace with your Wi-Fi SSID stored in secrets.yaml
|
|
password: !secret wifi_password # Replace with your Wi-Fi password stored in secrets.yaml
|
|
|
|
# Enable fallback hotspot (captive portal) in case Wi-Fi connection fails
|
|
ap:
|
|
ssid: "Esp32-S3 Fallback Hotspot"
|
|
password: "XXX" # Replace with your fallback hotspot password
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
pin: GPIO17
|
|
name: "ttgocam2 PIR"
|
|
device_class: motion
|
|
|
|
sensor:
|
|
- platform: wifi_signal
|
|
name: "ttgocam2 WiFi Signal"
|
|
update_interval: 60s
|
|
|
|
time:
|
|
- platform: homeassistant
|
|
id: homeassistant_time
|
|
|
|
font:
|
|
- file: "nanum.ttf"
|
|
id: tnr1
|
|
size: 17
|
|
|
|
web_server:
|
|
version: 2
|
|
|
|
i2c:
|
|
sda: GPIO07
|
|
scl: GPIO06
|
|
frequency: 200kHz
|
|
|
|
esp32_camera:
|
|
name: camera-2
|
|
external_clock:
|
|
pin: GPIO38
|
|
frequency: 20MHz
|
|
i2c_pins:
|
|
sda: GPIO05
|
|
scl: GPIO04
|
|
data_pins: [GPIO14, GPIO47, GPIO48, GPIO21, GPIO13, GPIO11, GPIO10, GPIO09]
|
|
vsync_pin: GPIO8
|
|
href_pin: GPIO18
|
|
pixel_clock_pin: GPIO12
|
|
vertical_flip: false
|
|
horizontal_mirror: false
|
|
resolution: 1024x768
|
|
|
|
esp32_camera_web_server:
|
|
- port: 8080
|
|
mode: stream
|
|
- port: 8081
|
|
mode: snapshot
|
|
|
|
display:
|
|
- platform: ssd1306_i2c
|
|
update_interval: 2s
|
|
model: "SSD1306 128x64"
|
|
address: 0x3C
|
|
rotation: 180
|
|
lambda: |-
|
|
// Display current date and time
|
|
it.strftime(64, 0, id(tnr1), TextAlign::TOP_CENTER, "%m-%d-%Y", id(homeassistant_time).now());
|
|
it.strftime(64, 44, id(tnr1), TextAlign::BASELINE_CENTER, "%I:%M:%S%p", id(homeassistant_time).now()); |