Here are my connections
I cannot get the PIR to report motions back to Home Assistant/ESPHome.
Is my script/connections looking fine, or am I missing something (obviously I do )
Her is my ESPHome script for the ESP32-CAM:
substitutions:
devicename: cam_garasje
friendly_name: CAM Garasje
esphome:
name: ${devicename}
platform: ESP32
board: nodemcu-32s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pw
logger:
api:
reboot_timeout: 0s
ota:
web_server:
port: 80
esp32_camera:
name: ${friendly_name}
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
resolution: 800x600
pixel_clock_pin: GPIO22
power_down_pin: GPIO32
time:
- platform: homeassistant
id: homeassistant_time
timezone: Europe/Oslo
# esp32_ble_tracker:
sensor:
- platform: wifi_signal
name: ${friendly_name} WiFi signal
update_interval: 30s
- platform: uptime
name: ${friendly_name} Uptime
binary_sensor:
- platform: gpio
pin: GPIO12
name: ${friendly_name} PIR Sensor
device_class: motion
id: cam_garasje_pir
on_state:
- switch.turn_on: cam_garasje_lys
- platform: template
name: temp_motion
lambda: 'return id(cam_garasje_pir).state;'
filters:
- delayed_off: 1min
on_release:
- switch.turn_off: cam_garasje_lys
switch:
- platform: restart
name: ${friendly_name} restart
id: restart_switch
- platform: gpio
name: ${friendly_name} innebygd lys
id: cam_garasje_lys
pin: GPIO4