56 lines
1,013 B
YAML
56 lines
1,013 B
YAML
esphome:
|
|
name: "door"
|
|
friendly_name: "Door"
|
|
platform: ESP32
|
|
board: esp-wrover-kit
|
|
|
|
api:
|
|
encryption:
|
|
key: !secret apikey_door
|
|
|
|
ota:
|
|
- platform: esphome
|
|
password: !secret otapass_door
|
|
|
|
ethernet:
|
|
type: LAN8720
|
|
mdc_pin: GPIO23
|
|
mdio_pin: GPIO18
|
|
clk_mode: GPIO0_IN
|
|
phy_addr: 1
|
|
power_pin: GPIO16
|
|
|
|
logger:
|
|
|
|
output:
|
|
- platform: gpio
|
|
pin: GPIO2
|
|
id: output_relay
|
|
|
|
button:
|
|
- platform: template
|
|
name: "door opener"
|
|
id: btn_door_opener
|
|
icon: mdi:lock-open
|
|
on_press:
|
|
- output.turn_on: output_relay
|
|
- delay: 2s
|
|
- output.turn_off: output_relay
|
|
|
|
time:
|
|
- platform: sntp
|
|
id: sntp_time
|
|
timezone: Europe/Berlin
|
|
servers:
|
|
- 0.pool.ntp.org
|
|
- 1.pool.ntp.org
|
|
- 2.pool.ntp.org
|
|
|
|
wireguard:
|
|
address: 10.20.16.2
|
|
private_key: !secret wireguard_key_door
|
|
peer_endpoint: jalr-bw.duckdns.org
|
|
peer_public_key: Ew25M4+OxfBGfW3g98m2chq+TIgWhxpVulrsuFmwOic=
|
|
netmask: 255.255.255.252
|
|
peer_port: 51001
|
|
peer_persistent_keepalive: 120s
|