June 6, 2019 at 7:47 pm #60870
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.June 9, 2019 at 4:09 am #60933
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.June 10, 2019 at 3:34 am #60976
I added them to the already existing /cp? API as per the following: –
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 3 months, 1 week ago by JohnDB.
Attachments:June 12, 2019 at 2:43 am #61026
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?June 12, 2019 at 6:01 am #61028
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.
You must be logged in to reply to this topic.