请教 利用esphome 实现uart透传功能
请教 怎么利用esphome 实现uart透传功能 (利用esp8266 的TX RX )来传数据到 mqtt,然后用nodered 来实现自动化,爬了几天没有爬出来。零星的资料类似这种:这个是接收
remote_receiver:
pin:
number: GPIO14
inverted: True
dump: all
on_rec:
then:
- mqtt.publish:
topic: 0/a/b/c/rec
payload: !lambda |-
char temp;
sprintf(temp, "%d:%d", x.address, x.command);
ESP_LOGI("main", "rec: %s", temp);
return temp;
不错 学习了 如果只是透传,没必要非用esphome吧?好几个现成的固件都可以做到,比如tasmota啥的。
如果非要用esphome的话,应该也可以做到——我自己没这么弄过,纸上谈兵说点子思路哈~~
1、编程,也就是esphome下面的custom
2、esphome的自动化
可能用得到的文档:
https://esphome.io/components/mqtt.html
https://esphome.io/components/uart.html
https://esphome.io/custom/uart.html
https://esphome.io/components/text_sensor/uart.html XCray 发表于 2020-10-23 16:05
如果只是透传,没必要非用esphome吧?好几个现成的固件都可以做到,比如tasmota啥的。
如果非要用esphome ...
收到,谢谢。我试试其他固件。这几个文档反复看了几遍,没有整明白
既然有NODERED可以直接弄成TCP透传,然后在nodered拉一个TCP IN和TCP OUT就可以了 试试这个
external_components:
- source: github://oxan/esphome-stream-server
uart:
id: uart_bus
# add further configuration for the UART here
stream_server:
uart_id: uart_bus
port: 1234 bhc1365 发表于 2023-3-9 12:27
试试这个
external_components:
- source: github://oxan/esphome-stream-server
老哥这个是esphome吗 可以放下完成配置吗 XCray 发表于 2020-10-23 16:05
如果只是透传,没必要非用esphome吧?好几个现成的固件都可以做到,比如tasmota啥的。
如果非要用esphome ...
tasmota透传该怎么操作啊?官方文档我看不明白,求指教
页:
[1]