www.homeseer.com    
 

Go Back   HomeSeer Message Board > Developer Support > Scripts & Plug-Ins:Development and Libraries > Script & Plug-In Library

Script & Plug-In Library If you have a script for HomeSeer that you would like to share, please post it here. This forum is for scripts only, and no replies are allowed here. You may discuss these scripts in the Scripts Discussion forum.

Reply
 
Thread Tools Display Modes
  #1  
Old March 29th, 2008, 06:47 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
[VB.NET/ASP.NET] Sprinkler Control Package

Version 3.8 update.

Although it can't hold a candle to Michael's sprinkler plug-ins, this relatively simple package may be just enough for people like me who just want a simple scheme to run their sprinklers. Oh, and it's FREE.

Use of the package requires that you already have individual sprinkler valves ("zones") that you control via Homeseer devices. The package doesn't really care what sprinkler interface device you use, as long as turning one of the devices ON opens the valve, and turning it OFF closes the valve.


Features:
  • Everything is managed from a single web page. From this page you view, set up, define, edit, and delete individual "schedules", where a schedule is a sequence of "zones" that you want to run for a particular amount of time. You list all your schedules, and edit configuration settings, or review a log of sprinkler activity.
  • You can have virtually as many schedules as you want, and each schedule can have virtually as many zones as you want.
  • Each schedule can include a text description that you can add. This can help you keep them all straight, where one is your "springtime schedule with shorter zon run times", another is a "new grass schedule" and another is the normal schedule you run during the summer.
  • Homeseer event run times, days of week, and enable / disable are set up from the same web page.
  • You can specify the name for the Homeseer Event for each schedule.
  • Sprinkler schedules can be enabled or disabled via a single HS virtual device (the web page will create it), which you can turn ON (enabling sprinklers) or OFF (disabled) based on (for example) if WeatherXML says the wind is blowing too hard.
  • A script interface is provided to allow skipping a schedule.
  • Optionally can check local Weather Underground stations for rain, and delay scheduled sprinkler runs for a specified number of hours after rain.
  • Standalone scripts included that you can incorporate into your own events to abort / cancel a running sprinkler schedule, or toggle the rain delay setting.
The package is all VB.NET and ASP.NET, and uses a couple of small MS Access databases (you don't need MS Access).

If upgrading, you'll only need the files from the scripts and html subdirectories.

Post complaints, error reports, suggestions, etc. in the discussion thread: http://board.homeseer.com/showthread...264#post814264

Steve
Attached Files
File Type: zip SnevlSprinklers39.zip (484.4 KB, 111 views)

Last edited by stevea; August 28th, 2014 at 11:19 AM. Reason: Replaced with new ZIP
Reply With Quote
  #2  
Old April 2nd, 2008, 10:13 AM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v1.2 fixes a problem reported by Johnoc in the discussion thread (http://board.homeseer.com/showthread...658#post814658). I was using the sprinkler device names in the events that were created, but some house codes (e.g. '$') are not valid in an event name. I'm not just naming them by their run-order (starting with 1).

For those who already installed v1.1, the main script file (Sprinklers.vben) is the only thing that changed, so you only need to copy that file into your scripts directory, replacing the old one. Definitely DO NOT copy over the stuff out of the "data" subdirectory, or you will wipe out any sprinkler schedules you have already defined.

The new ZIP is attached to the original post at the beginning of this thread.

Steve
Reply With Quote
  #3  
Old May 12th, 2008, 11:07 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
I just replaced v1.2 with v1.3. It fixes a few issues:

1) Prompt for confirmation of delete of a schedule;
2) Clean-up of schedule event database
3) Use Homeseer application path, rather than hard-code path of database (important if you have it installed somewhere other than C:/Program Files/Homeseer 2/*)

I just replaced the ZIP at the start of this thread. Please post comments / issues / requests in the comment thread, as referenced above.

Steve
Reply With Quote
  #4  
Old June 2nd, 2008, 10:45 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
I replaced v1.3 with v1.4, which only adds field validation. I've attempted to make sure you enter only valid HS device codes for each zone, and a valid number of minutes in the range of 1-100 for the run time on each zone.

The new ZIP is attached to the original post at the top of this thread.

Steve
Reply With Quote
  #5  
Old April 11th, 2009, 04:24 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v1.5

The ZIP attached to the first message of this thread has been replaced with v1.5. Somewhere in recent Betas HST changed how events are created from a script. Previously, events were created enabled, but apparently now they are disabled until they are specifically enabled. So, the only change to v1.5 is to enable the events for both the schedule and the individual zones.

If you already have been using SnevlSprinklers, all you need to do is replace the SprinklerEdit.aspx file (in the HTML subdirectory), and the sprinklers.vben script (in the scripts subdirectory).

As usual, post any comments, questions, or suggestions over in the discussion thread (link at the top of this thread).

Steve
Reply With Quote
  #6  
Old May 15th, 2009, 11:49 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v1.7

The ZIP at the top of this thread has been replaced with version 1.7, with a few changes worth noting:
  1. Added the option to schedule "every N days" vs. by day of week
  2. On both web pages (schedule edit page and log page) added a link to the other page (so you don't have to put both pages in your menus)
  3. Added a "Run Now" button on each schedule zone. Pressing this button will run the indicated zone for the indicated number of minutes, and turn it back off.
  4. Put the version number of the package in the upper right-hand of both web pages.
To upgrade, you'll need to replace the SprinklerEdit.aspx and Sprinkler_Log.aspx files in the html directory, add the Snevl_Sprinklers.dll file to the html/bin directory, and replace the sprinklers.vben file in the scripts directory.

I've been using most of these changes for a week or so, but that is hardly a thorough test. Let me know if there are any issues and I'll try to get them corrected ASAP.

Steve
Reply With Quote
  #7  
Old May 24th, 2009, 10:40 AM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v1.7.1

I'm replacing the ZIP with a interim release 1.7.1. It fixes two minor bugs:
  1. A typo in both the Log web page and the Schedule Edit web page made it so the title at the top of the page was mis-aligned. Fixed.
  2. The "run now" feature that was added to v1.7 didn't log the ON and OFF of the zone being run to the Sprinkler Log database. Fixed.
The entire install is included, but to upgrade you actually only need to replace 3 files:
  • html\bin\Snevl_Sprinklers.dll
  • html\SprinklerEdit.aspx
  • html\Sprinkler_log.aspx
As usual, post any comments over in the discussion thread referenced at the top of this thread.

Steve
Reply With Quote
  #8  
Old June 2nd, 2009, 09:47 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v1.7.2 of Schedule Edit web page

Here is a replacement for the Sprinkler Schedule Edit web page (SprinklerEdit.aspx), specifically fixing the problem reported by "refinished" here: http://board.homeseer.com/showthread...094#post873094

Note that the only change between this version and the one in the ZIP at the top of this thread is to allow devices whose housecode is a back-tick ("`"), so I really doubt anyone except refinished needs it.

Steve
Attached Files
File Type: zip SprinklerEdit.zip (3.9 KB, 85 views)
Reply With Quote
  #9  
Old July 26th, 2009, 03:24 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v1.8

The ZIP at the top of this thread has been replaced with version 1.8. Not many significant changes, but a few:
  • Changed the "Run every N days" event to include the next 10 dates, rather than just one. This should prevent the date from not getting updated if one is skipped.
  • Uses the schedule number in the zone events (not the schedule events, but each individual zone event when a schedule is triggered) so that multiple schedules can be run at the same time, for those with multiple controllers.
  • Added an "extensions" script to allow customized actions in response to schedules running, schedules edited, or individual zones turning ON or OFF.
  • Incorporated the other changes that were in the interim releases 1.7.1 and 1.7.2.
As always, let me know if there are any issues. Post comments over in the discussion thread, rather than here.

Steve
Reply With Quote
  #10  
Old September 19th, 2009, 02:36 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v1.9

The ZIP at the top of this thread had been replaced with version 1.9, which corrects a problem discussed here where the path to the sprinkler schedule database and the logging database was hard-coded to "C:\Program Files\Homeseer 2" rather than using the AppPath of wherever Homeseer was installed.

Although the ZIP contains the full package (instructions, scripts, starter database, etc), if you are upgrading from v1.8 you only need to replace two files:

html\SprinklerEdit.aspx
html\bin\Snevl_Sprinklers.dll

As usual, let me know if there are any problems or requests. Post comments in the discussion thread: http://board.homeseer.com/showthread.php?t=127509

Steve
Reply With Quote
  #11  
Old July 10th, 2010, 12:32 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v2.0

The ZIP attachment at the top of this thread has been replaced with v2.0 of SnevlSprinklers. The look and feel of this version has changed quite a bit:
  • You can now specify a Homeseer Event Name for each schedule. In v1.X the events were simply named "Sprinkler Schedule N" where N was the Schedule number. Once you get more than a few schedules this was hard to figure out when looking at the Event listing on Homeseer.
  • The default view for the Edit page is now a table listing all of the schedules. Description, zones/times, days to run, start time, enabled/disabled, and event name are shown. You edit one of the schedules by clicking on the schedule ID in the table.
  • When a schedule is run, there is now a 10-12 second delay between one zone turning off and the next zone turning on. The intent is to lessen some of the wear on the sprinkler manifold, and avoid the potential for the OFF command actually coming after the ON command, which messes up most sprinkler control units.
As always, please post any questions, bugs, or suggestions over in the discussion thread: http://board.homeseer.com/showthread.php?t=127509

Steve
Reply With Quote
  #12  
Old July 10th, 2010, 07:13 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v2.0 REPOST

I had a mistake in the logic for the "Enabled" vs. "Disabled" column in the schedule table. I have replaced the v2.0 ZIP at the top of this thread with the corrected one. If you have already downloaded and installed v2.0, the only file you need to replace with the one from the new ZIP is the DLL file in html/bin.

Sorry about that.

Steve
Reply With Quote
  #13  
Old July 31st, 2010, 11:06 AM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v2.1 of SnevlSprinklers

I just posted the v2.1 ZIP at the top of this thread. Changes since v2.0:
  • Added "total run time" column to the schedule table, indicating the total of all the zones in each schedule.
  • Added a "skip" button on each schedule in the schedule table, where you can designate that you want the next run of a schedule to be skipped one time. It will automatically reset after it skips one time. This is handy if the weather causes you to want to skip a single run of the schedule. I added this because if I disable the sprinklers via the enable/disable device, I tend to forget and my grass dries out.
  • Changed the way the enable/disable is checked during a schedule run. Previously, if the sprinklers were disabled at the beginning of a schedule run, it would simply skip all the zones. Now the enable/disable status is checked at the beginning of each zone. This way, if the status of the enable/disable changes during a schedule run (e.g., it starts to rain and you have a sensor driving the enable / disable device), the change will be taken into account on the remaining zones.
  • Added a bit more logging to the log database (displayed on the log page), to indicate the name of the schedule that is running, and some data about the enabled/disabled status.
As always, please post any questions, requests, bugs, or issues to the discussion thread, here: http://board.homeseer.com/showpost.p...64&postcount=1

Steve
Reply With Quote
  #14  
Old October 5th, 2010, 09:16 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v3.0 posted

Just in time for the end of the sprinkler season , I just posted version 3.0 at the top of this thread. This is a fairly major change in some respects.

Main changes:
  • Added a configuration settings editor to allow customization of several items.
  • Replaced the "Start Time" column on the schedule list with the "Next Run" data / time.
  • Merged everything into a single web page. If you are upgrading, you can / should delete the "Sprinkler_log.aspx" page, and the "SprinklerDev.aspx" web page.
  • Added some extra query strings that you can include in the URL for the web pages to customze the look (number of lines in the list, and disabling the HS header). This will mostly be useful for HSTouch, but may be useful for cases where people just use different sized displays.
  • Modifications to how sprinkler schedules run, to incorporate all the other changes made (described in the above bullets).
  • Significantly re-done documentation to make it a little clearer how to use it.
As with the other stuff I do, I'm keen to try and be responsive to issues and questions. Post them in the discussion thread (http://board.homeseer.com/showthread.php?t=127509) or send me an email.

Steve
Reply With Quote
  #15  
Old June 4th, 2011, 09:56 AM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v3.1 posted

The first message in this thread has been modified to attach the ZIP for v3.1. This is a relatively small change from v3.0, adding only one feature:
  • An optional device has been added to the config page for a "Main Valve" or "Main Pump". If you define this device, the system will attempt to turn this device ON before the first zone of each scheduled run, and OFF after the last zone is completed.
Post any issues or requests in the discussion thread: http://board.homeseer.com/showthread.php?t=127509

Thanks.

Steve
Reply With Quote
  #16  
Old July 4th, 2012, 10:45 AM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v3.2 Posted

The first message of this thread has been updated with the ZIP for version 3.2, addressing a couple of bugs that have been reported over the past several months and features that have been requested.

The changes from v3.1:
  • Expanded the range of valid Homeseer house codes to include ":" as well as others.
  • Added a required field validator to prevent accidental use of a blank house code.
  • Changed the text of the "skip" button to be more clear.
  • Added a "Run Now" button each item in the schedule list to manually trigger the running of a sprinkler schedule.

If upgrading from v3.1, you only need to copy over two files: html\SprinklerEdit.aspx and html\bin\Snevl_Sprinklers.dll.

Post any comments, questions, issues, or further requests in the discussion thread: http://board.homeseer.com/showthread.php?t=127509

Steve
Reply With Quote
  #17  
Old July 30th, 2012, 06:45 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v3.3

The first message of this thread has been updated with the ZIP file for v3.3. The changes in this version:
  • You have an option to use either the device NAME or the device CODE for the status device string and logging.
  • A "Last Ran" column has been added to the schedule list display, showing when each schedule ran last.
  • A status icon is shown for each schedule, to show if a particular schedule is currently running or if the system is disabled.
  • You can specify an image (e.g. of the layout of your yard) to include at the bottom of the web page, as a kind of map of your zones.
  • A new disabled icon was added in addition to the ON and OFF icons from previous versions.
  • You can specify the number of days to keep in the sprinkler log. Each time a schedule is run, the log database will be purged of data older than what is specified on the config page, and the database will be compacted to save space.
  • The Device Value of the Status Device now is set: 1 if a zone is ON, 0 if all zones are OFF, and -1 if the system is disabled.

Note that this upgrade is pretty extensive, so you'll need to copy over everything except the data subdirectory if you are upgrading.

Post any complaints, bugs, questions, or requests over in the discussion thread: http://board.homeseer.com/showthread.php?t=127509
.

Last edited by stevea; July 30th, 2012 at 09:12 PM. Reason: added device value item to list
Reply With Quote
  #18  
Old September 30th, 2012, 08:59 AM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v3.4

I just posted v3.4 in the first message of this thread. The changes in v3.4:
  • Fixed / trapped a possible error in GetLastRun() that was causing the schedule list to crash
  • Added support for the UltraM1G plug-in to control sprinkler devices.
  • Allow ` as a house code.
Post questions, comments, requests, or bugs in the discussion thread: http://board.homeseer.com/showthread.php?t=127509

Steve
Reply With Quote
  #19  
Old November 25th, 2012, 06:31 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v3.5

The ZIP file at the top of this thread has been replaced with version 3.5. The only real change is to allow the option of having sprinkler schedules be skipped if sufficeint rain is detected. You can specify Weather Underground stations to check, how much rain is required to delay sprinkler schedules, and how long to delay after rain.

As usual, post any issues or questions in the discussion thread.

Steve
Reply With Quote
  #20  
Old November 27th, 2012, 08:54 PM
stevea's Avatar
stevea stevea is offline
OverSeer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 3,396
v3.5R1

My apologies to anyone who downloaded v3.5, but I just replaced the ZIP at the top of this thread with v3.5R1 to correct two omissions in the original v3.5 ZIP:
  • The Weather Underground rain queries use the .NET XML libraries, and a modification to the HS settings.ini file may be required. I've added those instructions to the installation documentation.
  • A log of the results gathered from every pull from a Weather Underground weather station is kept, and a web page is provided to look at that log. The ASPX web page was omitted from the original v3.5.
If you downloaded the original v3.5, you really only need the docs\Snevl_Sprinklers.pdf file and the html\Snevl_WU_log.aspx page. All the other files are unchanged.

Steve
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 10:45 PM.


Copyright HomeSeer Technologies, LLC