Need Help Integrating DFRobot SEN0575 Rainfall Sensor (I2C/UART) in ESPHome

Hi everyone,

I’m developing a weather station project to help me in the garden.

I’m hoping to get some community assistance with integrating the DFRobot Gravity: Digital Rainfall Sensor (SEN0575) into my ESPHome project running on an ESP32.

The Goal:

Read rainfall accumulation (mm) and rate (mm/h) from the SEN0575 sensor via its I2C interface and make these values available as sensors in Home Assistant via ESPHome.

What I’ve tried:

  1. Built-in Components: Confirmed there’s no native ESPHome component for the SEN0575 I2C interface.
    Pulse Counter: Initially explored using platform: pulse_counter, but realised my sensor version doesn’t have a separate pulse output pin – only I2C and UART are available, but I’m really not sure how to use them in this situation.

  2. platform: custom with the official DFRobot Arduino library: GitHub - DFRobot/DFRobot_RainfallSensor. I’m attempting to use this library within a platform: custom component in my ESPHome YAML. Haven’t managed to make it work.

  • I2C Bus: Already working, successfully communicating with other sensors (BMP280, AHT20) on the same bus (SDA: GPIO21, SCL: GPIO22).

Request for help:

Has anyone successfully used the SEN0575 or any other rainfall sensor in ESPHome?
Has anyone any idea about how I could make this work ?

Any guidance, code snippets, or suggestions would be incredibly helpful!

Thanks for reading and good evening !
Alex

1 Like

This looks like it is going to be an advanced project. The documentation on the sensor is limited and the provided code doesn’t make it easy to understand.

It likely is possible to make it work, but that means creating an external component for it. Doing that is challenging at best.

Here is the schematic:

You could use the RJ connector (middle 2 pins) with pulse counter. You will need to provide your own pull-up and capacitor to get a better signal.