new ZigBeeDevice()
Extends
Members
energyMap
Stub getter, can be overriden by subclass to provide energy properties per zb_product_id.
Example
class DimmableBulb extends ZigBeeDevice {
get energyMap() {
return {
'TRADFRI bulb E14 W op/ch 400lm': {
approximation: {
usageOff: 0,
usageOn: 10
}
}
}
}
}
Methods
disableDebug()
Disable debugging to the console
- Inherited From:
enableDebug()
Enable debugging to the console
- Inherited From:
getClusterEndpoint(clusterName)
Method that searches for the first occurrence of a clusterName in a device's endpoints and returns the endpoint id.
Parameters:
Name | Type | Description |
---|---|---|
clusterName |
string |
onDeleted()
Remove all listeners and intervals from node
- Inherited From:
printNode()
Print the current Node information with Endpoints and Clusters
(async) registerAttrReportListener(clusterId, attrId, minInt, maxInt, repChange, triggerFn, endpointIdopt) → {Promise}
Register an attribute report listener, which is called when a report has been received for the provided endpoint cluster and attribute combination.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
clusterId |
string | The ID of the cluster (e.g. |
||
attrId |
string | The ID of the attribute (e.g. |
||
minInt |
number | The minimal reporting interval in seconds (e.g. 10 (seconds)) |
||
maxInt |
number | The maximal reporting interval in seconds (e.g. 300 (seconds)) |
||
repChange |
number | null | Reportable change; the attribute should report its value when the value is changed more than this setting, for attributes of analog data type this argument is mandatory. |
|
triggerFn |
function | Function that will be called when attribute report data is received |
||
endpointId |
number |
<optional> |
0 | The endpoint index (e.g. 0) |
Returns:
Resolves if configuration succeeded
- Type
- Promise
registerCapability(capabilityId, clusterId, userOptsopt)
Register a Homey Capability with a Cluster.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
capabilityId |
string | The Homey capability id (e.g. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clusterId |
string | The Cluster id (e.g. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
userOpts |
Object |
<optional> |
The object with options for this capability/cluster combination. These will extend system options, if available ( Properties
|
registerMultipleCapabilities(capabilitiesOpts, fn)
Register multiple Homey Capabilities with a Cluster. When a capability is changed, the event will be debounced with the other capabilities in the capabilitiesOpts array.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
capabilitiesOpts |
Array.<Object> |
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fn |
function |
registerReportListener(clusterId, commandId, triggerFn, endpointIdopt)
Register a endpoint command listener, which is called when a command has been received from the provided endpoint cluster combination.
Parameters:
Name | Type | Attributes | Default | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
clusterId |
string | The ID of the cluster (e.g. |
|||||||||||
commandId |
string | The ID of the Command (e.g. |
|||||||||||
triggerFn |
function |
Properties
|
|||||||||||
endpointId |
number |
<optional> |
0 | The endpoint index (e.g. 0) |