Files
presence-sensor/poe-variant/esphome-presence-sensor-poe.yaml
root c131a97ac4 Add PoE variant with W5500 Ethernet and 802.3af power
- W5500 SPI Ethernet controller for wired connectivity
- Silvertel Ag9905MT PoE PD module (48V to 5V)
- RJ45 connector with integrated magnetics
- Higher camera resolution (1024x768 vs 800x600) using wired bandwidth
- WiFi fallback if Ethernet disconnected
- Separate BOM, pin mapping, ESPHome config
- 3D-printable enclosure (50x40mm, larger for RJ45)
2026-03-29 13:00:07 -05:00

194 lines
3.8 KiB
YAML

substitutions:
name: presence-sensor-poe
friendly_name: Presence Sensor PoE
esphome:
name: ${name}
friendly_name: ${friendly_name}
platformio_options:
board_build.flash_mode: dio
board_build.arduino.memory_type: qio_opi
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
flash_size: 16MB
psram:
mode: octal
speed: 80MHz
logger:
level: INFO
api:
encryption:
key: !secret api_key
ota:
- platform: esphome
password: !secret ota_password
# ==========================================
# ETHERNET - W5500 SPI (primary network)
# ==========================================
ethernet:
type: W5500
clk_pin: GPIO35
mosi_pin: GPIO34
miso_pin: GPIO33
cs_pin: GPIO36
interrupt_pin: GPIO37
reset_pin: GPIO42
clock_speed: 25MHz
# WiFi as fallback only (if Ethernet cable disconnected)
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "${name}-fallback"
password: !secret fallback_password
# ==========================================
# I2C Bus - SHT41 + BH1750
# ==========================================
i2c:
sda: GPIO3
scl: GPIO4
scan: true
frequency: 400kHz
# ==========================================
# UART - LD2410C mmWave Radar
# ==========================================
uart:
id: uart_ld2410
tx_pin: GPIO17
rx_pin: GPIO18
baud_rate: 256000
parity: NONE
stop_bits: 1
# ==========================================
# Camera - OV5640 5MP
# ==========================================
esp32_camera:
name: Camera
external_clock:
pin: GPIO11
frequency: 20MHz
i2c_pins:
sda: GPIO15
scl: GPIO16
data_pins: [GPIO1, GPIO2, GPIO5, GPIO6, GPIO7, GPIO8, GPIO9, GPIO10]
vsync_pin: GPIO13
href_pin: GPIO14
pixel_clock_pin: GPIO12
power_down_pin: GPIO21
reset_pin: GPIO41
# PoE = wired = more bandwidth, can push higher quality
resolution: 1024x768
max_framerate: 15fps
idle_framerate: 0.5fps
jpeg_quality: 10
vertical_flip: false
horizontal_mirror: false
esp32_camera_web_server:
- port: 8080
mode: stream
# ==========================================
# LD2410C mmWave Presence Radar
# ==========================================
ld2410:
uart_id: uart_ld2410
id: ld2410_radar
binary_sensor:
- platform: ld2410
has_target:
name: Presence
id: ld2410_presence
has_moving_target:
name: Moving Target
has_still_target:
name: Still Target
- platform: gpio
pin:
number: GPIO38
mode: INPUT
name: Motion
id: pir_motion
device_class: motion
filters:
- delayed_off: 10s
- platform: template
name: Occupancy
device_class: occupancy
lambda: |-
if (id(pir_motion).state || id(ld2410_presence).state) {
return true;
}
return false;
filters:
- delayed_off: 30s
sensor:
- platform: ld2410
moving_distance:
name: Moving Distance
still_distance:
name: Still Distance
moving_energy:
name: Moving Energy
still_energy:
name: Still Energy
detection_distance:
name: Detection Distance
- platform: sht4x
temperature:
name: Temperature
accuracy_decimals: 1
filters:
- offset: -1.5
humidity:
name: Humidity
accuracy_decimals: 1
address: 0x44
update_interval: 30s
heater_max_duty: 0.0
- platform: bh1750
name: Illuminance
address: 0x23
measurement_duration: 69
update_interval: 10s
- platform: uptime
name: Uptime
light:
- platform: status_led
name: Status LED
pin: GPIO40
button:
- platform: restart
name: Restart
- platform: factory_reset
name: Factory Reset
disabled_by_default: true
text_sensor:
- platform: ethernet_info
ip_address:
name: IP Address
- platform: version
name: ESPHome Version