Announcement

Collapse
No announcement yet.

Conditions - A Timer's Value Is...

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

    Conditions - A Timer's Value Is...

    Just like Counters, you can also create or manipulate a timer from the Tools> Global Variables, Timers & Counters tab at the top of the HomeSeer Web Interface.



    There are only three choices for timer conditions. They are much simpler than conditions as they only run forward. A timer always counts up. It can be stopped, restarted (reset and started), set to a value or resumed from where they are stopped. A timer increments by the second and can accumulate to days, hours, minutes and seconds. It is not stated if there is a technical limit to the number of days a timer can run. Timers do persist over a restart. A timer that is running will reflect a value such that it ran even when HomeSeer is down. If it is stopped when HS is shut down the value is retained. Obviously the timer will not respond to the usual start/stop triggers when HS is not running, so it could be way off when HS is restarted, depending on it's state when HS was shut down and for how long. It is not dependent upon the "Enable event catch-up upon power restoration" setting.







    As far as choosing and creating timers within an event, it is almost identical to counters. You can pick from a list of existing timers







    If you click on Create/Edit Timers, you will get a dialogue where you can enter a new name and create one, or choose among the existing timers. If you try to create a timer with the same name as an existing timer, you will be notified that it exists and you can choose a new name. Be very careful cutting from another document and pasting into this name. If you paste a character that does not belong to the basic ASCII character set, you can corrupt the timer database.







    If you have already selected a timer, the dialogue from Create/Edit Timers will offer for you to rename it, create a new timer or choose among existing timers. As above be very careful cutting from another document and pasting into these windows. If you paste a character that does not belong to the basic ASCII character set, you can corrupt the timer database.







    Just like counters, timers can be manipulated from event actions. We will cover those actions later in another post.
    Last edited by randy; February 7, 2015, 01:03 PM.
    HS4 Pro, Windows 10 pro

    #2
    Many thanks for this timer lesson can someone post some examples of timer start stop reset and how they might use them

    Comment


      #3
      Originally posted by devoir View Post
      Many thanks for this timer lesson can someone post some examples of timer start stop reset and how they might use them
      I put some examples in an appliance monitoring post a few weeks ago.

      The washing machine presented a little bit of a problem because there are times during all cycles when the only current it draws are the water valves and during other cycles there are some pauses where the current drops to almost nothing, but it has not completed the full cycle. Because it has an electronic control panel it will always draw a few watts. To accurately monitor this appliance I needed to know when the power consumption remained low for at least 2 minutes. Since there is no condition that allows me to see if "a device has been less than/for at least...", I used four events and a timer to properly monitor the status.

      The first event is triggered when the washing machine begins to draw current and turns the virtual device ON






      So that I can allow the current to drop for a period of time before reporting that it is actually off, when the current drops I start a timer called "Washing Machine OFF". I created the timer as described in the first post above. Whenever the washing machine is drawing less than 20 watts, this timer is started.







      If current draw increases above the 20 watt threshold while the timer is running, I stop the timer and reset it to 0.





      The final event continually looks at the value of that timer. If the timer reaches 2 minutes I know the washing machine is actually finished with its cycle and turn the virtual device off. I stop and reset the timer to get it ready for the next cycle.




      You can control timers through events, then look at a timer's value as a condition within an event.
      HS4 Pro, Windows 10 pro

      Comment

      Working...
      X