esphome-rain-detector icon indicating copy to clipboard operation
esphome-rain-detector copied to clipboard

Sensor text "Watching" and not "Raining"

Open PepereLoulou opened this issue 2 years ago • 5 comments

Hello,

On HA, the sensor text return "Raining" for 50 seconds and then it's return "Watching". But it's always raining...

After that, it's never return "dry", "drying" or "raining"...

Désolé pour le mauvais anglais. Je pense que je n'ai pas bien compris comment paramétrer le module. Sec j'ai 41000 ohm. En dessous de 30000 ohm, c'est mouillé.

TODO: Handle case where resistance higher than max_resistance

Skip the value not in the range min_resistance: "1000" max_resistance: "500000"

Value of the resistance at which a significant change is considered to occur rain_detection_threshold: "30000"

If the resistance increases by this value, the sensor is considered to be dry dry_detection_threshold: "30000"

When booting, if the resistance is lower this value, assume sensor is wet wet_resistance_when_booting: "30000"

PepereLoulou avatar Nov 08 '22 00:11 PepereLoulou

I know it is old topic, but just found out & try.. Having same experience as above. Could something went wrong? (Copied exactly as the original code except other network particular etc..) Or is it that is the behavior developer intended? As in only for a while the text sensor will display Raining (roof will closed) then turn to watching, then turn to drying (roof will open) when rain stops? I would need something like a card displaying "rain" when its raining outside.

kenny117s avatar Dec 14 '22 04:12 kenny117s

Dear friends @PepereLoulou @kenny117s @hugokernel @dougiteixeira ,

Same problem. The esp32 starts always wet and the rain board is dry. Under normal conditions the resistance of my boar is 40.373,6 Ω. When i put some water in the rain board the text shows raining correctly, but after never shows drying. Could someone explain a little more how it works? or does the code have some error? Have you been able to solve the problem? I'm interested in this working correctlythanks in advance. Kind regards

kitopopo avatar Nov 19 '23 16:11 kitopopo

Hi, currently, I have no time do test it but maybe, you can try to do some test (I think the code is really simple) and I can help you to understand.

hugokernel avatar Nov 20 '23 08:11 hugokernel

Hi, currently, I have no time do test it but maybe, you can try to do some test (I think the code is really simple) and I can help you to understand.

Hi @hugokernel friend , thanks for your answer. I have tested the code this week, the code works well with a 10kohms resistor flashed on an ESP32, I obtain a resistance around 40.000 ohms at the beginning of the ESP32 startup and the sensor in a dry state, taking a measurement every 5 seconds in dry conditions. When i add water change correctly to raining and after drying and dry. The problem I have is that randomly every 10 or 15 minutes (sometimes 2 hours) I have false measurements such as, for example, 38.000 or 39.500 or 37.000 where the sensor should always measure 40,000ohms. I have tried with another esp wroom 32 board (another brand) and I get the same problem but on a wemos d1 mini it works fine (obviously dissabling the attenuation since it is not supported by this board and changing the multiple value from original code 0.846153 to 2.656153 where I also get a measurement of 40.000ohms with tha same resistor of 10kohms. But in this case I don't get false measurements on this board, always 40.000ohms in dry conditions. Has anyone had this problem and been able to solve it? I would like to use esp32 instead of wemos d1 mini. I have tryied change all values, refresh time,update interval, stabilization delay, but the problem persists. The 40.000ohms is a correct value? The rain board have a infinite value, is strange. I have changed the max resistor value from 500.000 to 40.000 (if i don't change this value the esp32 starts watching instead dry. Thanks by the project and thanks in advance. Good regards

kitopopo avatar Nov 24 '23 18:11 kitopopo

@hugokernel Is there a solution to the problem or are we misunderstanding the sensor?

Is it the case that the sensor indicates "rain" for a moment when an event such as "it's raining" occurs, so that an automation can be started and then the status is "watching" until the conditions for the next status "drying" are met?

I also use an ESP32 and can certainly see that there are various status messages, but these are so short that they are lost in the mass of "watching" if no corresponding automation is triggered.

Nevertheless, it would be great if there was a way to display the current status until the next event. Can you adapt the code accordingly?

PedroArkanson avatar Jun 22 '24 10:06 PedroArkanson