-
-
Notifications
You must be signed in to change notification settings - Fork 6
Value API
The Z-Wave JS Value API, is very much used to drive User Interfaces (as such, is used on the UI tab).
You can however, still use it via a message only protocol.
It's a little more involved, and is generally not as straight forward to use. One benefit however, is that it confirms that Values are actually updated.
Important Note:
Values received from this API, are from a cache, and not directly from the device.
Of course the cache itself, is updated as and when Z-Wave devices send updates.
Get the list of ValueIDs for a Node.
Note: The Value IDs them self, are not actually numerical values, they are objects, but are referred to as an ID.
let Message = {
"payload": {
"mode": "ValueAPI",
"node": 2,
"method": "getDefinedValueIDs",
}
}
return Message
Get the metadata/structure of a Value.
Note: The ValueID is an object, and not a numerical value.
let Message = {
"payload": {
"mode": "ValueAPI",
"node": 2,
"method": "getValueMetadata",
"params": [<ValueID>]
}
}
return Message
Sets a Value.
Note: The ValueID is an object, and not a numerical value.
let Message = {
"payload": {
"mode": "ValueAPI",
"node": 2,
"method": "setValue",
"params": [<ValueID>,<Value>]
}
}
return Message
Sets a Value, whilst adding some behavioural properties to it.
Note: The ValueID is an object, and not a numerical value.
let Options = {
transitionDuration:"1m10s", // Multilevel Switch
volume: 30 // Sound Switch
}
let Message = {
"payload": {
"mode": "ValueAPI",
"node": 2,
"method": "setValue",
"params": [<ValueID>,<Value>,Options]
}
}
return Message
Obtains a Value.
Note: The ValueID is an object, and not a numerical value.
let Message = {
"payload": {
"mode": "ValueAPI",
"node": 2,
"method": "getValue",
"params": [<ValueID>]
}
}
return Message
Poll the device, causing a Cached Value to be updated.
Note: The ValueID is an object, and not a numerical value.
let Message = {
"payload": {
"mode": "ValueAPI",
"node": 2,
"method": "pollValue",
"params": [<ValueID>]
}
}
return Message
- getPowerlevel
- getRFRegion
- toggleRF
- getNodes
- keepNodeAwake
- getNodeNeighbors
- setNodeName
- setNodeLocation
- refreshInfo
- healNode
- beginHealingNetwork
- stopHealingNetwork
- removeFailedNode
- proprietaryFunction