OpenSprinkler Forums OpenSprinkler Unified Firmware Handling Sprinkler bans

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #60870

    JohnDB
    Participant

    I live in Perth WA where water restrictions are in place (June – August) and decided to add the functionality to 2.18 firmware.
    If anyone is interested I create a GIT repository (This would not be a fork as I would only put up the diff files) for it but please be aware there are whole lot of downsides to using this adjusted software. The main two are that one it breaks the API and therefore both the web interface and mobile application don’t work.
    I have gone down the track of adding the functionality to the UI and hosting it locally then built the Android app with same for myself.
    Also it is hacked together so not sure what other functionality it breaks as I have not really tested it fully as it works for my user case.

    Long term I would love to see the functionality in the official version but from previous posts I don’t think there is enough people with the usage case.

    #60933

    Ray
    Keymaster

    The ability to disable/enable watering during a certain calendar window of a year has been requested several times by users, so yes this would be a very useful feature. It would be great if you can share your GIT. Could you briefly explain how it breaks the API? I would think that it should add some additional command to the API instead of removing or breaking it, so would like to know specifics. Thanks.

    #60976

    JohnDB
    Participant

    Hi Ray
    I added them to the already existing /cp? API as per the following: –
    pid=0&v=[3,34,0,[180,0,0,0],[0,900,1200,900,900,900,900,900,0,900,900,0,900,900,0,0],[6,8]]&name=Normal

    I have added the files below no GIT as yet, I suddenly feel I may have approached this incorrectly and created more problems than solutions. If you feel that this is the incorrect approach give me a high level indication of the approach you would prefer and I will have a look to see if I can implement.

    Attachments:
    #61026

    Ray
    Keymaster

    Got you. The zip file you attached is fine, I can do some diff myself to find out the differences.

    One quick question: in your implementation the restriction range is in granularity of month. I would think some areas impose restrictions in granularity of days, like June 15 to Aug 20, or something like that, no?

    #61028

    JohnDB
    Participant

    Currently month only granuality as that is what the local authorities want. It probably wouldn’t be to difficult to change that to a particular start/stop day just more head scratching on my part.

    I’ve created two four bit fields in structure programStruct in program.h as the range for both should be between 0 – 12. 0 for none and 1 to 12 Jan – Dec then added a check in check_day_match function in program.cpp. These are the only two changes that I have made to the main functionality the rest is for all the json and api stuff.

    #63727

    vk6
    Participant

    Hi John, Ray

    I live in Perth too and I was wondering if the code can be enhanced to suit Perth requirements? Unfortunately, I am not a programmer so the code is going above my head 🙁

    Eg.
    INPUT 1> Enter house number:
    INPUT 2> Do you use a bore (Y/N)?:
    INPUT 3> Would you like to use seasonal adjustments (Y/N)?:

    The code would check for winter ban (June-Aug), and illegal watering times (9 am to 6pm) and alert us.

    Based on INPUT 1 and 2, the days to be selected would be per this link: https://www.watercorporation.com.au/home/faqs/saving-water/how-are-my-watering-days-determined

    If INPUT 3 is selected, then monthly adjustments are carried out per this table: https://www.watercorporation.com.au/save-water/in-the-garden/sprinklers-and-irrigation (this includes the winter ban)

    We could get fancier if we wanted too:
    A> WATERING EXEMPTIONS:
    INPUT 4: New lawn exemption (y/n)
    INPUT 5: (If exemption =y), start date of exemption:

    This would then water the lawn as per this table: https://www.watercorporation.com.au/save-water/watering-days/exemptions

    B> PRE-SUNRISE WATERING
    Sunrise times for Perth are collected, and the watering times adjusted so that watering finishes at sunrise. Ideal for lawns.

    C> STANDARD DRINK
    Based on the standard drink (10mm), zones can be adjusted based on the sprinkler type (https://www.watercorporation.com.au/save-water/in-the-garden/sprinklers-and-irrigation). Probably combine it with Evapotranspiration values?

    #63855

    mpfl
    Participant

    I’m in Perth as well – just had my retic installed this week. Would love to be able to disable watering based on date. Keeping it simple would make it more versatile and useful for people elsewhere in the world.

    #63915

    JohnDB
    Participant

    The zip file above is still the latest from me as I have not looked at it for some time. Obviously you have to implement the patches build both the firmware and the application (I only ever built the app for Android) which make it difficult.

    If I get a chance I will revisit the changes but I am find the spare time hard to come by these days.


    @vk6

    While they would be nice to have I don’t like your chances as some of the requests are specific to WA so implementing on a device that is global doesn’t make sense. If I do get a chance to look at it again I may add day and/or time but even that given my limitations probably won’t happen. Ray also would need to accept any changes specially from the web server side unless people are self hosting or using a patched app.

    #64236

    rsmallri
    Participant

    I am in Perth as well. I just replaced my rainmachine controller with a opensprinkler as I needed the ability to drive two master solenoids. I did not think to check whether it could handle sprinkler bans like the rainmachine could. It would be great if this feature could be added.

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

OpenSprinkler Forums OpenSprinkler Unified Firmware Handling Sprinkler bans