Hello, i have an esp32 devkit c4. I need to connect an external device via serial and control it through the esp32 via esphome but i cannot understand how to do this.
I have followed this guide:
I have wrote this on my device.yaml
uart:
id: uart_bus
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 115200
text_sensor:
- platform: custom
lambda: |-
auto my_custom_sensor = new UartReadLineSensor(id(uart_bus));
App.register_component(my_custom_sensor);
return {my_custom_sensor};
text_sensors:
id: “uart_readline”
Now it seems to crash with this message:
[libprotobuf ERROR google/protobuf/wire_format_lite.cc:577] String field ‘SubscribeLogsResponse.message’ contains invalid UTF-8 data when parsing a protocol buffer. Use the ‘bytes’ type if you intend to send raw bytes.
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python3.7/threading.py”, line 917, in _bootstrap_inner
self.run()
File “/opt/esphome/esphome/api/client.py”, line 408, in run
self._run_once()
File “/opt/esphome/esphome/api/client.py”, line 398, in _run_once
msg.ParseFromString(raw_msg)
google.protobuf.message.DecodeError: Error parsing message
Can anyone help me? For test i have connected an esp8266 tx rx to the gpio 17 and 16 of esp32