Announcement

Collapse
No announcement yet.

script: has been ON for a least

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

  • script: has been ON for a least

    Hi all,

    The standard GUI for HS2 has an option to trigger an event by 'has been ON for at least...'. I'm trying to achieve the same thing in a script I'm using, but I can't find this option.

    Is this option available for scripting? If not; anyone got an idea how to accomplish this?

    Thanks!

  • #2
    Try:
    Current trigger type: Condition
    Then you will see an options box below with what you are looking for.
    ______________________________
    Skibumsplace - Locate Me

    Comment


    • #3
      Did anyone get this to work? I'm trying to do the same thing for my DSC zones. My script is parsing through a list of zones and I only want to alert on the ones that are open for less than 10 seconds.

      Comment


      • #4
        Originally posted by Sireone View Post
        My script is parsing through a list of zones and I only want to alert on the ones that are open for less than 10 seconds.
        This scripting function will give you the time since device with Ref # nnnn last changed, in minutes. If you add a condition that the zone is faulted, does that give you what you are looking for?

        Code:
        DateDiff("n",hs.DeviceLastChangeRef(nnnn),NOW),true)
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

        Comment


        • #5
          Originally posted by Uncle Michael View Post
          This scripting function will give you the time since device with Ref # nnnn last changed, in minutes. If you add a condition that the zone is faulted, does that give you what you are looking for?

          Code:
          DateDiff("n",hs.DeviceLastChangeRef(nnnn),NOW),true)
          Thanks Mike. I actually ended up using the DeviceTime function to acheive this. Works great.

          https://forums.homeseer.com/showthread.php?t=169589

          Comment

          Working...
          X