OpenSprinkler Forums OpenSprinkler Unified Firmware Handling Sprinkler bans

This topic contains 4 replies, has 2 voices, and was last updated by  JohnDB 1 week, 6 days ago.

Viewing 5 posts - 1 through 5 (of 5 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.

    • This reply was modified 2 weeks, 1 day ago by  JohnDB.
    Attachments:
    1. OpenSprinkler.zip
    #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.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware Handling Sprinkler bans