OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) New Plug-in concept : forecast-based water delay

  • This topic is empty.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #22997

    scottsh
    Participant

    Folks, I have an idea for a very simple OSPi plug-in I wanted to get some feedback on.

    Summary: Given a location (zip code or lat/long) and a given target percentage, delay watering by a day whenever the NWS projected precipitation forecast percentage exceeds the target.

    Example: Assume the target to 70%. Every day at midnight the plugin would pull the current days forecast and if it exceeds 70%, then it would set the equivalent of ‘raindelay = 1 day’ in the OSPi program.

    Does that make sense?

    Should the software keep doing that day after day regardless of if there was rain or not? Should there be perhaps a limit on ‘max delayed days’ before it just ignores and waters anyway?

    Thoughts?

    #27336

    Dan in CA
    Participant

    Hey Scott,

    This could be useful, especially if it included input from a rain sensor. If it did not actually rain, or if the plugin checked NWS the following day to see how much rain there actually was it could adjust irrigation based on that.

    Dan

    #27337

    rederikus
    Participant

    +1

    I too was hoping for this. scottsh has it right. If the weather forecast says it is going to rain, it might. If it says it is not going to rain, it might or, might not. The problem with ZIP code weather is that weather is just so fickle as to which parts of a given ZIP code it actually precipitates upon. Unfair really.

    As scottsh says, a real world rain sensor is the only way that the system can be sure but

    if it exceeds 70%, then it would set the equivalent of ‘raindelay = 1 day’ in the OSPi program.

    Cool stuff.

    #27338

    Zapp
    Participant

    +1

    It would be even cooler if it worked world wide!

    I’m based in Sweden…

    Can’t Weather Underground be used for this in any way?

    /Jonas…

    Skickat från min Nexus 7

    #27339

    Samer
    Keymaster

    I have started coding this and basing it on the rain based delay in my older PHP webapp. I should have a working plugin soon and it will be compatible with my native app once completed.

    #27340

    scottsh
    Participant

    That’s awesome – I can’t wait to see it! 🙂

    #27341

    scottsh
    Participant

    Oh by the way, I have some code to pull US NWS forecast data in XML via a PHP script if needed. I have attached that. Also, I believe they also have a JSON-formatted data feed.

    WU has that data also, however their information is not free. You can sign up for a developer API key for free, but it is limited on how much data you can request per hour and per day.

    Scott

    #27342

    Samer
    Keymaster

    Thanks for that! This is what I have so far: https://github.com/salbahra/OSPi

    The project got delayed a few days since my laptop is being repaired.

    #27343

    scottsh
    Participant

    Looking good! I especially like how you’ve allowed forecast data from either WU or Yahoo.

    #27344

    eecyclone
    Participant

    I’ll have to wait for a tutorial on how to try this out on my OSPi.

    An idea for the future- you could add a feature that compares WU and Yahoo against one another to get more confidence in the chance of rain.

    #27345

    Samer
    Keymaster

    This plugin is now working (same repo as earlier). I will do some further testing and complete the integration with my mobile app but any feedback at this point would be appreciated.

    Thanks!

    Update: Dan has kindly merged this plugin into his main branch. Feel free to try it out there too. Mobile app support is now complete pending final testing and release.

    #27346

    scottsh
    Participant

    It looks good. It is working for me, although it hasn’t actually kicked off yet – I’m hoping I’ll see it work later today when it rains.

    Are you going to add the ability to delay based on a forecasted chance of rain? I think it should also look at the days forecast and if it sees a specified % chance or higher, it should delay that as well.

    This way it won’t water at 3am when the forecast for rain in the evening is say greater than 80%. Thoughts?

    Scott

    #27347

    Samer
    Keymaster

    I think that’s a great idea! I’ll be honest though, I don’t own an OSPi or even a Raspberry Pi.

    I wanted to lay the ground work and also bring the features users had when using the PHP based web app in this plugin.

    Basically, I am hoping the community takes over the plugin and contributes to it. If time allows, I can look at coding the forecast check myself. A lot of the grunt work for forecast reading was done by user @charvel and used in my mobile app and likely easily ported to Python for plugin use (both Yahoo and Wunderground).

    Thanks!

    #27348

    scottsh
    Participant

    Ah consider the community motivated to contribute :). I’ll add that.

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) New Plug-in concept : forecast-based water delay