Announcement

Collapse
No announcement yet.

Away Mode Random Lights

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

    #31
    Originally posted by ameridan View Post
    Thank you for fixing. Tried HS2 version 1.4 and it worked properly now.
    Good to know. Thanks. Now on to Daily Reminders.
    Real courage is not securing your Wi-Fi network.

    Comment


      #32
      Wadenut thank you for a great plugin and for continually contributing to HS community. Been looking for something simple for a long time to do this, and this plugin is a perfect fit.

      I'm using HS3
      Haven't had any errors at all other than the device doesn't turn off.
      Turns on fine, but not off.
      My MinOn and MaxOff is set at 3 and 10 respectively. No delays set.
      LOG: No report in the log for a off command for the device is seen either.

      On another matter:
      I do get this error when I hit "submit change", but all my changes seem to be accepted fine.
      Script error: Object doesn't support this property or method: 'hs.RunEx'


      hs.RunEx "Away Mode Random Lights.vben","Sort",""
      End Sub"</pre>
      Tom
      baby steps...starting again with HS3
      HS3Pro: Z-NET & 80 Z wave Devices,
      HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
      Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
      In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
      System: XP on Fanless Mini-ITX w/ SSD

      Comment


        #33
        Originally posted by TomTom View Post
        Wadenut thank you for a great plugin and for continually contributing to HS community. Been looking for something simple for a long time to do this, and this plugin is a perfect fit.

        I'm using HS3
        Haven't had any errors at all other than the device doesn't turn off.
        Turns on fine, but not off.
        My MinOn and MaxOff is set at 3 and 10 respectively. No delays set.
        LOG: No report in the log for a off command for the device is seen either.

        On another matter:
        I do get this error when I hit "submit change", but all my changes seem to be accepted fine.
        Script error: Object doesn't support this property or method: 'hs.RunEx'


        hs.RunEx "Away Mode Random Lights.vben","Sort",""
        End Sub"
        I'll have to look, but I think if you set only a MinOn and a MaxOff, no off will occur. It looks for the Minimum values (both On and Off) first, and if nothing is found there, nothing will be done for that action as it's assuming there will be no Max values. Try MinOff instead of MaxOff. Filling either of the Min values will cause the action to occur at that time; ie: no random value applied. Same if both Min & Max in the pair contain the same value.

        hs.RunEx: Are you using HS2? That line in the asp web page is calling a routine in the script. It doesn't exist in the HS3 version. I ask because while the HS2 web page might well run under HS3, and will save the data, the script won't.

        Correction... There is no MaxOff field. The fields Are:
        MinDly This is the minimum time in minutes that the action will be applied.
        MaxDly This is the maximum time in minutes that the action will be applied. This is optional, in which case the action will occur AT MinDly. If used, MinDly must also be defined.
        MinOn After the initial action is applied, this will cause the light to turn off at this duration. If MaxOn is present, this will be the minimum time in minutes the light will remain on.
        MaxOn When present, this is the maximum time that the light will remain on. MinOn must also be present.

        Guess I need to write a proper doc.
        Last edited by Wadenut; December 3, 2014, 10:23 AM.
        Real courage is not securing your Wi-Fi network.

        Comment


          #34
          I'm using the latest beta HS3 Pro Edition 3.0.0.147
          With the lastest zwave beta.

          Your doc is fine, I incorrectly said MaxOff above. My setting were MinOn 3min and MaxOn 10min with no delays. But the light just stays ON.

          add:
          The log file shows no off command being sent to device.
          Last edited by TomTom; December 3, 2014, 11:38 AM.
          Tom
          baby steps...starting again with HS3
          HS3Pro: Z-NET & 80 Z wave Devices,
          HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
          Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
          In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
          System: XP on Fanless Mini-ITX w/ SSD

          Comment


            #35
            So your schedule looks like: day, time, Device, Level="OFF" MinDly=nothing, MaxDly=nothing, MinOn=3, MaxOn=10. It won't work.
            If you want an action you'll have to define:
            day, time, device, Level=OFF, MinDly=3, MaxDly=10.
            or for an immediate action:
            day, time, device, Level=OFF

            The last two fields are ignored in the case of an OFF action.

            I've just finished a proper doc which probably explains things a little more effectively. I'm about to upload it separately from the ZIP files. I'll add it to the ZIPs if I need to update the scripts later on.
            Last edited by Wadenut; December 3, 2014, 12:02 PM.
            Real courage is not securing your Wi-Fi network.

            Comment


              #36
              Perhaps I should ask you to post a copy of your schedule file. \Homeseer\Data\RandomLights\RandomLights.csv

              If there's a problem with the script, I need to track it down. I do want to add some safeguards anyway.
              Real courage is not securing your Wi-Fi network.

              Comment


                #37
                Going forward:
                This was originally written for HS2 and was intended primarily for my own use. As such, there are very few tests and alerts built in to detect potentially troublesome schedules.
                When the HS3 version was written, it was necessary to rewrite sections of the code specific to that system and as a result, that code is distributed throughout the script. I'm currently in the process of moving the common sections of the code into one area so that I can then simply insert the system specific sections as needed when making future modifications. This will simplify improvements in the future.
                At the same time, I'll be adding tests for potentially problematic schedules.

                The result should be beneficial to all but may take a day or two to complete. Meantime, it will still be helpful at this point to hear of any ongoing problems so I can incorporate any necessary fixes now and hopefully avoid the need of future revisions.

                When reporting problems, please include this information: A clear description of the problem, your HS version, and the exact schedule that is causing the problem. I'll do my best to assist.
                Thanks.
                Real courage is not securing your Wi-Fi network.

                Comment


                  #38
                  Thank you.
                  Sorry its my mistake. Seeing all the examples with ON function, I assumed the OFF was built in somehow. I didn't have a seperate schedule that had the OFF command for the device. I think off schedule will fix my problem.

                  So now I'm a bit confused.
                  If Living Light is DAY:All, TIME: 5pm DEVICE: Living Light LEVEL:ON MINDLY: _ MAXDLY:_ MINON: 3 MAXON 10

                  I thought this meant that the living room light would come on at 5pm and stay on between 3 min and 10 min??
                  If we have a OFF schedule why do we need a MAXON ?

                  Sorry I'm not a programming guru like you, so pardon my stupid questions.

                  ADD: Ok there is the example from the doc
                  Tue, 21:00, Living Room Lamp, On, 10,30,15,40
                  On Tuesdays, at 9PM turn on this light between 10 and 30 minutes from now; then turn Off sometime between 15 and 40 minutes after that.

                  This is why assumed that it turns off on its own
                  Last edited by TomTom; December 3, 2014, 03:06 PM. Reason: added example from doc
                  Tom
                  baby steps...starting again with HS3
                  HS3Pro: Z-NET & 80 Z wave Devices,
                  HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                  Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                  In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                  System: XP on Fanless Mini-ITX w/ SSD

                  Comment


                    #39
                    Originally posted by TomTom View Post
                    Thank you.
                    Sorry its my mistake. Seeing all the examples with ON function, I assumed the OFF was built in somehow. I didn't have a seperate schedule that had the OFF command for the device. I think off schedule will fix my problem.

                    So now I'm a bit confused.
                    If Living Light is DAY:All, TIME: 5pm DEVICE: Living Light LEVEL:ON MINDLY: _ MAXDLY:_ MINON: 3 MAXON 10

                    I thought this meant that the living room light would come on at 5pm and stay on between 3 min and 10 min??
                    If we have a OFF schedule why do we need a MAXON ?

                    Sorry I'm not a programming guru like you, so pardon my stupid questions.
                    In an OFF schedule, MinOn and MaxOn are ignored. Those fields are intended to be a duration after the initial delay MinDly/MaxDly, when the device will be turned back off during the MinOn/MaxOn delay period.

                    So, to execute an immediate off, you would leave all four fields blank. Just define the Day, Time, Device and "OFF" (or 0) as the Level.

                    To execute a delayed off, you would populate only Day, Time, Device and Level (= OFF or 0), MinDly and MaxDly (MinOn and MaxOn are meaningless in this case).
                    Maybe the real problem is my choice of labels for the fields.

                    Nonetheless, I'm making good progress separating out the common code adding more debug as I go. I'll try to clarify the documentation before I upload v1.5.

                    Incidentally, if you want some debug logging, just enter a single schedule with "LOG" in the day field. The other fields remain blank. This will sort to the top of the list and execute each time the script runs. I'll be changeing this word from "LOG" to "DEBUG" in the next version, and it will be documented. To turn it off, delete that schedule.
                    Real courage is not securing your Wi-Fi network.

                    Comment


                      #40
                      Thats great about the DEBUG option.

                      I added this to the previous post, but you may not have seen it.
                      " Ok there is the example from the DOC file
                      Tue, 21:00, Living Room Lamp, On, 10,30,15,40
                      On Tuesdays, at 9PM turn on this light between 10 and 30 minutes from now; then turn Off sometime between 15 and 40 minutes after that.
                      This is why assumed that it turns off on its own"

                      I'm not sure if this is for HS2 or a typo but would it be possible to have a schedule that contained the on and off command in one(like the above example), rather than separate schedules?
                      Tom
                      baby steps...starting again with HS3
                      HS3Pro: Z-NET & 80 Z wave Devices,
                      HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                      Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                      In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                      System: XP on Fanless Mini-ITX w/ SSD

                      Comment


                        #41
                        Originally posted by TomTom View Post
                        Thats great about the DEBUG option.

                        I added this to the previous post, but you may not have seen it.
                        " Ok there is the example from the DOC file
                        Tue, 21:00, Living Room Lamp, On, 10,30,15,40
                        On Tuesdays, at 9PM turn on this light between 10 and 30 minutes from now; then turn Off sometime between 15 and 40 minutes after that.
                        This is why assumed that it turns off on its own"

                        I'm not sure if this is for HS2 or a typo but would it be possible to have a schedule that contained the on and off command in one(like the above example), rather than separate schedules?
                        Yes, it will turn off, but only so long as the first pair of delay fields are filled in. I've been testing every possible combination this afternoon, on HS3; so far, all work as I expected.

                        Thinking about this, it would make sense to be able to turn on the light immediately, then delay the off.
                        This would look like:
                        Day=ALL,Time=5:40PM,Device="L1",Level="ON" (or a dim level), MinDly= nothing, MaxDly=nothing, MinOn=5, MaxOn=10.
                        I'll add this possibility if I haven't already.
                        Real courage is not securing your Wi-Fi network.

                        Comment


                          #42
                          OK. I just tried that scheme with the current script. It did create a delayed event to turn off the light, but not at the time we want. You might want to avoid that for now. Rich is about to release HS3 v3.0.0.148. Among other things this is going to add a date trigger, which would currently make the situation worse.
                          Real courage is not securing your Wi-Fi network.

                          Comment


                            #43
                            Greig,
                            Thanks again for the great plugin and support.
                            Again I've been looking for one for a while and had one in hs2 but had problems with it.
                            This is easy and simple to use.
                            Much Thanks!

                            Xmas Vacation count down for the lived in look

                            I'd like to send you some $ as a thanks for taking the time to share your efforts on this(Paypal ?)
                            Tom
                            baby steps...starting again with HS3
                            HS3Pro: Z-NET & 80 Z wave Devices,
                            HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                            Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                            In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                            System: XP on Fanless Mini-ITX w/ SSD

                            Comment


                              #44
                              Originally posted by TomTom View Post
                              Greig,
                              Thanks again for the great plugin and support.
                              Again I've been looking for one for a while and had one in hs2 but had problems with it.
                              This is easy and simple to use.
                              Much Thanks!

                              Xmas Vacation count down for the lived in look

                              I'd like to send you some $ as a thanks for taking the time to share your efforts on this(Paypal ?)
                              Paypal works and is appreciated. wadenut at accesswave dot ca. But wait until you've seen 1.5. 1.5 does work with HS3.0.0.148 so delays greater than 1 day are OK. I don't know why anyone would do that, but...

                              I've found one bug no-one noticed It's fixed.
                              Doc is updated.
                              Just want to do a little more testing before I post it in the morning.
                              Real courage is not securing your Wi-Fi network.

                              Comment


                                #45
                                Version 1.5 is available, and should barring problems, be the final version.

                                - Several changes to the documentation.
                                - Added the ability to define a schedule with an immediate "ON" action (no delay) with a delayed "OFF" action.
                                - The word "ALL" is no longer necessary to cause a schedule to execute every day, although is still supported.
                                - Documented "Logging" option.
                                Real courage is not securing your Wi-Fi network.

                                Comment

                                Working...
                                X