Skip to content

Controller Node Setup

crxporter edited this page Oct 7, 2021 · 3 revisions

A Z-Wave Controller for Node-RED, based on Z-Wave JS. This is the main node, it is responsible fr everything and serves as the configuration for your USB Z-Wave radio.

Setup

The only required field is "Serial Port", where you must select the location of your USB Z-Wave radio (typically /dev/ttyACM0 on most Linux setups).

Encryption keys are required only if you are pairing devices in secure mode. They may be entered manually as hex strings or generated randomly using the "Generate" button on the right of each field. If these keys are lost, all devices paired in secure mode will need to be reset to factory and paired again as new devices.

Once this node is properly linked to a USB controller, the Z-Wave network setup will be available in the UI panel on the right side of your Node-RED editor. Click here for more information about this user interface.

Inputs

The input to this node is expected to be a msg.payload object containing a Z-Wave command. The zwave-js node can receive commands for the Controller itself or for any of the Devices on your Z-Wave network.

The format of each msg.payload object is dependant on which API is being used. The zwave-js node will accept any command from any of the APIs available. Follow the links below for more details on the proper formatting and message options for each API.

Controller API is used for network wide operations such as healing your network, manual firmware updates, removing failed nodes, and more.

Associations API is used to send change advanced associations between specific devices.

Driver API is a small set of methods which can pull data from the Z-Wave JS library. It allows to get the full (locally stored) Value Database and some statistics.

CC API is option 1 of 2 for communication to a single Z-Wave device (node) on your network. These messages can be formed using the cmd-factory node.

Value API is option 2 of 2 for communication to a single Z-Wave device (node) on your network. These messages can be formed using the cmd-factory node.

Outputs

The first output from this node will consist of all messages. This includes messages related to the controller and any Z-Wave device on your network. There is no internal filter, all messages from the controller and all nodes will always be output from this node. Detailed information about the messages from Z-Wave into Node-RED is available here.

A second output is provided when the Z-Wave JS Logging from Pin 2 is enabled. Select a log level in the "Level (Pin 2)" field to enable JSON logs being output into your Node-RED flows.