Skip to content

Commit 80f49f9

Browse files
committed
Add optional logging via syslog to a remote syslog server
1 parent 0e6f3a5 commit 80f49f9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

main.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ substitutions:
1919
wifi_ssid: "your_wifi_ssid_here"
2020
wifi_password: "your_wifi_password_here"
2121
wifi_ap_password: "your_wifi_ap_password_here"
22+
syslog_server: "ip address of your syslog server here or empty if you don't want logging"
23+
syslog_port: "514" # default syslog port is 514, but you can change it if your server uses a different port
2224

2325
# You might want to override this:
2426
esphome:
@@ -156,3 +158,19 @@ switch:
156158
name: ${relay8_name}
157159
pin: GPIO32
158160
restore_mode: RESTORE_DEFAULT_OFF
161+
162+
udp:
163+
# syslog server
164+
addresses: ${syslog_server}
165+
166+
time:
167+
platform: sntp
168+
timezone: Europe/Rome
169+
servers:
170+
- 0.pool.ntp.org
171+
- 1.pool.ntp.org
172+
- 2.pool.ntp.org
173+
174+
syslog:
175+
# emit syslog messages to server defined under "udp"
176+
port: ${syslog_port}

0 commit comments

Comments
 (0)