Hydreon RG-15 rain sensor

Is it harmful to set the update interval to 2 seconds?
Or is there another way to be informed from the RG-15 immediately
When the update interval is set to 60 seconds, the awning is already wet :wink:

No personal experience, but I’d love to see ESPhome support the RG-15! Maybe someone else can chime in, or we could collaborate on porting the Arduino code.

@arnoldmatt ESPhome already supports RG-15. I have had mine running for about 12-months.

Hello @kobelka … I have done similar. However, I run the automation in Home Assistant. I have created a template and as soon as the rain sensitivity is over 0.1mm it is raining. Otherwise I find that the sensor can be too sensitive and be triggered by sunlight, mist, spray, dirt etc etc. I record rain a long time before my Velux roof windows start shutting (a seperate Velux sensor)

I note that on the RG-15 facts page it suggests that the Rain Event can be used as trigger rather than intensity. I assume there is an algorithm in the RG-15 only starts a Rain Event when a level of intensity over a period of time is being recorded (which perhaps might be closer to 0.1mm rain intensity; but I have not tested it)

The unit is running constantly in recording rain events and total rain. So I am guessing setting update_interval to say 1s is irrelevant; all it is doing is checking in with RG-15 to see the current sensor state. I would suggest 10s would be fine?

Have you set up Utility Meter in HA to record rain total for hour, day, week, month?

Edit 1: page of faq

Out of interest using Utility Meter, Apex Charts and weather forecasts to show past and future rainfall in one chart
Edit 1: Note that rain intensity as highest resolution returns data but it does NOT trigger a Rain Event in RG-15. As it should be.

Hi @JulianDH ,
I don’t know how that works for you. It rained here this morning, but the values ​​displayed were always below 0.1. So it wouldn’t have been rain with your automation.

This shows what my sensor was reporting today:

The rain event starts on the first 0.01mm rain, accumulates the rain events over time and resets to zero after some time. I don’t know what is the time until the reset, it is not the same for all rain events.

1 Like

The event ends 60 minutes after the last raindrop.

Thank you, good to know.

I have created a template and as soon as the rain sensitivity is over 0.1mm it is raining

@JulianDH do you really mean 0,1mm ? I had a day light rain with 0,01mm.
Which update intervall do you have ?

Indeed 0.1mm. I have sensitivity set to 0.02mm and found that condensation would trigger it. I think it is entirely down to what the automation requires. My velux and hunter Hydrawise sensors I suspect are closer to 0.1mm but I will test over the summer. At the moment the only thing the template does is a warning conditional tile flag on my dashboard that is raining. On my to do list to investigate a bit more.

Don’t you have any problems with the midday sun? Every midday I get rain reports.

Can you please explain to me the main difference between the RG-9 and the RG-15. I want to measure the amount of rain in mm/h.

FYI, I gave up on the RG-9 when it suddenly died and I could no longer get serial comms to/from it.

I have since switched to a WeatherFlow Station which already has a good integration in HA but does depend on the cloud at this time. I’ve been using it for over a year and it is great.

Only thing I needed to do is put the base station on a smart outlet and have an automation cycle power to reset it once a week.

Hi, i’m intrested in what are you done with RG-15 and i need to to something like this in my home. Can you share with us more information, like the yaml file and other things?

Thank you

Hello he posted his yaml above (post 56) and I have posted my Apex Charts I am using above if that is what you would like?

1 Like

In addition i created utility helpers for the hourly, daily and monthly rainfall.

for utility meter option

The input sensor is the rain event sensor of the RG-15 device (see yaml).

1 Like

Thank you very much

I have had a RG-15 sensor in my possession for a few years… I finally reworked my ESPHome Weather Station to include it and replace a faulty BME280 sensor.

Here is my working configuration using ESP32Dev board, absent my include that does all the things for ESPHome and HomeAssistant. Pictures attached as well.

Pictures:


Yes, I know the bird feeders are empty… and yes, those are mini slinkys to keep squirrels away! :slight_smile:

Configuration:

#####################################################################
# Weather Station
#
#  - BME280 (Outside)
#    - Temperature
#    - Humidity
#    - Pressure
#  - Dallas
#    - Temperature (Case)
#  - Hydreon rg15
#    - Rain
#    - Rain Event
#    - Rain Total
#    - Rain Intensity
#
#####################################################################

########################
# Variable Substitutions
########################
substitutions:
  device_name: "weather-station"
  entity_prefix: "esphome_weather_station"
  entity: "weather_station"
  esphome_board: esp32dev
  log_level: DEBUG


########################
# Package Includes
########################
packages:
  default: !include include/default_esp32.yaml


########################
# ESPHome Status LED
########################
status_led:
  pin: GPIO32


########################
# OneWire Bus
########################
one_wire:
  - platform: gpio
    id: one_wire_bus_0
    pin: GPIO23


########################
# I2C Bus
########################
i2c:
  id: i2c_bus_0
  sda: GPIO21 # ESP32 Default
  scl: GPIO22 # ESP32 Default
  scan: false
  frequency: 50kHz


########################
# Hydreon RG15 UART
########################
uart:
  id: rg15_uart
  tx_pin: GPIO17
  rx_pin: GPIO16
  baud_rate: 9600
  debug:
    direction: BOTH
    dummy_receiver: false
    after:
      delimiter: "\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);


########################
# Binary Sensors
########################
binary_sensor:

  - platform: hydreon_rgxx
    hydreon_rgxx_id: "hydreon_rg15"
    lens_bad:
      name: "Hydreon RG15 Lens Bad"
      id: hydreon_rg15_lens_bad
      entity_category: "diagnostic"
      publish_initial_state: true
    em_sat:
      name: "Hydreon RG15 Emitter Saturated"
      id: hydreon_rg15_em_sat
      entity_category: "diagnostic"
      publish_initial_state: true

  # Updated from hydreon_rgxx component
  - platform: template
    name: "Rain"
    id: binary_sensor_rain
    device_class: moisture
    icon: mdi:weather-rainy
    publish_initial_state: true


########################
# Text Sensors
########################
text_sensor:

  # Updated from hydreon_rgxx component
  - platform: template
    name: "Rain Intensity Class"
    id: text_sensor_rain_intensity_class
    icon: mdi:weather-pouring


########################
# Sensors
########################
sensor:

  # Hydreon RG15
  - platform: hydreon_rgxx
    id: "hydreon_rg15"
    model: RG_15
    uart_id: rg15_uart
    update_interval: 60s
    resolution: high
    acc:
      name: "Rain"
      id: sensor_rain
      accuracy_decimals: 4
      on_value:
        then:
          - if:
              condition:
                sensor.in_range:
                  id: sensor_rain
                  above: 0.0001
              then:
                binary_sensor.template.publish:
                  id: binary_sensor_rain
                  state: true
              else:
                binary_sensor.template.publish:
                  id: binary_sensor_rain
                  state: false
    event_acc:
      name: "Rain Event"
      id: sensor_rain_event
      accuracy_decimals: 4
    total_acc:
      name: "Rain Total"
      id: sensor_rain_total
      accuracy_decimals: 4
    r_int:
      name: "Rain Intensity"
      id: sensor_rain_intensity
      accuracy_decimals: 4
      # https://en.wikipedia.org/wiki/Rain#Intensity
      on_value:
        - if:
            condition:
              sensor.in_range:
                id: sensor_rain_intensity
                below: 0.00001
            then:
              - text_sensor.template.publish:
                  id: text_sensor_rain_intensity_class
                  state: "Clear"
        - if:
            condition:
              sensor.in_range:
                id: sensor_rain_intensity
                above: 0.00001
                below: 2.5
            then:
              - text_sensor.template.publish:
                  id: text_sensor_rain_intensity_class
                  state: "Light Rain"
        - if:
            condition:
              sensor.in_range:
                id: sensor_rain_intensity
                above: 2.5
                below: 7.6
            then:
              - text_sensor.template.publish:
                  id: text_sensor_rain_intensity_class
                  state: "Moderate Rain"                
        - if:
            condition:
              sensor.in_range:
                id: sensor_rain_intensity
                above: 7.6
                below: 50
            then:
              - text_sensor.template.publish:
                  id: text_sensor_rain_intensity_class
                  state: "Heavy Rain" 
        - if:
            condition:
              sensor.in_range:
                id: sensor_rain_intensity
                above: 50
            then:
              - text_sensor.template.publish:
                  id: text_sensor_rain_intensity_class
                  state: "Violent Rain"

  # Case temperature using Dallas 1-Wire Sensor
  - platform: dallas_temp
    id: case_temperature
    one_wire_id: one_wire_bus_0
    resolution: 12
    address: 0x800316A279D2D828
    name: "${entity_prefix}_case_temperature"
    icon: mdi:home-thermometer-outline
    entity_category: "diagnostic"
    filters:
      - offset: -0.22
      - sliding_window_moving_average:
          window_size: 10
          send_every: 2
          send_first_at: 2

  # BME280 Temperature, Humidity and Pressure
  - platform: bme280_i2c
    i2c_id: i2c_bus_0
    address: 0x76
    update_interval: 1min
    temperature:
      id: outside_temperature
      name: "Outside Temperature"
    pressure:
      id: outside_pressure
      name: "Outside Pressure"
    humidity:
      id: outside_humidity
      name: "Outside Humidity"

  - platform: template
    name: "Outside Altitude"
    lambda: |-
      const float STANDARD_SEA_LEVEL_PRESSURE = 1013.2074890666767; //in hPa, see note
      return ((id(outside_temperature).state + 273.15) / 0.0065) *
        (powf((STANDARD_SEA_LEVEL_PRESSURE / id(outside_pressure).state), 0.190234) - 1); // in meter
    update_interval: 15s
    icon: 'mdi:signal'
    unit_of_measurement: 'm'
    device_class: distance
    filters:
      - sliding_window_moving_average:
          window_size: 10
          send_every: 2
          send_first_at: 2

  - platform: absolute_humidity
    name: "Outside Absolute Humidity"
    temperature: outside_temperature
    humidity: outside_humidity

  - platform: template
    name: "Outside Dew Point"
    lambda: |-
      return (243.5*(log(id(outside_humidity).state/100)+((17.67*id(outside_temperature).state)/
      (243.5+id(outside_temperature).state)))/(17.67-log(id(outside_humidity).state/100)-
      ((17.67*id(outside_temperature).state)/(243.5+id(outside_temperature).state))));
    unit_of_measurement: °C
    icon: 'mdi:thermometer-alert'
    device_class: temperature
    filters:
      - sliding_window_moving_average:
          window_size: 10
          send_every: 2
          send_first_at: 2
1 Like