2023-09-11 21:13:24 +02:00
|
|
|
---
|
|
|
|
esphome:
|
|
|
|
name: test10
|
|
|
|
build_path: build/test10
|
|
|
|
|
|
|
|
esp32:
|
|
|
|
board: esp32doit-devkit-v1
|
|
|
|
framework:
|
|
|
|
type: arduino
|
|
|
|
|
|
|
|
wifi:
|
|
|
|
ssid: "MySSID1"
|
|
|
|
password: "password1"
|
|
|
|
reboot_timeout: 3min
|
|
|
|
power_save_mode: high
|
|
|
|
|
2023-09-27 10:38:43 +02:00
|
|
|
network:
|
|
|
|
enable_ipv6: true
|
|
|
|
|
2023-09-11 21:13:24 +02:00
|
|
|
logger:
|
|
|
|
level: VERBOSE
|
|
|
|
|
|
|
|
api:
|
|
|
|
reboot_timeout: 10min
|
|
|
|
|
2024-03-20 04:37:18 +01:00
|
|
|
web_server:
|
|
|
|
version: 3
|
|
|
|
|
2023-09-11 21:13:24 +02:00
|
|
|
time:
|
|
|
|
- platform: sntp
|
|
|
|
|
|
|
|
wireguard:
|
|
|
|
id: vpn
|
|
|
|
address: 172.16.34.100
|
|
|
|
netmask: 255.255.255.0
|
|
|
|
# NEVER use the following keys for your vpn, they are now public!
|
|
|
|
private_key: wPBMxtNYH3mChicrbpsRpZIasIdPq3yZuthn23FbGG8=
|
|
|
|
peer_public_key: Hs2JfikvYU03/Kv3YoAs1hrUIPPTEkpsZKSPUljE9yc=
|
|
|
|
peer_preshared_key: 20fjM5GRnSolGPC5SRj9ljgIUyQfruv0B0bvLl3Yt60=
|
|
|
|
peer_endpoint: wg.server.example
|
|
|
|
peer_persistent_keepalive: 25s
|
|
|
|
peer_allowed_ips:
|
|
|
|
- 172.16.34.0/24
|
|
|
|
- 192.168.4.0/24
|
|
|
|
|
|
|
|
binary_sensor:
|
|
|
|
- platform: wireguard
|
|
|
|
status:
|
|
|
|
name: 'WireGuard Status'
|
2024-01-11 06:09:42 +01:00
|
|
|
enabled:
|
|
|
|
name: 'WireGuard Enabled'
|
2023-09-11 21:13:24 +02:00
|
|
|
|
|
|
|
sensor:
|
|
|
|
- platform: wireguard
|
|
|
|
latest_handshake:
|
|
|
|
name: 'WireGuard Latest Handshake'
|
2023-10-23 21:05:57 +02:00
|
|
|
|
|
|
|
text_sensor:
|
|
|
|
- platform: wireguard
|
|
|
|
address:
|
|
|
|
name: 'WireGuard Address'
|
2024-01-11 06:09:42 +01:00
|
|
|
|
|
|
|
button:
|
|
|
|
- platform: template
|
|
|
|
name: 'Toggle WireGuard'
|
|
|
|
entity_category: config
|
|
|
|
on_press:
|
|
|
|
- if:
|
|
|
|
condition: wireguard.enabled
|
|
|
|
then:
|
|
|
|
- wireguard.disable:
|
|
|
|
else:
|
|
|
|
- wireguard.enable:
|
|
|
|
|
|
|
|
- platform: template
|
|
|
|
name: 'Log WireGuard status'
|
|
|
|
entity_category: config
|
|
|
|
on_press:
|
|
|
|
- if:
|
|
|
|
condition: wireguard.peer_online
|
|
|
|
then:
|
|
|
|
- logger.log: 'wireguard remote peer is online'
|
|
|
|
else:
|
|
|
|
- logger.log: 'wireguard remote peer is offline'
|