Announcement

Collapse
No announcement yet.

Set Timer or Counter value in a script?

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

  • Set Timer or Counter value in a script?

    I didn't see this in the HS Scripting index. I am wondering how I can reset, resume or set a timer's time? How about counters?

    Thanks

  • #2
    I would like to do this as well.

    Bill

    Comment


    • #3
      Originally posted by madmax View Post
      I didn't see this in the HS Scripting index. I am wondering how I can reset, resume or set a timer's time? How about counters?

      Thanks
      Try.

      hs.TimerReset(TimerName As string)
      hs.TimerValue(TimerName As string)
      hs.CounterDecrement(CounterName As string)
      hs.CounterIncrement(CounterName As string)
      hs.CounterReset(CounterName As string)
      hs.CounterValue(CounterName As string)

      Greig.
      Zwave = Z-Stick, 3xHSM100 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
      Scripts =
      Various

      Comment


      • #4
        Have a read of this thread, I use it as a "kitchen timer" and it works well.

        http://board.homeseer.com/showthread.php?t=155895

        Might give you some ideas.
        Last edited by Gogs; August 19th, 2013, 11:10 AM. Reason: Forgot to include the link
        sigpic
        A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
        HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
        BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
        BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

        Comment


        • #5
          Originally posted by enigmatheatre View Post
          Try.

          hs.TimerReset(TimerName As string)
          hs.TimerValue(TimerName As string)
          hs.CounterDecrement(CounterName As string)
          hs.CounterIncrement(CounterName As string)
          hs.CounterReset(CounterName As string)
          hs.CounterValue(CounterName As string)

          Greig.
          Thanks. That helps a lot. But what about stop, start and set for timers?

          Bill

          Comment


          • #6
            Originally posted by bdickhaus View Post
            Thanks. That helps a lot. But what about stop, start and set for timers?

            Bill
            Bill,

            Good question!
            I have not found anything that will do this yet.

            Greig
            Zwave = Z-Stick, 3xHSM100 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
            X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
            Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
            Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
            Scripts =
            Various

            Comment


            • #7
              Thanks for the responses everyone. Much appreciated.

              Comment


              • #8
                Sorry, in earlier post forgot to include the link.

                http://board.homeseer.com/showthread.php?t=155895
                sigpic
                A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
                HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
                BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
                BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

                Comment


                • #9
                  If those calls don't exist, hopefully they will add them. In the meantime I am triggering manual events to start and stop timers.

                  Bill

                  Comment


                  • #10
                    Originally posted by enigmatheatre View Post
                    Try.

                    hs.TimerReset(TimerName As string)
                    hs.TimerValue(TimerName As string)
                    hs.CounterDecrement(CounterName As string)
                    hs.CounterIncrement(CounterName As string)
                    hs.CounterReset(CounterName As string)
                    hs.CounterValue(CounterName As string)

                    Greig.
                    I have checked the documentation again, nothing on this area reached documentation yet. Also I want to use the counterincrement function, but this function does not do anything yet as far I can check..

                    I HST will document these functions soon, because I feel a bit left in de dark here?

                    Wim
                    -- Wim

                    Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
                    650 devices ---- 336 events ----- 40 scripts

                    Comment


                    • #11
                      Set Timer or Counter value in a script?

                      I'm using timers for recurring events. They work fine, but I have seen that if a timing cycle is missed for whatever reason, they never retrigger until the the timer is manually reset. Should I create an event to restart the timers every day? Or is there a better way to handle this?

                      Steve Q


                      Sent from my iPad using Tapatalk HD
                      HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
                      2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

                      Comment


                      • #12
                        How about creating a new timer from script?
                        or starting timer and stopping timer?

                        I see that you can create a new global variable for example in a script, but I don't see anything in the docs about creating a new timer.

                        Is this possible?
                        Last edited by smikkelsen; December 22nd, 2015, 06:34 PM.

                        Comment


                        • #13
                          Originally posted by smikkelsen View Post
                          How about creating a new timer from script?
                          or starting timer and stopping timer?

                          I see that you can create a new global variable for example in a script, but I don't see anything in the docs about creating a new timer.

                          Is this possible?
                          No, no and no I am afraid, although I believe hs.timerreset will reset and start a timer again (potential bug). The request for this sort of thing has been around for some time - http://bugzilla.homeseer.com/bugzill...ug.cgi?id=1222
                          My Plugins:

                          Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
                          Yeelight 3P | Nanoleaf 3P

                          Comment


                          • #14
                            Thanks for the reply.

                            I am hitting dead ends everywhere I go with stuff that micasaverde did with ease. Very dissapointed at the moment.

                            Comment

                            Working...
                            X