My bad, been a while since I been on here. Here is my full configuration, found an OV2060 camera from an old lilly flag device I wasn’t using. Actually pretty good frame rate but at lower resolutions.
I can’t wait for the P4 to be added, I got a dev kit, even though I died really need it but you can use a camera and it handles up to 1080p24fps using h264. It has a 7" screen and I can view video from the camera and it looks better than any S3 camera I’ve tried and that’s without a display. Saw a video on YouTube, apparently someone got Quake running on one. I guess Doom is to easy now? Around the seven minute mark
Uptime, IP and temperature are good sensors, not really sure what heap size is although I’m pretty sure it has to do with RAM.
substitutions:
name: ws-poe-s3
friendly_name: ws_poe_s3
device_sampling_time: 90s
esphome:
name: ${name}
friendly_name: ${friendly_name}
on_boot:
priority: 700
then:
- switch.turn_off: relay1
- lambda: |-
delay(1200);
#includes:
# - idfWifi.h
# - idfWifi.c
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
version: recommended
sdkconfig_options:
CONFIG_ESP32_DEFAULT_CPU_FREQ_240: "y"
CONFIG_ESP32_DATA_CACHE_64KB: "y"
CONFIG_ESP32_DATA_CACHE_LINE_64B: "y"
CONFIG_ESP32_INSTRUCTION_CACHE_32KB: 'Y'
flash_size: 16MB
psram:
mode: octal
speed: 80MHz
switch:
- platform: gpio
name: ws-poe-32-relay1
id: relay1
pin: GPIO8
restore_mode: ALWAYS_OFF
setup_priority: 800
esp32_camera:
setup_priority: 200
name: "My Cam"
external_clock:
pin: GPIO3
frequency: 20MHz
i2c_pins:
sda: GPIO48
scl: GPIO47
data_pins: [GPIO41, GPIO45, GPIO46, GPIO42, GPIO40, GPIO38, GPIO15, GPIO18]
vsync_pin: GPIO1
href_pin: GPIO2
pixel_clock_pin: GPIO39
max_framerate: 60 fps
idle_framerate: 0.01 fps
resolution: 640x480
jpeg_quality: 10
frame_buffer_count: 2
aec2: true
aec_mode: AUTO
# Enable logging
logger:
debug:
update_interval: ${device_sampling_time}
# Enable Home Assistant API
api:
encryption:
key: "Georgecarlin"
ota:
- platform: esphome
password: "dog"
#wifi:
# ssid: !secret wifi_ssid
# password: !cat
ethernet:
type: W5500
mosi_pin: GPIO11
miso_pin: GPIO12
clk_pin: GPIO13
cs_pin: GPIO14
reset_pin: GPIO9
interrupt_pin: GPIO10
clock_speed: 25MHz
time:
- platform: homeassistant
id: homeassistant_time
button:
- platform: safe_mode
name: Safe Mode Boot
- platform: factory_reset
name: Factory reset
- platform: restart
id: reboot_btn
name: restart
sensor:
#-------------------------------------------------------------------------------
# ESP32 internal sensors
#-------------------------------------------------------------------------------
# Temperature
- platform: internal_temperature
name: Internal Temperature
update_interval: ${device_sampling_time}
- platform: debug
free:
name: Heap free
id: ${friendly_name}_heap_free
block:
name: Heap max block
id: ${friendly_name}_heap_max_block
loop_time:
name: Loop time
id: ${friendly_name}_loop_time
- platform: template
name: Heap free (%)
id: ${friendly_name}_heap_free_percent
unit_of_measurement: '%'
accuracy_decimals: 2
icon: mdi:percent
update_interval: ${device_sampling_time}
entity_category: diagnostic
# 524288 B (SRAM total)
# 327680 B (DRAM usable)
lambda: return ( id(${friendly_name}_heap_free).state * 100 / 327680 );
- platform: template
name: Heap max block (%)
id: ${friendly_name}_heap_max_block_percent
unit_of_measurement: '%'
accuracy_decimals: 2
icon: mdi:percent
update_interval: ${device_sampling_time}
entity_category: diagnostic
# 524288 B (SRAM total)
# 327680 B (DRAM usable)
lambda: return ( id(${friendly_name}_heap_max_block).state * 100 / 327680 );
- platform: uptime
name: "Uptime Sensor"
id: ${friendly_name}_uptime_sensor
update_interval: ${device_sampling_time}
internal: true
on_raw_value:
then:
- text_sensor.template.publish:
id: ${friendly_name}_uptime_human
state: !lambda |-
int seconds = round(id(${friendly_name}_uptime_sensor).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return (
(days ? to_string(days) + "d " : "") +
(hours ? to_string(hours) + "h " : "") +
(minutes ? to_string(minutes) + "m " : "") +
(to_string(seconds) + "s")
).c_str();
#-------------------------------------------------------------------------------
# Custom Text sensors
#-------------------------------------------------------------------------------
text_sensor:
- platform: ethernet_info
ip_address:
name: "IP Address"
- platform: template
name: Uptime Human Readable
id: ${friendly_name}_uptime_human
icon: mdi:clock-start
# include commented out files and copy locally for the below to work
# - platform: template
# id: wifi_channel
# name: "Net WiFi Channel"
# lambda: |-
# static char str[3]; // two digits (or -1) plus NULL
# sprintf(str, "%2d", idfWifiGetChannelNum());
# return (std::string) str;
#web_server:
# port: 80
# version: 2
# include_internal: true
# ota: false
# Enable fallback hotspot (captive portal) in case wifi connection fails
#ap:
# ssid: "Ws-Poe-S3 Fallback Hotspot"
# password: "AB6J9ECa7R0F"
#captive_portal: