Announcement

Collapse
No announcement yet.

Sprinkler Control Package - easiest way to edit script generated event - rain delay

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

  • Sprinkler Control Package - easiest way to edit script generated event - rain delay

    Steve,

    I have some thoughts on how I want to do my rain delay - skip.
    If there are better ways, please let me know, otherwise I am requesting a bit of information to be presented to the user, so I can accomplish this.

    Essentially what I am trying to do is trigger script when anything is done to the event for the zone trigger. The idea is, whenever the event is created/edited/etc., I would add in a call to a script to the created event, which would:
    • update the weather information
    • look at the current weather
    • determine if the event should run
    • skip if necessary, otherwise don't do anything (since the next time the event is created the call to the script will be added into the event.

    I think the easiest way to do this is to add into all the various sections of the extensions script. To get the name of the event (so I can reference the event reference number for event object manipulation), I think I can make a slew of calls to access to get this information out of the mdb. Learning to access ... access along the way! So, I would then be able to get the event reference and I would need to add in a call to the weather checker script.


    The advantage to this is, you get to see what the weather has been up to this point and it all ties to the time of the event. I used to do this by just creating an event by hand, which performed the check and skip. However, today I noticed things were still watering on me. Firstly, I goofed up. I did not remember to edit my checker script when I changed the time of the Zone run. So, the Zone was running BEFORE the skip call. Then it would not run the next day because it was skipped.


    I realize I could just make a call in the extensions to edit MY self created events to just move them around, but I think it would be good to be able to tie these two together as one event. If it is too much effort, I totally understand!



    Again, I am not tied to this and could certainly just create events by hand and make them trigger "1 minute before the time" set for the zone, but instead of my trying to replicate the access commands, I thought I'd ask to see if you could provide a bit more access in the snevl scripts.


    I would want event name, maybe trigger time or some other information. I guess the big one is the event name. From there, I get the event reference and can get all the information I need to generate a new event triggering 1 minute BEFORE the snevl event - so I can call a skip to that zone if needed.



    If not, maybe have an ability to add on a call to an event "before" the trigger of a zone? I'm not sure how I would go about this, but I think having something trigger prior to the zone going off gives me the ability to AT THAT TIME check the weather to see if I need to skip.


    Same with my rain monitor. I have a "clicky" cup type device, which I am going to tie into a DS10A. I am going to get it "calibrated" by watching the amount of rain the receiver states I get, and I compare that to the amount of cup tips so that I can also use this as in input to the script. I think Pete_C was also going to try to calibrate one of these. I wonder if he ever did... Would save me from having to figure it out!



    Thanks, sorry about the rambling!



    --Dan
    Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

  • #2
    Dan,

    So you want to do this on each zone, instead of just once for the entire schedule? That seems to be what you are saying, so I'll assume that's what you mean.

    Obviously you would need to set the "delay before first zone" to more than a minute.

    There already is an extensions call when the entire schedule runs (but before the first delay). I could probably give you what you are looking for by saving the event names in an INI file. The only problem is, the names themselves are generated AFTER the current call to the extensions script (but probably less than a second after).

    If you tie this to the event that runs a zone, how will you cause the zone not to run? Each zone start does check the status of the rain delay, so I guess you could simply call the script I included to toggle on the rain delay. But then it would be ON for the next N hours by design, which probably doesn't fit your "at this moment" checks.

    I take it the current rain delay method I have in there doesn't work for you? Or is it mainly that you want to utilize your own rain gauge?

    Send me an email at snevl at msn dot com and we can talk through some details. I'm willing to make mods to the scripts to support whatever you want to do, but I'd like to do it in a way that just rolls into the next version without affecting other folks. That's why saving the info into an INI file that nothing else would notice seems like a good way.

    Steve

    Comment


    • #3
      Steve,

      Maybe I don't have the most current package. I don't see anything about Rain delays in the documentation or in the config. webpage nor in the zone event page.

      V3.2 is listed...looks like you are up to v3.6! I am behind the times. I am sorry to waste your time (and mine). For my automation, I tend to not "fix" anything that is not broken.

      I'll update and check what you have put in there for the rain delay/skip. I'm sure I can mangle something together to get my own device as a trigger against the sprinkler running.

      Again, thank you for your efforts and sorry to waste your time!

      --Dan
      Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

      Comment


      • #4
        Steve,

        From the description, it looks like you tied into Weather Underground. Neat! Also from the description, it looks like I can not be certain I will be able to tie in my OWN rain sensor.

        I think I still would like to be able to do that, so did you want me to ping you through e-mail?

        --Dan
        Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

        Comment


        • #5
          Dan,

          I'll answer here because it may be of general interest.

          Starting in v3.5 I included the rain delay logic based on data from Weather Underground. In v3.6 I added a utility script that toggles the rain delay status, so the rain delay can be turned ON independent of WUnderground. It's "SnevlSprinklers_ToggleRainDelay.vb". As it is right now, it simply toggles the rain delay, but it's an unencrypted VB.NET script so you could see what it is doing and create your own script to do what you want.

          If the rain delay is ON, it is only checked (and potentially reset) when an event for a schedule is triggered. This means that you could have a rain delay of 24 hours, but the rain delay could show as ON for more than 24 hours if a schedule doesn't run. When it finally does run, the first thing it does is look at the rain delay time, and if it has been exceeded it turns it back off and runs the schedule as normal.

          For your sensor, you can simply modify the script to turn on the rain delay if the rain exceeds some value. You could also have a second script (again built off of my example) to turn off the rain delay. This means you can use my rain delay logic without actually ever using WUnderground.

          I hope all that makes sense. Let me know if you need more data.

          Steve

          Comment


          • #6
            I think it makes enough sense that once I get updated I'll understand.

            Thank you for your patience. I know I violated the unwritten rule of UPDATE then ask questions!

            Sorry to waste your time, but I appreciate the hand holding to get me where I wanted to be..

            --Dan
            Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

            Comment


            • #7
              Steve,

              I've not forgotten about this. It has just been low on my priority list.

              I did see that the sprinkler events are being skipped when there is rain. Good job! I am glad I incorporated this into my PAWS Sprinkler System.

              --Dan
              Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

              Comment


              • #8
                Mine skipped appropriately this morning!
                Paul

                Comment


                • #9
                  Great to hear about it you guys. Thanks.

                  I only wish the rain delay had a reason to kick in here in Denver. We are likely to break a record today and be close to 100 degrees, and it's supposed to stay hot and dry through the week. Ugh...

                  Steve

                  Comment


                  • #10
                    The next version can contain the "Make ot rain now" button/functionality
                    Paul

                    Comment

                    Working...
                    X