Global

Methods

calculateZigBeeDimDuration(opts, settings) → {number}

Calculate a transtime value for ZigBee clusters, it takes two parameters, opts and settings. Opts is the opts object provided by a capbilityListener which can hold a duration property (in miliseconds), settings is an object which can hold a 'transition_time' property (in seconds). If none are available, the default is 0. The valid value range is 0 - 6553.

Parameters:
Name Type Description
opts object
Properties
Name Type Description
duration number

Duration property in miliseconds (preferred over 'transition_time')

settings object
Properties
Name Type Description
transition_time number

Transition time property in seconds

Returns:
Type
number

calculateZwaveDimDuration(duration) → {number}

Calculate a duration value for SWITCH_MULTILEVEL and SWITCH_BINARY from an input value in milliseconds. Below 127 the value is in seconds, above the value is in minutes. Hence, above 127 some rounding might occur. If a value larger than 7560 is entered it will be maxed at 254 (longest duration possible).

Parameters:
Name Type Description
duration number

Dim duration in milliseconds (0 - 7560000ms)

Returns:

Range 0 - 254 (short to long) 1-127 = 1 second – 127 seconds 128 – 253 = 1 minute – 126 minutes 254 max

Type
number

determineAndSaveState(value)

Based on the windowcoverings_state value this method calculates and stores the corresponding SWITCH_BINARY value, taking into account the possible invertWindowCoveringsDirection setting.

Parameters:
Name Type Description
value string

windowcoverings_state value ('down'/'up' or 'idle')

Type Definitions

CIE

Type:
  • Object
Properties:
Name Type Description
x number

CIE x (small x) value, range 0 - 0.8 (for ZigBee X multiply by 65279)

y number

CIE y (small y) value, range 0 - 0.9 (for ZigBee Y multiply by 65279)

HSV

Type:
  • Object
Properties:
Name Type Description
hue number

Hue value, range 0 - 1.

saturation number

Saturation value, range 0 - 1.

value number

Value (brightness) value, range 0 - 1.

RGB

Type:
  • Object
Properties:
Name Type Description
red number

Red value, range 0 - 255.

green number

Green value, range 0 - 255.

blue number

Blue value, range 0 - 255.