mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 03:16:37 +00:00
[tcp_uart] Add a TCP client that implements a UART (#19884)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@home-assistant.io>
This commit is contained in:
co-authored by
pre-commit-ci-lite[bot]
J. Nick Koston
parent
d970e9292e
commit
4724aea42e
@@ -0,0 +1,20 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
tcp_uart:
|
||||
- id: tcp_uart_1
|
||||
host: 192.0.2.10
|
||||
port: 502
|
||||
reconnect_interval: 10s
|
||||
connected:
|
||||
name: TCP UART Connected
|
||||
|
||||
interval:
|
||||
- interval: 60s
|
||||
then:
|
||||
- lambda: |-
|
||||
uint8_t byte;
|
||||
if (id(tcp_uart_1).available() && id(tcp_uart_1).read_byte(&byte)) {
|
||||
id(tcp_uart_1).write_byte(byte);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
tcp_uart: !include common.yaml
|
||||
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
tcp_uart: !include common.yaml
|
||||
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
tcp_uart: !include common.yaml
|
||||
@@ -0,0 +1,4 @@
|
||||
packages:
|
||||
tcp_uart: !include common.yaml
|
||||
|
||||
wifi: !remove
|
||||
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
tcp_uart: !include common.yaml
|
||||
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
tcp_uart: !include common.yaml
|
||||
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
tcp_uart: !include common.yaml
|
||||
Reference in New Issue
Block a user