more G-Labs products

Author Topic: Garden Sprinkler System App  (Read 15064 times)

February 26, 2015, 04:46:52 PM
Reply #15

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I have a pair of Rain Bird sprinkler controllers that have served the home for probably 20+ years.  They work, but don't understand to NOT water when it's raining or about to rain.  If I see that it will rain in the forecast, I have to manually suspend the timer for that day which isn't tragic, but not exactly "automation".  I'm adding a weather station in the near future so this is an app that I've been watching closely from the beginning.

February 26, 2015, 07:19:44 PM
Reply #16

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
Adding some code for rain and wind conditions is easy to do. I'm currently 5000 miles away from home, but when I get back in a week or so I will add these features. It will most likely be based on the the "jkUtils - OpenWeatherData" app as data provider.
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

February 26, 2015, 10:26:00 PM
Reply #17

lv2roc

  • *
  • Information
  • Newbie
  • Posts: 17
Very happy to see your post, enterprised. Since you did not mention a definite for going with OpenweatherData, I would like to see about using Weather Underground. Only reason is that I use a personal weather station that is connected to Underground.
Buy hey, you are coding it so I can change. Just wanted to add my 2 cents.

February 26, 2015, 10:39:05 PM
Reply #18

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If the code is written correctly, it will pull data stored on HG.  Then, you just need HG to pull the data from the web site and store it somewhere.  The wind and rain data are included in the output of WU and presumably OpenWeather, so it shouldn't matter where the data comes from!  The primary difference would be calling the right location in HG parameters to get the data that's already stored.

March 04, 2015, 02:27:24 AM
Reply #19

lv2roc

  • *
  • Information
  • Newbie
  • Posts: 17
Hope I am not making suggestions to complex for this app but I have another that would be useful.

To have active time for each group or groups.

For example the group (or valve) for my front lawn would need to be on longer that the group (or valve) that control the sprinkler head in my garden.

I would be nice to have different duration times for different groups (valves).

Again just a suggestion to improve on this great app!

March 04, 2015, 04:17:44 AM
Reply #20

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I haven't looked that closely at this widget, but if that isn't possible currently, that would be a massive issue IMO.  All sprinkler controllers must be able to control different zone times as the first and foremost item of importance.  I run one zone for under 10 minutes and another at over 45 minutes so I understand this imperative.

March 04, 2015, 04:43:14 AM
Reply #21

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I just realized that I may not be able to use this after all unless it is expandable with a RPi 2.  I currently have 2 controllers with 6 and 4 zones.  If I convert to using HG, I'd obviously need at least 10 zones.  The RPi A/B only don't have enough GPIO available (ignoring the fact that HG locks up a few).

March 04, 2015, 09:08:18 PM
Reply #22

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
Although all the different timing options are not hard to add, it will make the configuration of this app lengthy and confusing and it by far exceeds my need for this app.

The same functionality is very easily created with a macro/wizard script, which will give a more manageable control over all the different timing requirements. This script then needs to be started on a CRON.  Thanks to the fantastic script functionality Gene added you don't need any programming knowledge to do this.
« Last Edit: March 05, 2015, 08:57:55 PM by enterprised »
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

March 05, 2015, 06:35:59 PM
Reply #23

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi bkenobi,

Even wirh RPI B you can use more than 8 GPIO in output, in you don't use Serial and I2C, you can those PINs. Only modify standard GPIO modules of HG. I have tried before.
Actually I use GPIO4, 7, 8, 9,10,11,24,27(21 Model A)  because I don't need more but they are mapped defifferently than HG.
And with B+, has more pin avalaible.
« Last Edit: March 05, 2015, 06:40:04 PM by dani »

March 05, 2015, 07:43:05 PM
Reply #24

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I'll probably upgrade to a RPi2 at some point.  I'm planning on attaching an Arduino via most likely SPI soon (either Eden or something custom).

March 15, 2015, 06:34:46 PM
Reply #25

lv2roc

  • *
  • Information
  • Newbie
  • Posts: 17
How do I set it up so it will automatically start when HG starts. Right now whenever I restart HG the Garden Sprinkler System defaults to off. I would like it to default to ON.

Thanks.

March 15, 2015, 07:52:26 PM
Reply #26

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
Program Update:

Added the following features on request:
 - Pause on rainfall
 - Pause on wind speed (not tested, need someone in  windy place to do this)
 - Auto Start on HG start-up

Both rainfall and wind speed require the " jkUtils-OpenWeatherData" app for input. Ensure you enable and configure this app.

Program Parameters:
01. Sprinkler Schedule A (Cron) [* * * * *]
02. Schedule A Groups (1,2,3,4,5,6 or none)
03. Sprinkler Schedule B (Cron) [* * * * *]
04. Schedule B Groups (1,2,3,4,5,6 or none)
05. Sprinkler Schedule C (Cron) [* * * * *]
06. Schedule C Groups (1,2,3,4,5,6 or none)
07. Sprinkler Pause Between Groups Time in Seconds
08. Sprinkler Active Time in Seconds (600 = 10 minutes)
09. mm of Rain in last 24 hours to Pause Sprinklers
10. Maximum Wind Speed to Pause Sprinklers
11. Auto Start (at HomeGenie start): ON or OFF

Have fun playing around with this and let me know if something does not work properly.
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

March 20, 2015, 02:10:51 AM
Reply #27

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
Program Update:

Did a bit of bug fixing and reformatted and cleaned up the code, hope I've not introduced new bugs.

This program is now compatible with standard GPIO and with the PiFace Digital (2), this is selectable in the set-up.

Added the following features:
 - Pause on rainfall (tested)
 - Pause on wind speed (not tested, need someone in  windy place to do this)
 - Auto Start on HG start-up
 - GPIO or PiFace Digital selector

Both rainfall and wind speed require the " jkUtils-OpenWeatherData" app for input. Ensure you enable and configure this app.

Program Set-up Parameters:
01. Sprinkler Schedule A (Cron) [* * * * *]
02. Schedule A Groups (1,2,3,4,5,6 or none)
03. Sprinkler Schedule B (Cron) [* * * * *]
04. Schedule B Groups (1,2,3,4,5,6 or none)
05. Sprinkler Schedule C (Cron) [* * * * *]
06. Schedule C Groups (1,2,3,4,5,6 or none)
07. Sprinkler Pause Between Groups Time in Seconds
08. Sprinkler Active Time in Seconds (600 = 10 minutes)
09. mm of Rainfall in last 24 hours to Pause Sprinklers
10. Maximum Wind Speed (m/s) to Pause Sprinklers
11. Auto Activate (at HomeGenie start): ON or OFF
12. GPIO or PiFaceD

Have fun playing around with this and let me know if something does not work properly.

« Last Edit: March 20, 2015, 12:10:21 PM by enterprised »
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

March 22, 2015, 02:23:53 AM
Reply #28

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
-- Update:
-- And yes, there was a bug, all schedules reverted to schedule A, fixed now

This program is now compatible with standard GPIO and with the PiFace Digital (2), this is selectable in the set-up.

Added the following features:
 - Pause on rainfall (tested)
 - Pause on wind speed (not tested, need someone in  windy place to do this)
 - Auto Start on HG start-up
 - GPIO or PiFace Digital selector
 - NEW: Sprinkler "On" time -  configurable per group

Both rainfall and wind speed require the " jkUtils-OpenWeatherData" app for input. Ensure you enable and configure this app.

Program Set-up Parameters:
01. Sprinkler Schedule A (Cron) [* * * * *]
02. Sprinkler Active Time (00,00,00,00,00,00) - 00 to 99 minutes for each group - 00 = Off - (G1,G2,G3,G4,G5,G6) - Must use 2 digits for each group!!
03. Sprinkler Schedule B (Cron) [* * * * *]
04. Sprinkler Active Time (00,00,00,00,00,00) - 00 to 99 minutes for each group - 00 = Off - (G1,G2,G3,G4,G5,G6) - Must use 2 digits for each group!!
05. Sprinkler Schedule C (Cron) [* * * * *]
06. Sprinkler Active Time (00,00,00,00,00,00) - 00 to 99 minutes for each group - 00 = Off - (G1,G2,G3,G4,G5,G6) - Must use 2 digits for each group!!
07. Sprinkler Pause Between Groups Time in Seconds
08. mm of Rainfall in last 24 hours to Pause Sprinklers
09. Maximum Wind Speed (m/s) to Pause Sprinklers
10. Auto Activate (at HomeGenie start): ON or OFF
11. GPIO or PiFaceD

Have fun playing around with this and let me know if something does not work properly.
« Last Edit: March 22, 2015, 03:17:33 AM by enterprised »
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

April 02, 2015, 12:51:59 AM
Reply #29

lv2roc

  • *
  • Information
  • Newbie
  • Posts: 17
The wind function seems to work well. I need to keep an eye on it a little longer to make sure it is functioning as it should.

One more note for future update...

You already have the status of the groups displayed on the widget, eg. Sprinkler group 1 Active, switching to next group, etc.

Could you add something like " Skipped due to weather" when the parameters come into effect and by pass the schedule. Keeping it displayed for the duration of the schedule.

Unless I missed something, when it skips due to rain or wind the widget display "Waiting on schedule"

Would be nice to know that it is on schedule but skipped because of weather.

Thanks,