Skip to content

Driver API

Marcus Davies edited this page Sep 18, 2022 · 12 revisions

The Driver API, contains a small set of methods to aid in your setup. It also allows to obtain some network stats

getValueDB

Get the entire Value Database for your Network.

let Message = {
    payload: {
        mode: "DriverAPI",
        method: "getValueDB",
        params: [...<NodeIDs>] /* Optional */
    }
}
return Message

getControllerStatistics

Get Controller Network stats

let Message = {
    payload: {
        mode: "DriverAPI",
        method: "getControllerStatistics",
    }
}
return Message

getNodeStatistics

Get ZWave Node Network stats

let Message = {
    payload: {
        mode: "DriverAPI",
        method: "getNodeStatistics",
        params: [...<NodeIDs>] /* Optional */
    }
}
return Message

getLastEvents

Get last event timestamps for all your nodes

let Message = {
    "payload": {
        "mode": "DriverAPI",
        "method": "getLastEvents",
    }
}
return Message

checkLifelineHealth

Checks the health of the connection between the controller and this node and returns the results. The test is done in multiple rounds, which can be configured using the UI or the second parameter when called manually (default: 5). This can take a few minutes to complete, and will increase the more rounds you specify.

NOTE: This should not be done whilst large amounts of traffic is flowing through the network, as the result may be skewed.

let Message = {
    payload: {
        mode: "DriverAPI",
        method: "checkLifelineHealth",
        params: [<NodeID>, rounds] /* rounds is optional. Default = 5 */
    }
}
return Message

This will return an object that has the following meanings (after it completes):

object Meaning
routeChanges How many times at least one new route was needed. Lower = better, ideally 0.
latency The maximum time it took to send a ping to the node. Lower = better, ideally 10 ms.
numNeighbors How many routing neighbors this node has. Higher = better, ideally > 2.
failedPingsNode How many pings were not ACKed by the node. Lower = better, ideally 0.
minPowerlevel The minimum powerlevel where all pings from the node were ACKed by the controller. Higher = better, ideally -6dBm or more
snrMargin An estimation of the Signal-to-Noise Ratio Margin in dBm
rating The health rating expressed as a number from 0 (not working at all) to 10 (perfect connectivity).

The health rating is computed similar to Silabs' PC Controller IMA tool where 10 means perfect and 0 means not working at all. See full details regarding this health test on zwave-js docs.