Announcement

Collapse
No announcement yet.

[VB.NET/ASP.NET] Sprinkler Control Package

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [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
    Last edited by stevea; August 28, 2014, 10:19 AM. Reason: Replaced with new ZIP

    #2
    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

    Comment


      #3
      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

      Comment


        #4
        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

        Comment


          #5
          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

          Comment


            #6
            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

            Comment


              #7
              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

              Comment


                #8
                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

                Comment


                  #9
                  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

                  Comment


                    #10
                    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

                    Comment


                      #11
                      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

                      Comment


                        #12
                        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

                        Comment


                          #13
                          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

                          Comment


                            #14
                            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

                            Comment


                              #15
                              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

                              Comment

                              Working...
                              X