Help with reading data from Arduino Mega via ESP8266

Hello all,

I have an Arduino Mega where some sensors are connected.
The Mega should send this data to the NodeMCU v3 which is integrated with espHome in HA.

Mega & ESP are connected by RX/TX serial connection.

How do I read the data from the Mega in espHome? MQTT is already installed.

Or if someone has another idea I would be very grateful, the sensor data from the Mega just need to be read.

Sensor -> Mega -> NodeMCU (ESP8266) -> Home Assistant

Merry Christmas

So I use a mega, with a Ethernet hat and it just uses mqtt directly. Guessing that might not be an option for you.

It would be cool to have the mega be wireless of course.

Could the mega be replaced with an esp32? I have considered that for my use case.

You could use a custom component in esphome to do uart comms with the mega.

You could use the arduino integration