Tagged: rain sensor
July 25, 2018 at 10:24 am #51381
sorry in advance for the dummy question.
I can’t rely on the wheather data as the wheather is much variable at only 5km distance or less in my region? Therefore, I want to delay rain by for instance 3 days using my normally closed rain sensor.
However, I find the configuration quite confusing – I’m not sure what weather adjustment method I should use : Auto Rain delay together with adjustment method option set to 72 Hours and Attached sensor type Rain? The adjustment method mentions “weather reports suggesting rain” but I don’t want to stop watering based on weather report suggestions due to too much inaccuracy as stated above and instead only du to the rain sensor… Is that possible?
SamJuly 27, 2018 at 7:10 pm #51453
Weather adjustment methods rely on online weather data, those are independent of your rain sensor, which is your local sensor that does NOT depend on online weather data. If you want to only use rain sensor, please select ‘Manual’ as adjustment method, and configure your sensor as Rain sensor and use that.August 8, 2018 at 12:25 pm #51635
I have connected a simple rain sensor. just want to be sure I have the principle understood correctly.
if it is raining, the sensor will be active, should a program start in this period until the sensor has dried, this will be skipped by the opensprinkler.
So there is no delay of the program, but the program is discarded.August 17, 2018 at 9:00 am #51748
Same question from me, I don’t understand how the rain sensor will delay the watering. It seems there is no parameters to control this?
SamAugust 17, 2018 at 9:59 pm #51819
The rain sensor itself has a way to control rain delay time, through controlling water evaporation inside the sensor. I have an early blog post that discusses this:
https://rayshobby.net/wordpress/using-rainfreeze-sensor-with-opensprinkler/August 18, 2018 at 1:05 am #51859
Many thanks for the clarification, Ray!
It rained on the 9th at home and it is logged which is great. The way it is logged is it gives a duration of 1 day 1 hour 45 min and 5 sec, time was 1:32pm and the “station” was the rain sensor.
From this I understand that the rain sensor detected enough rain at 1:32pm to release the signal, and that it dried out around 25 hours later. However my assumption doesn’t look correct as the lawn watering did occur the next day at 5am although I’m not ignoring rain on that station and this is only roughly 15h after rain was detected?! Do I miss some configuration or do I misunderstand the rain sensor logs?
My last question is I’d like to bypass the rain sensor delay and set for instance a 2 days rain delay when rain is detected. Are there any guidance which code bits to change/how to use the software API? What is a good starting documentation for this?
Many thanks for all the help and for the great Open sprinkler Pi!August 18, 2018 at 8:04 am #52054
If I remember correctly, the time stamp that you see (1:32pm) is when the rain sensor deactivated (generally the time stamp indicates when some event has ended, not when it has started).
Currently the firmware does not support bypassing rain sensor delay, because rain sensor has built-in delay. If you want to trigger a fixed amount of rain delay when rain is defected, using Auto Rain Delay as weather algorithm is the best option — it uses online weather data, which I understand is not as ideal as using your own rain sensor, but that’s the closest to what you need.August 18, 2018 at 2:50 pm #52056
actually, the heavy rain started on the 9th 1 to 2 hours before the time stamp from the logs so that the time stamp should indicate when the event started. I’ll pay attention to the next rain and check if I still have the same problem.
What I would like to do is still call the API upon receiving the signal from the rain sensor so that I can autmatically set a software rain delay. If the sensor delay is larger than the software delay – that’s fine! If it is shorter (what happened so far) then I still want to delay further. The logic behind is the region where I live (Provence in south of France) has around 4 months of drought in summer and I favor heavy watering at low frequencies so plants can grow roots in depth, and I also want to save water…
Also I can’t customize the delay on my Toro rain sensor (as far as I understand, and in any case it wouldn’t be precise). It’s a nice feature to bypass the sensor (offered by other irrigation controllers) although I understand I can’t bypass by having a shorter delay – which is not what I want anyway. Bypassing to ensure a minimum delay should still be possible though?!
Any pointers where to find more details how to extend the current software code would be highly appreciated.
SamAugust 20, 2018 at 7:53 am #52150
I checked the source code, and I am pretty sure the rain sensor logging only occurs when sensor is deactivated:
so the time stamp is the moment it ended, not when it’s started.
Given that the rain sensor itself has a delay (which cannot be predicted), how do you want the manually set rain delay to interact with it? For example, when it rains, the rain sensor may be activated for 8 hours. If you want to have a manual 24 hours rain delay, do you mean 24 hours from the start of the rain, or 24 hours from the end (of the 8 hours)?
If you want the manual rain delay to be on from the beginning of the rain sensor activation, the easiest way is to go to this section:
which is where rain activation is detected, and add the following lines:
os.nvdata.rd_stop_time = os.now_tz() + (unsigned long) ?? * 3600; os.raindelay_start();
where ?? is the desired number of hours. This way, it makes use of the rain delay function, which guarantees that it stops watering for that number of hours, and by the time that ended, if the rain sensor is still activated, it will continue holding off watering until rain sensor is deactivated. So this will whichever is longer, between the manual rain delay and rain sensor activation.August 20, 2018 at 9:29 am #52158
thanks for your answer. Yes I would like to add a fixed amount of time starting from the beginning rather than the end of the rain delay.
I manually verified the log time stamp as my rain sensor can be tested by pressing on top of the sensor and I can assure you the time stamp is when the rain sensor is first activated. In fact I’m glad it does as this is what makes more sense to me (I want to see the message that the rain sensor is activated on the OS GUI and want to know when rain delay started in the logs). Could it be the reason why the watering still occured on my post above the 9th of August? That is, that the code receives the signal when the rain sensor actually starts but the code assumes it is the signal end and triggers the end of the rain delay when it should be the begining? The outcome would be that there is eventually no rain delay. I will make another test soon to double check this.
I pushed the test button on the rain sensor at 16:02:31 displayed on OSPI web interface and waited till 16:05 to release the button. I can clearly see in the logs that the time stamp is 16:02:31 and runtime 2m 34s. Please see the attached screnshoot.
Sorry for the question coming from someone who isn’t used to coding in cpp: is there a way to extend the code with other languages such as python or perl?
App Version: 1.8.1
Firmware: 2.1.8 (1)
Hardware version: OSPi
Attachments:August 20, 2018 at 10:05 am #52161
OK, then it must be that the UI/app subtracts the duration from the end time, so what’s displayed in the log is the start time. What I was saying on the previous post is that what’s recorded in the log data is definitely the end time (and it also records the duration). The UI is most likely calculating the start time using the two numbers.
- You must be logged in to reply to this topic.