Skip to content
kmarkley edited this page Nov 29, 2017 · 2 revisions

Device Descriptions

Activity Timer devices

Activity Timer devices infer an ongoing activity from one or more momentary inputs. Devices will turn on if the number of inputs reaches a defined threshold within a defined period of time. Devices will expire (turn off) after a defined period of time with no additional inputs.

Once configured, these devices are simply ON to indicate recent activity and OFF to indicate no recent activity.

The most common use is inferring activity in a room or area by tracking motion sensors. I commonly wish to have more than one motion sensor activate before assuming a room is in use, and extend the timeout when one or more motion sensors are re-activated.

I first wrote the plugin for this scenario and in one case was able to replace 13 indigo entities (2 variables, 2 timers, and 9 triggers) with a single plugin device.

Threshold Timer devices

These devices are similar to Activity Timer devices, but are intended to track non-momentary inputs. Devices turn on when tracked inputs reach a defined threshold. When the count of inputs becomes less than the threshold a timer is started and devices turn off when the timer expires.

Once configured, these devices are simply ON to indicate recently reaching threshold and OFF to indicate not recently reaching threshold.

This is useful for motion sensors that remain on for an extended period and thus do not repeatedly trigger when additional motion is detected.

Persistence Timer devices

These devices track the state of a single device or variable, but only change state after the tracked entity state has persisted for a defined period of time.

Once configured, these devices are just ON or OFF to reflect the delayed/confirmed state of some other device or variable (eliminating the need for cancel-delayed-action actions).

An obvious example if you want to track if a door has been left open or closed, but ignore the door being opened or closed momentarily.

Lockout Timer devices

These devices track a single device or variable and change state immediately when the tracked entity changes, but will lockout (ignore) subsequent changes for a user-defined period of time. At the end of the lockout period, the plugin will reevaluate if the tracked entity has changed in the interim, and initiate another lockout period if it has.

Once configured, these devices are just ON or OFF to reflect the state of some other device or variable, but are guaranteed not to change more often than some pre-set period of time (allowing your triggered actions to complete before, say, reversing themselves).

This is useful when a device oscillates at its transition point. For example, a presence detector may report OFF-ON-OFF when exiting. Lockout Timer devices will react to the first change and ignore subsequent changes if the occur within the lockout period.

Alive Timer devices

These devices track whether single device or variable is alive and becomes OFF when the tracked entity hasn't changed for a user-defined period of time.

Once configured, these devices are just ON or OFF to reflect whether or not some other device or variable has been seen within some pre-set period of time.

The obvious use is battery-powered devices like sensors. Unlike the other device types, these will react to heartbeats even if none of device's states have changed value.

Running Timer devices

These devices track how long a single device or variable has been running and calculate accumulated ON times over various time periods.

Once configured, these devices are just ON or OFF to reflect whether or not some other device or variable is ON or OFF.

Device states report how long the tracked entity was ON during the current and prior hour, day, week, month, and year.

Plugin configuration

  • Show Timer

    • Check have Indigo display a countdown timer for each device when appropriate.
    • Uncheck to reduce the communication overhead between Indigo and the plugin.
  • Enable Debugging

    • Check to log basic debugging information to the Indigo event log.
  • Verbose Debugging

    • Check to log extensive debugging information to the Indigo event log. If 'Show Timers' is set, this will include multiple log entries every second.

Activity Timer devices

Configuration

  • Threshold
    The number of momentary inputs before the device turns on.
  • Reset Cycles and Reset Units
    How long before the device gives up and starts over counting inputs from zero.
  • Off Cycles and Off Units
    How long before the device turns off when there are no additional inputs.
  • Always Extend
    When checked, the expire time will reset with every additional input. When unchecked, the expire time will only be extended when the threshold is met.
  • Device N and State N
    Select devices and their associated states to track as inputs for the device.
  • Variable N
    Select variables to track as inputs for the device.
  • Logic
    • Any: any change to device states or variable value is considered an input.
    • Simple: device states or variable values that can be understood as true/false are considered inputs.
      • Reverse?
        Reverse the logic. I.e. consider False values as inputs.
    • Complex: provide specific comparison logic to determine what is considered an input.
      • Operator
        The operator used to compare device states and variable values to a reference value.
      • Comparison
        The reference value for comparison.
      • Data Type
        • String: compare as strings.
        • Number: compare as number (float)
  • Log On/Off
    Choose whether or not to log device on/off changes to the Indigo event log.

States

  • count (int): current count toward threshold.
  • counting (bool): whether the device is acquiring inputs toward threshold.
  • displayState (str): state to display in indigo client interface.
  • expired (bool): true when device expires (as opposed to being forced off).
  • offString (str): timestamp of scheduled expiration.
  • offTime (float): epoch time of scheduled expiration.
  • onOffState (bool): whether the device is on or off.
  • reset (bool): true when the device stops counting inputs and resets the counter.
  • resetString (str): timestamp of schedule reset.
  • resetTime (float): epoch time of scheduled reset.
  • state (enum): one of
    • idle: nothing is happening.
    • accrue: device is counting up to threshold.
    • active: device is on and still counting inputs.
    • persist: device is waiting to either expire or receive more inputs.

Threshold Timer devices

Configuration

  • Threshold
    The number of inputs required for the device to turn on.
  • Off Cycles and Off Units
    How long before the device turns off after count drops below threshold.
  • Device N and State N
    Select devices and their associated states to track as inputs for the device.
  • Variable N
    Select variables to track as inputs for the device.
  • Logic
    • Simple: device states or variable values that can be understood as true/false are considered inputs.
      • Reverse?
        Reverse the logic. I.e. consider False values as inputs.
    • Complex: provide specific comparison logic to determine what is considered an input.
      • Operator
        The operator used to compare device states and variable values to a reference value.
      • Comparison
        The reference value for comparison.
      • Data Type
        • String: compare as strings.
        • Number: compare as number (float)
  • Log On/Off
    Choose whether or not to log device on/off changes to the Indigo event log.

States

  • count (int): current count toward threshold.
  • counting (bool): whether the device is acquiring inputs toward threshold.
  • displayState (str): state to display in indigo client interface.
  • expired (bool): true when device expires (as opposed to being forced off).
  • offString (str): timestamp of scheduled expiration.
  • offTime (float): epoch time of scheduled expiration.
  • onOffState (bool): whether the device is on or off.
  • state (enum): one of
    • idle: nothing is happening.
    • accrue: device is counting up to threshold.
    • active: threshold is met and device is on.
    • persist: device is waiting to either expire or receive more inputs.

Persistence Timer devices

Configuration

  • ON Persist Cycles and ON Persist Units
    How long a tracked device/variable must be on/true before plugin device turns on.
  • OFF Persist Cycles and OFF Persist Units
    How long a tracked device/variable must be off/false before plugin device turns off.
  • Track
    Choose whether to track a device state or variable value.
    • Device and State
      Choose a device and state to track.
    • Variable
      Choose a variable to track.
  • Logic
    • Simple: device states or variable values that can be understood as true/false are considered inputs.
      • Reverse?
        Reverse the logic. I.e. consider False values as inputs.
    • Complex: provide specific comaparison logic to determine what is considered an input.
      • Operator
        The operator used to compare device states and variable values to a reference value.
      • Comparison
        The reference value for comparison.
      • Data Type
        • String: compare as strings.
        • Number: compare as number (float)
  • Log On/Off
    Choose whether or not to log device on/off changes to the Indigo event log.

States

  • displayState (str): state to display in indigo client interface.
  • offString (str): timestamp of scheduled off.
  • offTime (float): epoch time of scheduled off.
  • onOffState (bool): whether the device is on or off.
  • onString (str): timestamp of scheduled on.
  • onTime (float): epoch time of scheduled on.
  • pending (bool): true when tracked device/variable has changed and plugin device is waiting to also change.
  • state (enum): one of
    • on: the tracked device/variable and plugin device are both on.
    • off: the tracked device/variable and plugin device are both off.
    • pending: the tracked device/variable has changed and plugin device is waiting to also change.

Lockout Timer devices

Configuration

  • ON Lockout Cycles and ON Lockout Units
    How long after turning ON before plugin device may turn back OFF.
  • OFF Lockout Cycles and OFF Lockout Units
    How long after turning OFF before plugin device may turn back ON.
  • Track
    Choose whether to track a device state or variable value.
    • Device and State
      Choose a device and state to track.
    • Variable
      Choose a variable to track.
  • Logic
    • Simple: device states or variable values that can be understood as true/false are considered inputs.
      • Reverse?
        Reverse the logic. I.e. consider False values as inputs.
    • Complex: provide specific comaparison logic to determine what is considered an input.
      • Operator
        The operator used to compare device states and variable values to a reference value.
      • Comparison
        The reference value for comparison.
      • Data Type
        • String: compare as strings.
        • Number: compare as number (float)
  • Log On/Off
    Choose whether or not to log device on/off changes to the Indigo event log.

States

  • displayState (str): state to display in indigo client interface.
  • locked (bool): whether the plugin device is locked out.
  • offString (str): timestamp of off lockout expiration.
  • offTime (float): epoch time of off lockout expiration.
  • onOffState (bool): whether the device is on or off.
  • onString (str): timestamp of on lockout expiration.
  • onTime (float): epoch time of on lockout expiration.
  • state (enum): one of
    • on: the tracked device/variable and plugin device are both on.
    • off: the tracked device/variable and plugin device are both off.
    • locked: the plugin device is prevented from changing state until the timer expires.

Alive Timer devices

Configuration

  • Alive Cycles and Alive Units
    Inactive period before device turns off.
  • Track
    Choose whether to track a device state or variable value.
    • Device
      Choose a device to track.
    • Variable
      Choose a variable to track.
  • Log On/Off
    Choose whether or not to log device on/off changes to the Indigo event log.

States

  • displayState (str): state to display in indigo client interface.
  • offString (str): timestamp of off lockout expiration.
  • offTime (float): epoch time of off lockout expiration.
  • onOffState (bool): whether the device is on or off.
  • state (enum): one of
    • on: the tracked device/variable is alive.
    • off: the tracked device/variable is not alive.

Running Timer devices

Configuration

  • Update Frequency
    How often to update the time statistics in the device's states. The plugin device will always be updated when the tracked entity changes.
  • Track
    Choose whether to track a device state or variable value.
    • Device and State
      Choose a device and state to track.
    • Variable
      Choose a variable to track.
  • Logic
    • Simple: device states or variable values that can be understood as true/false are considered inputs.
      • Reverse?
        Reverse the logic. I.e. consider False values as inputs.
    • Complex: provide specific comaparison logic to determine what is considered an input.
      • Operator
        The operator used to compare device states and variable values to a reference value.
      • Comparison
        The reference value for comparison.
      • Data Type
        • String: compare as strings.
        • Number: compare as number (float)
  • Log On/Off
    Choose whether or not to log device on/off changes to the Indigo event log.

States

  • displayState (str): state to display in indigo client interface.
  • offString (str): timestamp of last OFF.
  • offTime (float): epoch time of last OFF.
  • onOffState (bool): whether the device is on or off.
  • onString (str): timestamp of last ON.
  • onTime (float): epoch time of last ON.
  • state (enum): one of
    • on: the tracked device/variable and plugin device are both on.
    • off: the tracked device/variable and plugin device are both off.
  • secondsThis_Period_: the number of seconds the tracked entity has been ON for a given time period.
  • secondsLast_Period_: the number of seconds the tracked entity has been ON for the prior time period.
  • stringThis_Period_: string equivalent of secondsThis_Period_.
  • stringLast_Period_: string equivalent of secondsLast_Period_.

Actions

Force Timed Device Off

Force the plugin device to become off.
Related timers (expire, lockout) will be started.
For Activity Timer devices, reset and expired states will become true.

Force Timed Device On

Force the plugin device to become on.
Related timers (expire, lockout) will be started.