mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
146 lines
2.7 KiB
YAML
146 lines
2.7 KiB
YAML
substitutions:
|
|
devicename: garage-cleversensor
|
|
entity_name: garage_cleversensor
|
|
friendly_name: Garage CleverSensor
|
|
comment: Clever MultiSensor
|
|
board: olimex_evb
|
|
#framework: arduino
|
|
framework: esp-idf
|
|
network: wifi
|
|
static_ip: !secret garage-cleversensor-ip
|
|
i2c_id: bus_a
|
|
mqtt_root_topic: !secret mqtt_root_topic
|
|
|
|
# For the ultrasonic sensors
|
|
trigger1: 16
|
|
echo1: 17
|
|
trigger2: 19
|
|
echo2: 20
|
|
|
|
# For the reed switches
|
|
garage: 4
|
|
outer: 5
|
|
inner: 3
|
|
|
|
sda: 21
|
|
scl: 22
|
|
|
|
# Infrared Sensor
|
|
ir_tx: 12
|
|
ir_rx: 39
|
|
|
|
# I2C Pins
|
|
i2c_sda: 13
|
|
i2c_scl: 16
|
|
|
|
# For the ethernet adapter
|
|
ethernet_mdc_pin: 23
|
|
ethernet_mdio_pin: 18
|
|
ethernet_clk_pin: 0
|
|
|
|
# For the relays
|
|
relay1: 32 # Garage
|
|
relay2: 33
|
|
|
|
# Built-in button
|
|
button1: 34
|
|
|
|
esphome:
|
|
name: ${devicename}
|
|
friendly_name: ${friendly_name}
|
|
name_add_mac_suffix: false
|
|
|
|
packages:
|
|
wifi_board: !include common/olimex_evb_wifi.yaml
|
|
#ethernet_board: !include common/olimex_evb.yaml
|
|
device_base: !include common/device_base.yaml
|
|
web_server: !include common/web_server.yaml
|
|
bme680: !include common/bme68x_bsec2_i2c.yaml
|
|
mqtt: !include common/mqtt_all.yaml
|
|
|
|
# remote_receiver:
|
|
# pin: ${ir_rx}
|
|
# dump: all
|
|
|
|
# remote_transmitter:
|
|
# pin: ${ir_tx}
|
|
# carrier_duty_percent: 50%
|
|
|
|
i2c:
|
|
- id: ${i2c_id}
|
|
sda: ${sda}
|
|
scl: ${scl}
|
|
|
|
switch:
|
|
- platform: gpio
|
|
pin: ${relay1}
|
|
name: "Relay1"
|
|
|
|
- platform: gpio
|
|
pin: ${relay2}
|
|
name: "Relay2"
|
|
|
|
sensor:
|
|
- platform: ultrasonic
|
|
name: Car Sensor East Side
|
|
trigger_pin: ${trigger1}
|
|
echo_pin: ${echo1}
|
|
id: ultrasonic1
|
|
timeout: 4.0m
|
|
update_interval: 0.5s
|
|
filters:
|
|
- or:
|
|
- throttle_average: 30s
|
|
- delta: 0.5
|
|
- sliding_window_moving_average:
|
|
window_size: 5
|
|
send_every: 5
|
|
- delta: 0.0254
|
|
|
|
- platform: ultrasonic
|
|
name: Car Sensor West Side
|
|
trigger_pin: ${trigger2}
|
|
echo_pin: ${echo2}
|
|
id: ultrasonic2
|
|
timeout: 4.0m
|
|
update_interval: 0.5s
|
|
filters:
|
|
- or:
|
|
- throttle_average: 30s
|
|
- delta: 0.5
|
|
- sliding_window_moving_average:
|
|
window_size: 5
|
|
send_every: 5
|
|
- delta: 0.0254
|
|
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
name: "ESP32-EVB button"
|
|
pin: ${button1}
|
|
# on_press:
|
|
# - mqtt.publish:
|
|
# topic: "${mqtt_root_topic}/${devicename}/button"
|
|
# payload: "pressed"
|
|
|
|
- platform: gpio
|
|
name: "Garage Door"
|
|
device_class: door
|
|
pin:
|
|
number: ${garage}
|
|
mode: INPUT_PULLUP
|
|
|
|
- platform: gpio
|
|
name: "Outer Door"
|
|
device_class: door
|
|
pin:
|
|
number: ${outer}
|
|
mode: INPUT_PULLUP
|
|
|
|
- platform: gpio
|
|
name: "Inner Door"
|
|
device_class: door
|
|
pin:
|
|
number: ${inner}
|
|
mode: INPUT_PULLUP
|