Global

Type Definitions

AttributeReportingConfiguration

AttributeReportingConfiguration

Type

  • object

Properties

Name Type Description
cluster
ClusterSpecification
attributeName
string

The name of the attribute (e.g. onOff)

minInterval
number <optional> default: 0

The minimum reporting interval in seconds (e.g. 10), the default value is 0 which imposes no minimum limit (unless one is imposed by the specification of the cluster using this reporting mechanism). Range: 0 - 65535.

maxInterval
number

The maximum reporting interval in seconds (e.g. 300), this value must be larger than 60 and larger than minInterval. When this parameter is set to 65535 the device shall not issue reports for the specified attribute. When this parameter is set to 0 and the minInterval is set to 65535 the device will revert back to its default reporting configuration. Range: 0 - 65535.

minChange
number <optional> default: 1

The minimum value the attribute has to change in order to trigger a report. For attributes with 'discrete' data type this field is irrelevant. If minInterval is set to 65535, and maxInterval to 0, this value will be set to 0. See section 2.5.7.1.7 of the Zigbee Cluster Library specification version 1.0, revision 6.

endpointId
EndpointId <optional> default: 1

The endpoint index (e.g. 1)

CapabilityId

CapabilityId

Homey.Device capability id (e.g. onoff)

Type

  • string

CIExyY

CIExyY

Type

  • Object

Properties

Name Type Description
x
number

CIE x (small x) value, range 0 - 1 (for Zigbee CurrentX multiply by 65536)

y
number

CIE y (small y) value, range 0 - 1 (for Zigbee CurrentY multiply by 65536)

Y
number

CIE Y value, range 0 - 100, this represents the luminance which is not used by the Zigbee color control cluster.

ClusterCapabilityConfiguration

ClusterCapabilityConfiguration

Type

  • object

Properties

Name Type Description
get
string <optional>

Cluster attribute as specified in Cluster.ATTRIBUTES. This attribute will be fetched by Cluster.readAttributes when the capability value needs to be fetched.

set
string <optional>

Cluster command as specified in Cluster.COMMANDS, this command will be executed when the capability is set.

setParser
SetParserFunction <optional>

Method that will be called before set is called, to generate the parameters for the Cluster command execution.

report
string <optional>

Cluster attribute as specified in Cluster.ATTRIBUTES. When a report is received for this attribute the respective reportParser will be called.

reportParser
ReportParserFunction <optional>
endpoint
EndpointId <optional> default: 1

The ZCLNode's endpoint to use for this configuration.

getOpts
object <optional>

Options object specific for get.

getOnStart
boolean <optional> default: false

Fetches the get attribute when the ZCLNode is first initialized and the capability value is unknown (i.e. null). Note: this only works for non-sleepy devices.

getOnOnline
boolean <optional> default: false

Fetches the get attribute when the ZCLNode comes online (i.e. Homey received an end device announce indication, directly after receiving this a sleepy node should be able to respond to any request).

pollInterval
number | string <optional>

Number: interval (in ms) to poll get. String: the Homey.Device's setting key which represents a user configurable poll interval value.

}

ClusterSpecification

ClusterSpecification

Object containing the cluster name and id.

Type

  • object

Properties

Name Type Description
NAME
string

Cluster name (e.g. 'onOff')

ID
number

Cluster id (e.g. 4)

EndpointId

EndpointId

Zigbee Endpoint.ID (e.g. 1)

Type

  • number

HSV

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.

MultipleCapabilitiesConfiguration

MultipleCapabilitiesConfiguration

Type

  • object

Properties

Name Type Description
capabilityId
CapabilityId
cluster
ClusterSpecification
userOpts
ClusterCapabilityConfiguration

ReportParserFunction

ReportParserFunction(reportValue): any|null|Promise

This method is called when a report is received for the report attribute. In this method the reportValue can be parsed and mapped to become a valid Homey.Device capability value.

Parameters

Name Type Description
reportValue
any

Returns

  • If return value is null the Homey.Device capability value will not be changed.
any | null | Promise

SetParserFunction

(async) SetParserFunction(setValue): Promise.<(object|null)>

This method is given a setValue and will use that to generate an object with the needed command attributes as specified in Cluster.COMMANDS. This object will be provided to the Cluster command as parameters when executed.

Parameters

Name Type Description
setValue
any

Returns

  • If return value is null the command will not be executed.
Promise.<(object|null)>