OpenSprinkler Forums OpenSprinkler Mobile and Web App More simple weather program

  • This topic has 4 replies, 2 voices, and was last updated 6 months ago by Ray.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #68089

    piaband
    Participant

    The current programs based around weather updates don’t work for me. I was thinking about what would work better and I’m wondering if this is possible. I’ll be honest – I have an early OpenSprinkler system and I haven’t kept up with all the feature changes.

    The weather program I’ve seen changes watering schedule as a percentage based on ambient temperature. The problem for me is that I don’t need to water longer or shorter based on outdoor temps and outdoor rain- I just need to put down 1” of water per interval. For higher outdoor temps, I would like to water 2X per week. For lower temps, I’d like to water 1X per week.

    So my ideal program would look like this

    If over 85F, water every 3 days (cancel scheduled run if rain sensor engaged within previous 3 days).

    If under 85F, water every 7 days (cancel scheduled run of rain sensor engaged within previous 5 days).

    I feel like this would be a better solution than percentage based watering. I don’t think it makes sense to put down more water just because it’s hotter. All of that water just soaks below the root zone anyways.

    #68091

    Ray
    Keymaster

    There are several possible ways to implement a custom weather algorithm, but first of all, please understand that to translate this idea to algorithm, it needs to be more precisely defined. In your example, a condition like ‘If over 85F’ needs to be defined more precisely: did you mean the maximum temperature of a day, of the past 3 days, of the past week, or average temperature, or what is the temperature referring to? Also the action ‘water every 3 days’ — how long should this action persist before it re-checks the condition again? For example, if yesterday’s max temperature is more than 85, but today it’s less than 85, what should be the appropriate action?

    In short, while your description seems intuitive and makes sense, to translate it to a computer algorithm requires more precise description.

    #68096

    piaband
    Participant

    Hi Ray. Thanks for the comment. I figured there would be more involved in my request.

    Here’s what I would think

    I would say, if hi temp over the last 7 days is over 85, trigger “X program” to run every 3 days. Cancel run if rain sensor triggered in last 3 days.

    If hi temp is less than 85, trigger “X program” to run every 7 days. Cancel run if rain sensor triggered in last 5 days.

    Hi temperature is really what I think is important as even one day of high temperature will zap the water out of the grass. To be honest, I would want to play around with that temp a bit. I’m not sure if 85 is exactly the right temp. I think maybe closer to 90 makes more sense. But I’m sure that would all be manageable.

    #68110

    piaband
    Participant

    Hey Ray. If you can point me to how to make a custom weather algorithm, I can work on this myself.

    Is there a template to work from? How do you load the algorithm on the OpenSprinkler?

    #68112

    Ray
    Keymaster

    As I said, there are several ways to implement a custom weather algorithm. Here are the details:

    1. The best and the easiest way is to make use of the OpenSprinkler HTTP API and have a computer or server (such as a linux machine, a raspberry pi would suffice too) send command to OpenSprinkler to update the watering percentage, or to change program settings as needed. The advantages of this approach include: no need to modify OpenSprinkler firmware; you can use any programming language of your choice, and it’s easy to make changes to the weather algorithm. The only downside is it requires another computer, but as I said, you can use a raspberry pi, which is very cheap.

    2. You can also change the firmware on OpenSprinkler. The advantage of this is that it does not requires another computer, but it has many downsides, mainly that changing firmware is more difficult, you are limited to use C++ as that’s what the firmware is written in, and it runs on the microcontroller so the computational cost is more restrictive. Firmware compilation instructions are here.

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

OpenSprinkler Forums OpenSprinkler Mobile and Web App More simple weather program