Rain Sensor (with Solar panel and 433MHz RF)

Have a look at this nice-looking Solar RF 433MHz Rain Sensor.

image

What I like about it is that it has no wires, connectors, or batteries. Just put it anywhere outside.

Inside the house, you do need to have an RF 433MHz receiver. A Broadlink device won’t do. I use ESP32 with SRX882S RF receiver and the ESPHome firmware.

The rain sensor transmits a short set of RF codes when the sensor plate gets wet. There is no additional transmission when the sensor dries. So when wet, it stops transmitting until it dries out and gets wet again.

There is also a white silicon waterproof button on the backside with a small LED inside. Pressing the button transmits another set of RF codes.

Whenever the device transmits RF, the LED in the silicon button blinks in blue. If my ear is near the device, I hear a low-volume and high-pitched sound from it when transmitting.

Since I also want to know when there is no rain, I positioned the rain sensor at a 45-degree angle. Otherwise, water remains on it, preventing additional transmission until it dries and gets wet again.

As of yet, we have only had a few rainfalls this season. So far it has performed fine.

It has an internal 200mAh lithium battery that works well. During my tests I pressed its button and made it wet maybe 100 times with no exposure to strong light, and I could not cause the battery to drain.

The device comes with no significant documentation.

I managed to identify its transmission only with the rc-switch library running on ESPHome. Before that, I tried OpenMQTTGateway running RTL_433 and Tasmota running rc-switch but neither of them identified any transmission from this device. (It might have been a hardware issue though)

Here is the ESPHome configuration that works for me:

remote_receiver:
  pin: 
    number: 17
    inverted: True
  # Settings to optimize recognition of RF devices
  tolerance: 60%
  filter: 250us
  idle: 4ms
  buffer_size: 8kb
  dump: 
   - rc_switch

binary_sensor:
  - platform: remote_receiver
    name: "Rain Detected"
    icon: "mdi:weather-rainy"
    rc_switch_raw:
      protocol: 6
      code: "1010001100000000001010101000101000000000000000010100001111111000"
    filters:
      - delayed_off: 2s
    on_press:
      then:
        - logger.log: Rain detected. ☂
  - platform: remote_receiver
    name: "Button Pressed"
    icon: "mdi:button-pointer"
    rc_switch_raw:
      protocol: 6
      code: "1010001100000000001010101000101000000000000000010000101111000000"
    filters:
      - delayed_off: 1500ms
    on_press:
      then:
        - logger.log: Button Pressed. ⏹

I purchased this device from an AliExpress store for USD $31.30, including shipping. The seller was nice but provided very little information.

This is my first ESPHome project, I’d be happy to hear feedback and suggestions. Thank you!

2 Likes

I regret to report that this rain sensor survived only a few weeks outside until it died. The box looks good quality with good seals, but the rain still entered and filled it with water. Here are some photos:



Hi @Fallingaway24. For this project, which is my first RF project and first ESPHome project, I spent a lot of time reverse-engineering and analyzing the RF codes that this sensor sends. I took a while to find a library that consistently identified events from it. I bought a few receivers that didn’t work with it (
LILYGO® TTGO LoRa32 running OpenMQTTGateway and a Broadlink) before I built one based on ESP32. I agree that this device is expensive, but it is unique in its features that I described above and I have not seen anything like it anywhere else. It is made to work with a specific motorized window, but with this project published, people can use it for many other usages.

1 Like

I do like how it looks but, without manufacturer details about how they monitor the rain sensor, whether it’s on a time interval or worse case it’s continuously polled which severely decreases it’s life spam, I would be hesitant to buy it and use it as is. Like I said earlier, I see a lot of potential with it and you could easily turn that thing into a full weather station and even more!