Skip to content

Controller API

Marcus Davies edited this page Jul 31, 2021 · 36 revisions

The Controller API, is used for network wide operations, but offers some utility methods also.
Its responsible for starting or stopping an Inclusion process for an example, as well as healing your network.

beginFirmwareUpdate

Update the Firmware for a ZWave Device

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "beginFirmwareUpdate",
        params: [<NodeID>, <TargetChipID>, <FileName>, <DataBuffer>]
    }
}
return Message

abortFirmwareUpdate

Aborts a firmware update

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "abortFirmwareUpdate",
        params: [<NodeID>]
    }
}
return Message

getRFRegion

Obtains the RF Region of your USB Stick

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "getRFRegion"
    }
}
return Message

setRFRegion

Sets the RF Region of your USB Stick.
Go Here for a list of regions

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "setRFRegion",
        params: ["Europe"]
    }
}
return Message

toggleRF

Turns on or off the usb Radio

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "toggleRF",
        params: [true]
    }
}
return Message

getNodes

Fetches a list of all nodes

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "getNodes"
    }
}
return Message

keepNodeAwake

Keeps a node awake, until it's been allowed to fall back to sleep.
Remember to switch back to false, else you could drain the battery of your device

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "keepNodeAwake",
        params: [<NodeID>, true | false]
    }
}
return Message

getNodeNeighbors

Returns the reported Neighbors, for a node as reported by the controller

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "getNodeNeighbors",
        params: [<NodeID>]
    }
}
return Message

setNodeName

Sets the name of a node.
If the Node supports the Node Naming and Location CC, the value is also written to the device

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "setNodeName",
        params: [<NodeID>,'Some Name']
    }
}
return Message

setNodeLocation

Sets the location of the node
If the Node supports the Node Naming and Location CC, the value is also written to the device

let Message = {
    payload: {
        mode: "ControllerAPI",
        method: "setNodeLocation",
        params: [<NodeID>,'Some Location']
    }
}
return Message