Announcement

Collapse
No announcement yet.

HS3 Counters and Timers

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Originally posted by heatvent View Post
    Is there a detailed guide on how to use timers. I watched the HS3 intro and the concept of timers is covered but there are no details or specific examples on how to set them, how they function (do they count up or down), do they auto reset after hitting a limit or does that have to be handled in your event, etc. I didn't see anything in the user docs at this point or on the board that covered this but may have missed it.

    Thank you
    Good questions. I was thinking about using a countdown timer for my sprinkler script. I would display the timer in HSTouch so the user knows when the sprinkler will shut off and once the timer reaches 0, close the valve.

    Comment


      #47
      I havent used timers as a 'countdown' timer, but I do use them to track the runtime of:
      --swimming pool booster pump
      --swimming pool main pump
      --2 HVAC Units

      I display the current timer values in HSTouch, then at midnight, I dump the timers to a file, then reset them. I havent done anything with the data just yet. I'd like to graph them at some point.
      Attached Files
      HS4Pro on a Raspberry Pi4
      54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
      Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

      HSTouch Clients: 1 Android

      Comment


        #48
        That's cool. Currently I have only 1 timer. It keeps track of how long the internet is down.
        I plan to add another to keep track of monthly irrigation water usage once I measure each zone.
        I like your HVAC timer. It would give a 'heads up' of electricity usage before getting the bill. I think I'll add that too.

        Comment


          #49
          I read that the values of counters and timers are lost when HS reboots. How do you store those values for long term usage?

          Comment


            #50
            Originally posted by RJS View Post
            I read that the values of counters and timers are lost when HS reboots.
            Not true. values are retained for counters and timers. Only variable values are volatile.... very volatile. Vexing, eh?
            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

            Comment


              #51
              Originally posted by macromark View Post
              Not true. values are retained for counters and timers. Only variable values are volatile.... very volatile. Vexing, eh?
              Great!

              Comment


                #52
                Originally posted by RJS View Post
                I read that the values of counters and timers are lost when HS reboots. How do you store those values for long term usage?
                At midnight, I have a script to write them to a file.

                Sent from my SCH-R970X using Tapatalk
                HS4Pro on a Raspberry Pi4
                54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                HSTouch Clients: 1 Android

                Comment


                  #53
                  Trigger on timer state

                  I'm starting to look at timers and am trying to figure out how to trigger on timer state. For example "if motor1 is on AND timer1 is stopped THEN resume timer1" kind of thing. Anybody know how to do this?

                  Comment


                    #54
                    Originally posted by upstatemike View Post
                    I'm starting to look at timers and am trying to figure out how to trigger on timer state. For example "if motor1 is on AND timer1 is stopped THEN resume timer1" kind of thing. Anybody know how to do this?
                    There aren't conditions on whether timers are running or not, but in your example you would simply resume timer. If it is stopped it will resume, if it is running nothing will happen.
                    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #55
                      That probably wasn't a great example... in real life a "timer is running" trigger is more likely to be used in a watchdog event to ensure that a timer isn't left running due to a missed state change that was supposed to stop it. The watchdog is set to detect a situation that should never occur such as the timer is running when the motor is not.

                      Comment


                        #56
                        Originally posted by upstatemike View Post
                        That probably wasn't a great example... in real life a "timer is running" trigger is more likely to be used in a watchdog event to ensure that a timer isn't left running due to a missed state change that was supposed to stop it. The watchdog is set to detect a situation that should never occur such as the timer is running when the motor is not.
                        I use watchdogs that trigger when a timer's value is greater than it should ever be in normal operation. I use a bunch of 2 second timers to count button presses on devices within a 2 second time frame. My watchdog events stop and reset the timers when their value becomes greater than 3 seconds.
                        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #57
                          Is there a guide somewhere that shows how to program counters and timers. I'm trying to do something simple but just came seem to figure it out. All I wan to do is trigger an event when a toggle light switch is pressed twice in 2 seconds.

                          Comment


                            #58
                            See this thread
                            http://board.homeseer.com/showthread.php?t=171319

                            The key is that you will need atleast .184 Beta version of the zwave plugin (assuming your working with zwave)

                            Comment


                              #59
                              Originally posted by skarragallagher View Post
                              See this thread
                              http://board.homeseer.com/showthread.php?t=171319

                              The key is that you will need atleast .184 Beta version of the zwave plugin (assuming your working with zwave)
                              Thanks I now see the logic of how it works. I don't use Z-wave but Insteon. It does count switch press but still have a problem. If I want to trigger and event when double taping a switch in the off position I set it to count when value of switch becomes off. When I press the first time it counts the press but it doesn't count the second one because it's already off so value doesn't change. Anyway around this.

                              Comment


                                #60
                                Originally posted by freeon View Post
                                Thanks I now see the logic of how it works. I don't use Z-wave but Insteon. It does count switch press but still have a problem. If I want to trigger and event when double taping a switch in the off position I set it to count when value of switch becomes off. When I press the first time it counts the press but it doesn't count the second one because it's already off so value doesn't change. Anyway around this.
                                This may or may not be possible. For us with Zwave Devices, since the switch did indeed send the second Off or On command but the Zwave plugin was actually ignoring it, we had to put in a request for the makers of the plugin to fix. I would suggest that you do the same.

                                Prior to the fix though the work around (which was less than ideal) was to use the "when the device changed" as a trigger and then do On/Off commands within a period of time to trigger events.

                                Comment

                                Working...
                                X