Announcement

Collapse
No announcement yet.

Trigger "Has Been For At Least" and Device Last Change Time

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

    Trigger "Has Been For At Least" and Device Last Change Time

    Hi.

    I have an event set to fire if some device has been set to "off" for at least 5 minutes. It's a rare condition, but it happened today - switch was set to off, but the event never fired.

    In trying to diagnose why the event never fired I saw that I had set the virtual device to always update the device last change time. I did this so I'd have an easy way to see that the script responsible for checking the conditions for this switch, which are external to HS, was operating.

    This script runs every two minutes, meaning that for a period of time, the Last Change Time for this switch was being set to "Off" every two minutes. Would that have prevented the event condition (Off for at least 5 minutes) from firing?

    Thanks.

    #2
    Originally posted by HSAccord View Post
    Hi.

    I have an event set to fire if some device has been set to "off" for at least 5 minutes. It's a rare condition, but it happened today - switch was set to off, but the event never fired.

    In trying to diagnose why the event never fired I saw that I had set the virtual device to always update the device last change time. I did this so I'd have an easy way to see that the script responsible for checking the conditions for this switch, which are external to HS, was operating.

    This script runs every two minutes, meaning that for a period of time, the Last Change Time for this switch was being set to "Off" every two minutes. Would that have prevented the event condition (Off for at least 5 minutes) from firing?

    Thanks.
    Yes. HomeSeer (and EasyTrigger) look to the last changed date time to calculate when it was last set or changed. You will need to have your script update it without setting the time, or use a separate timer.

    Comment


      #3
      Thanks rprade.

      I set that virtual device to not update the last change time if the value hasn't changed.

      I'll figure out some other way to make sure the script is running.

      Comment

      Working...
      X