new ZwaveDevice()
Device settings used by system capabilities:
invertWindowCoveringsDirection {boolean}
- Used by several windowcoverings capabilities, if true it will invert the up/down directioninvertWindowCoveringsTiltDirection {boolean}
- Used by several windowcoverings capabilities, if true it will invert the tilt direction
Properties:
Name | Type | Description |
---|---|---|
thermostatSetpointType |
string | The 'Setpoint Type' used in the THERMOSTAT_SETPOINT commandclass for the target_temperature capability |
Extends
Methods
(async) configurationGet(options) → {*}
Method that retrieves the value of a configuration parameter from the node.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Returns:
- Type
- *
(async) configurationSet(options, value) → {Promise.<*>}
Wrapper for CONFIGURATION_SET. Provide options.id and/or options.index and options.size. By default options.useSettingParser is true, then the value will first be parsed by the registered setting parser or the system parser before sending. It will only be able to use the registered setting parser if options.id is provided.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Properties
|
|||||||||||||||||||||||||||||||
value |
Returns:
- Type
- Promise.<*>
disableDebug()
Disable debugging to the console
- Inherited From:
enableDebug()
Enable debug logging on this device. Logs all incoming reports.
- Overrides:
(async) executeCapabilitySetCommand(capabilityId, commandClassId, value, opts) → {Promise.<(string|*)>}
This method executes the capability set command for a given capability/commandClass combination. The capability and commandClass must be registered before this method is called.
Parameters:
Name | Type | Description |
---|---|---|
capabilityId |
string | |
commandClassId |
string | |
value |
Mixed | the capability value to set (e.g 0 - 1 for dim) |
opts |
Object | capability options object |
Returns:
- Type
- Promise.<(string|*)>
getCommandClass(commandClassId, opts) → {Error|boolean|*}
Method that gets a CommandClass object by commandClassId. Optionally, it can get the object on a multichannel node if the multiChannelNodeId is provided.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
commandClassId |
String | |||||||
opts |
Object |
Properties
|
Returns:
- Type
- Error | boolean | *
getManifestSetting(id) → {Object|Error}
Get a specific setting object from the manifest
Parameters:
Name | Type | Description |
---|---|---|
id |
Setting id to retrieve |
Returns:
- Type
- Object | Error
getManifestSettings() → {Array}
Method that flattens possibly nested settings and returns a flat settings array.
Returns:
- Type
- Array
getMultiChannelNodeIdsByDeviceClassGeneric(deviceClassGeneric) → {Array}
Method that gets all multi channel node ids that have a specific deviceClassGeneric.
Parameters:
Name | Type | Description |
---|---|---|
deviceClassGeneric |
String |
Returns:
- Type
- Array
hasCommandClass(commandClassId, opts) → {boolean}
Method that will check if the node has the provided command class
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
commandClassId |
string | For example: SWITCH_BINARY |
||||||
opts |
Object |
Properties
|
Returns:
- Type
- boolean
(async) meterReset(multiChannelNodeId) → {Promise.<unknown>}
Method that resets the accumulated power meter value on the node. It tries to find the root node of the device and then looks for the COMMAND_CLASS_METER.
Parameters:
Name | Type | Description |
---|---|---|
multiChannelNodeId |
define the multi channel node id in case the COMMAND_CLASS_METER is on a multi channel node |
Returns:
- Type
- Promise.<unknown>
onDeleted()
Remove all listeners and intervals from node
- Overrides:
(async) onSettings(oldSettings, newSettings, changedKeysArr) → {Promise.<T>}
Method that handles changing settings for Z-Wave devices. It iterates over the changed settings and executes a CONFIGURATION_SET in sync. If all succeed, it will resolve, if one or more fail it will reject with an error of concatenated error messages (to see which settings failed if more than one).
Parameters:
Name | Type | Description |
---|---|---|
oldSettings |
||
newSettings |
||
changedKeysArr |
Returns:
- Type
- Promise.<T>
printNode()
Print the current Node information with Command Classes and their versions
(async) refreshCapabilityValue(capabilityId,, commandClassId,) → {Promise.<unknown>}
Method that refreshes the capability value once. If you want to poll this value please use the parameter getOpts.pollInterval at ZwaveDevice#registerCapability
Parameters:
Name | Type | Description |
---|---|---|
capabilityId, |
String | the string id of the Homey capability |
commandClassId, |
String | the Z-Wave command class used for this request |
Returns:
- Type
- Promise.<unknown>
registerCapability(capabilityId, commandClassId, optsopt)
Register a Homey Capability with a Command Class.
Multiple parser
methods can be provided by appending a version, e.g. getParserV3
. This will make sure that the highest matching version will be used, falling back to getParser
.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
capabilityId |
string | The Homey capability id (e.g. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commandClassId |
string | The command class id (e.g. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
opts |
Object |
<optional> |
The object with options for this capability/commandclass combination. These will extend system options, if available ( Properties
|
registerMultiChannelReportListener(multiChannelNodeId, commandClassId, commandId, triggerFn)
Register a multi channel report listener, which is called when a report has been received.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
multiChannelNodeId |
number | The multi channel node id |
||||||
commandClassId |
string | The ID of the Command Class (e.g. |
||||||
commandId |
string | The ID of the Command (e.g. |
||||||
triggerFn |
function |
Properties
|
registerReportListener(commandClassId, commandId, triggerFn)
Register a report listener, which is called when a report has been received.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
commandClassId |
string | The ID of the Command Class (e.g. |
||||||
commandId |
string | The ID of the Command (e.g. |
||||||
triggerFn |
function |
Properties
|
registerSetting(settingId, parserFn)
Register a setting parser, which is called when a setting has changed.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
settingId |
string | The setting ID, as specified in |
|||||||||
parserFn |
function | The parser function, must return a Buffer, number or boolean Properties
|