mirror of
https://github.com/esphome/esphome.git
synced 2026-10-08 12:04:03 +00:00
26 lines
538 B
YAML
26 lines
538 B
YAML
wifi:
|
|
ssid: MySSID
|
|
password: password1
|
|
|
|
tcp_uart:
|
|
- id: tcp_uart_server
|
|
role: server
|
|
port: 5020
|
|
reconnect_interval: 10s
|
|
allowed_ips:
|
|
- 192.0.2.20
|
|
- 192.0.2.0/24
|
|
connected:
|
|
name: TCP UART Server Connected
|
|
disconnects:
|
|
name: TCP UART Server Disconnects
|
|
|
|
interval:
|
|
- interval: 60s
|
|
then:
|
|
- lambda: |-
|
|
uint8_t byte;
|
|
if (id(tcp_uart_server).available() && id(tcp_uart_server).read_byte(&byte)) {
|
|
id(tcp_uart_server).write_byte(byte);
|
|
}
|