Data from Arduino to ESP32 to Raspberry Pi

Hi guys,
i build a watering system for some of my plants and i want to monitor the sensor data in Home assistant.

I am able so send some data from the Arduino via the TX/RX pins to the ESP32, but now i dont know how to get the Data to Home Assistant and plot it. I plan to send the data from 4 moisture sensors.

The parts i have: Raspberry Pi 4, Arduino and ESP32 D1 Mini NodeMCU

Isn’t the ESP32 with esphome software enough? The ESP has GPIO, too.

@m0wlheld As i see it, you have an analog input, but digital only binary. Maybe i am missing something here.

Some GPIO are multi-purpose and with using the Analog Digital Converter sensor of esphome, you can use them to report analog values.

On the ESP32 pins GPIO32 through GPIO39 can be used.

I know that it has an ADC, but i want to send digital data from my arduino to the esp and then to the Home Assistant

Understood. My proposal was to connect the moisture sensors to the ESP32 directly and configure them as ADC inputs in ESPHome. ESPHome has a native integration in Home Assistant (which will actully pop-up as soon as your ESPHome-flashed devices starts).

Use esphome on the esp32. Use the UART text component I pointed to earlier.

@m0wlheld: I dont want to connect the moisture sensor directly to the esp32. I use the sensor as input data for the Arduino system. Besides that, i prefere digital data so i have less disturbance.

@nickrout: I am a beginner and would need some guidance.
In the UART example it is written
"Store this file in your configuration directory, for example “uart_read_line_sensor.h”
How do i do that? Is that something i have to do on the microSD card of the raspberry PI4?

Or do i have to do it in the Home Assistance interface in my browser? If it is here, where exactly? I have a “Configuration” in my menu and there is a “Skript” option, but i don’t think thats the right one.

So nobody can help me?

The directory where you store the esphome yaml file.