OpenSprinkler Forums OpenSprinkler Unified Firmware Rain sensor configuration

Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #51381

    samuel.thoraval
    Participant

    Hi,

    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?

    Thanks
    Sam

    #51453

    Ray
    Keymaster

    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.

    #51635

    dgawin
    Participant

    Hi everyone,

    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.

    #51748

    samuel.thoraval
    Participant

    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?

    Thanks,
    Sam

    #51819

    Ray
    Keymaster

    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/

    #51859

    samuel.thoraval
    Participant

    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!

    #52054

    Ray
    Keymaster

    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.

    #52056

    samuel.thoraval
    Participant

    Hi Ray,

    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.

    Best regards,
    Sam

    #52150

    Ray
    Keymaster

    I checked the source code, and I am pretty sure the rain sensor logging only occurs when sensor is deactivated:
    https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/main.cpp#L604
    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:
    https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/main.cpp#L599
    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.

    #52158

    samuel.thoraval
    Participant

    Hi Ray,

    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?

    My versions:
    App Version: 1.8.1
    Firmware: 2.1.8 (1)
    Hardware version: OSPi

    Best regards,
    Sam

    Attachments:
    #52161

    Ray
    Keymaster

    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.

    #75474

    Poormonkey
    Participant

    I know this is an old post, but does anyone have this modification of the rain sensor delay that can handle something than the 240 minutes? I would like to be able to delay the rain sensor by 1-2 days after we get some rain.

    Would you care to share it? I am running hardware version 3.2AC, FW 2.2.0(1) If nobody has a compiled version with this modification and you are willing to share, I guess I need to learn how to use virtual box running linux. 😮

    Thanks…

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware Rain sensor configuration