Z-Wave Command Types.
Enumerator |
---|
EZWAVECOMMANDTYPE_GENERATE_RANDOM | Generate a specific number of random bytes.
- Parameters
-
[in] | GenerateRandom.iLength | Number of random bytes to generate. A maximum length of 32 random bytes is supported |
[out] | GenerateRandomStatus.iLength | Number of random bytes generated |
[out] | GenerateRandomStatus.aRandomNumber | Pointer to the randomly generated bytes |
- Warning
- Trying to generate more than the supported amount at once will instead yield zero bytes
|
EZWAVECOMMANDTYPE_NODE_INFO | Returns the Node Information Frame without command classes from the NVM for a given node ID.
Byte descriptor \
Bit number | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Capability | Listening | Z-Wave Protocol-Specific Part |
Security | Opt.
Func. | Sensor
1000ms | Sensor
250ms | Z-Wave Protocol-Specific Part |
Reserved | Z-Wave Protocol-Specific Part |
Basic | Basic Device Class (Z-Wave Protocol-Specific Part) |
Generic | Generic Device Class (Z-Wave Appl.-Specific Part) |
Specific | Specific Device Class (Z-Wave Appl.-Specific Part) |
All the Z-Wave protocol-specific fields are initialized by the protocol. The Listening flag, Generic, and Specific Device Class fields are initialized by the application.
- Parameters
-
[in] | NodeInfo.NodeId | Node ID |
[out] | NodeInfoStatus.NodeId | Node ID |
[out] | NodeInfoStatus.extNodeInfo | Node info buffer (see figure above) |
- Note
- If NodeInfoStatus.extNodeInfo.NodeInfo.nodeType.generic = 0 then the node does not exist
|
EZWAVECOMMANDTYPE_CLEAR_NETWORK_STATISTICS | Clear the current network statistics collected by the Z-Wave protocol.
|
EZWAVECOMMANDTYPE_SET_LEARN_MODE | Enable/disable home/node ID learn mode.
When learn mode is enabled, received "Assign ID's Command" are handled:
- If the current stored ID's are zero, the received ID's will be stored.
- If the received ID's are zero the stored ID's will be set to zero.
Controller
Add or remove the controller to/from a Z-Wave network.
Instruct the controller to allow it to be added or removed from the network.
When a controller is added to the network the following things will happen:
- If the current stored ID's are zero and the assigned ID's are nonzero, the received ID's will be stored (node was added to the network).
- If the received ID's are zero the stored ID's will be set to zero (node was removed from the network).
- The controller receives updates to the node list and the routing table but the ID's remain unchanged.
This function will probably change the capabilities of the controller so it is recommended that the application calls EZWAVECOMMANDTYPE_GET_CONTROLLER_CAPABILITIES after completion to check the controller status. The learnFunc is called as the "Assign" process progresses. The returned nodeID is the nodes new Node ID. If no "Assign" is received from the including controller the callback function will not be called. It is then up to the application code to switch of Learn mode. Once the assignment process has been started the callback function may be called more than once. The learn process is not complete before the callback function is called with LEARN_MODE_DONE. Network wide inclusion (add) should always be used as the default mode in inclusion to ensure compability with all implementations of Z-Wave controllers.
- Note
- Learn mode should only be enabled when necessary and disabled again as quickly as possible. It is recommended that learn mode is not enabling for more than 2 second in ZW_SET_LEARN_MODE_CLASSIC mode and 5 seconds in either ZW_SET_LEARN_MODE_NWI or ZW_SET_LEARN_MODE_NWE mode.
-
When the controller is already included into a network (secondary or inclusion controller) the callback status LEARN_MODE_STARTED will not be made but the LEARN_MODE_DONE/FAILED callback will be made as normal.
- Warning
- The learn process should not be stopped with ZW_SetLearnMode(FALSE,..) between the LEARN_MODE_STARTED and the LEARN_MODE_DONE status callback.
- Parameters
-
[in] | SetLearnMode.eLearnMode | Learn mode The learn mode states are:
- ZW_SET_LEARN_MODE_CLASSIC - Start the learn mode on the controller and only accept being included and exluded in direct range.
- ZW_SET_LEARN_MODE_NWI - Start the learn mode on the controller and accept routed inclusion (add). NWI mode must not be used for exclusion (remove).
- ZW_SET_LEARN_MODE_NWE - Start the learn mode on the controller and accept routed exclusion (remove) as well as direct. NWE mode must not be used for inclusion (add).
- ZW_SET_LEARN_MODE_DISABLE - Stop learn mode on the controller.
|
[in] | SetLearnMode.useCB | Use callback function |
useCB If SetLearnMode.useCB is true
- Parameters
-
[out] | LearnModeStatus.Status | Status of learn mode |
Slave
Add or remove the slave to/from a Z-Wave network.
Add a new slave node to a Z-Wave network or to remove an already added node from the network again.
The Slave node must identify itself to the including controller node by sending a Node Information Frame (see EZWAVECOMMANDTYPE_NODE_INFO).
When learn mode is enabled, the following two actions can be performed by the protocol:
- If the current stored ID's are zero and the assigned ID's are nonzero, the received ID's will be stored (node was added to the network).
- If the received ID's are zero the stored ID's will be set to zero (node was removed from the network).
The learnFunc is called as the "Assign" process progresses. The returned nodeID is the nodes new Node ID. If no "Assign" is received from the including controller the callback function will not be called. It is then up to the application code to switch of Learn mode. Once the assignment process has been started the Callback function may be called more than once. The learn process is not complete before the callback function is called with ASSIGN_COMPLETE
- Note
- Learn mode should only be enabled when necessary and disabled again as quickly as possible. It is recommended that learn mode is not enabled for more than 2 seconds in ZW_SET_LEARN_MODE_CLASSIC mode and 5 seconds when in either ZW_SET_LEARN_MODE_NWI or ZW_SET_LEARN_MODE_NWE mode.
- Parameters
-
[in] | SetLearnMode.eLearnMode | Learn mode The learn mode states are:
- ZW_SET_LEARN_MODE_CLASSIC - Start the learn mode on the slave and only accept being included and exluded in direct range.
- ZW_SET_LEARN_MODE_NWI - Start the learn mode on the slave and accept routed inclusion (add). NWI mode must not be used for exclusion (remove).
- ZW_SET_LEARN_MODE_NWE - Start the learn mode on the slave and accept routed exclusion (remove). NWE mode must not be used for inclusion (add).
- ZW_SET_LEARN_MODE_DISABLE - Stop learn mode on the slave.
|
[in] | SetLearnMode.useCB | Use callback function |
If SetLearnMode.useCB is true
- Parameters
-
[out] | LearnModeStatus.Status | Status of learn mode |
|
EZWAVECOMMANDTYPE_SET_DEFAULT | Set the device back to the factory default state.
Controller
Set the Controller back to the factory default state. Erase all Nodes, routing information and assigned homeID/nodeID from the NVM. In case the previous home ID was randomly generated then a new random home ID written to the NVM (random range: 0xC0000000-0xFFFFFFFE). A home ID outside random range reuses the initially configured home ID (configured during production).
Slave
Set the slave back to the factory default state. Erase routing information and assigned homeID/nodeID from the external NVM. Finally write a new random home ID to the external NVM.
|
EZWAVECOMMANDTYPE_SEND_DATA_ABORT | Stop any application initiated transmits.
|
EZWAVECOMMANDTYPE_SET_PROMISCUOUS_MODE | Enable/disable the installer library promiscuous mode.
When promiscuous mode is enabled, all application layer frames will be passed to the application layer regardless if the frames are addressed to another node.
When promiscuous mode is disabled, only application frames addressed to the node will be passed to the application layer.
A Controller in promiscuous mode will transfer payload from a promiscuously received application frame destined and originated from nodes residing in same network (HomeID). The promiscuously received application frame (only end destination frame) will be transferred to the application through ApplicationCommandHandler / ApplicationCommandHandler_Bridge with the RECEIVE_STATUS_FOREIGN_FRAME bit set in rxStatus. A promiscuously application received frame is defined as:
- A frame transmitted using the same HomeID as the promiscuous controller itself.
- A frame neither originated by nor destined the promiscuous controller itself.
- A frame containing the application command class payload
An end destination frame is defined as either:
- Direct frame,
- Outgoing routed frame sent by last repeater,
- Multicast frame or
- Explore frame
With the following exceptions when the controller is a repeater itself:
- Explore frames the controller actively repeats is not transferred to the application.
- Routed frames with the controller as the last repeater - only one promiscuously received application frame is transferred through ApplicationCommandHandler / ApplicationCommandHandler_Bridge and is transferred on the receiving of the frame transmitted by the previous Repeater. This is done even if the controller, as repeater, does retries. Acting as repeater the controller will try transmitting up to 3 times before giving up -> Routed Error.
Promiscuously received frames are delivered to the application via the ApplicationCommandHandler / ApplicationCommandHandler_Bridge callback function.
- Parameters
-
[in] | SetPromiscuousMode.Enable | TRUE to enable promiscuous mode
FALSE to disable it |
|
EZWAVECOMMANDTYPE_SET_RF_RECEIVE_MODE | Initialize the Z-Wave RF chip.
- Parameters
-
[in] | SetRfReceiveMode.mode | TRUE to set the RF chip to receive mode and start the data sampling
FALSE to set the RF chip to power down mode |
[out] | SetRFReceiveModeStatus.result | TRUE if operation was successful
FALSE if operation was not successful |
|
EZWAVECOMMANDTYPE_IS_NODE_WITHIN_DIRECT_RANGE | |
EZWAVECOMMANDTYPE_GET_NEIGHBOR_COUNT | |
EZWAVECOMMANDTYPE_ARE_NODES_NEIGHBOURS | |
EZWAVECOMMANDTYPE_IS_FAILED_NODE_ID | Test if a node ID is stored in the failed node ID list.
- Parameters
-
[in] | IsFailedNodeID.nodeID | The node ID to check |
[out] | FailedNodeIDStatus.result | true if node is found in the failed node list else false |
|
EZWAVECOMMANDTYPE_GET_ROUTING_TABLE_LINE | Read out neighbor information.
This information can be used to ensure that all nodes have a sufficient number of neighbors and to ensure that the network is in fact one network. The format of the data returned in the buffer pointed to by RoutingInfo is as follows:
RoutingInfo[i] (0 ï‚£ i < (ZW_MAX_NODES/8) |
Bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
NodeID | i*8+1 | i*8+2 | i*8+3 | i*8+4 | i*8+5 | i*8+6 | i*8+7 | i*8+8 |
If a bit n in RoutingInfo[i] is 1 it indicates that the node with nodeID has node (i*8)+n+1 as a neighbour. If n in RoutingInfo[i] is 0, node with nodeID cannot reach node (i*8)+n+1 directly.
- Parameters
-
[in] | GetRoutingInfo.nodeID | Node ID of the node that routing info is needed from |
[in] | GetRoutingInfo.options | Upper nibble is bit flag options, lower nibble is speed
Combine exactly one speed with any number of options
Bit flags options for upper nibble:
- GET_ROUTING_INFO_REMOVE_BAD - Remove bad link from routing info
- GET_ROUTING_INFO_REMOVE_NON_REPS - Remove non-repeaters from the routing info
Speed values for lower nibble:
- ZW_GET_ROUTING_INFO_ANY - Return all nodes regardless of speed
- ZW_GET_ROUTING_INFO_9600 - Return nodes supporting 9.6k
- ZW_GET_ROUTING_INFO_40K - Return nodes supporting 40k
- ZW_GET_ROUTING_INFO_100K - Return nodes supporting 100k
- ZW_GET_ROUTING_INFO_100KLR - Return nodes supporting 100k LR
|
- Parameters
-
[out] | GetRoutingInfoStatus.RoutingInfo | Pointer to routing info |
|
EZWAVECOMMANDTYPE_SET_ROUTING_INFO | |
EZWAVECOMMANDTYPE_STORE_NODE_INFO | |
EZWAVECOMMANDTYPE_STORE_HOMEID | |
EZWAVECOMMANDTYPE_LOCK_ROUTE_RESPONSE | If true then any attempt to purge a LastWorkingRoute entry is denied.
- Parameters
-
[in] | LockRouteResponse.value | Lock route response |
|
EZWAVECOMMANDTYPE_GET_PRIORITY_ROUTE | Get the route with the highest priority.
If a route has been set with EZWAVECOMMANDTYPE_SET_PRIORITY_ROUTE then that route will be returned. If no priority route has been set the call will return either the Last Working Route (LWR) or the Next to Last Working Route (NLWR). The LWR is the last successful route used between sender and destination node and the NLWR is the previous LWR. The PriorityRoute, LWR and NLWR are all stored in NVM.
- Parameters
-
[in] | GetPriorityRoute.nodeID | The node ID specifies the destination node whom the Priority Route is wanted from. |
[out] | GetPriorityRouteStatus.bAnyRouteFound | NON ZERO if a Priority Route is found. Priority route is either
- an Application injected Route or a LWR.
- ZW_PRIORITY_ROUTE_APP_PR - Route is an App defined Priority Route
- ZW_PRIORITY_ROUTE_ZW_LWR - Route is a Last Working Route
- ZW_PRIORITY_ROUTE_ZW_NLWR - Route is a Next to Last Working Route FALSE if no Priority Route is found
|
[out] | GetPriorityRouteStatus.repeaters | If route is found then a pointer to a 5-byte array containing the Priority Route. The first 4 bytes (index 0-3) contain the repeaters active in the route and the last (index 4) byte contains the speed information. First ZERO in repeaters (index 0-3) indicates no more repeaters in route. A direct route is indicated by the first repeater (index 0) being ZERO. The routespeed byte (index 4) can be either ZW_PRIORITY_ROUTE_SPEED_9600, ZW_PRIORITY_ROUTE_SPEED_40K or ZW_PRIORITY_ROUTE_SPEED_100K |
|
EZWAVECOMMANDTYPE_SET_PRIORITY_ROUTE | Set the Priority Route for a destination node.
The Priority Route is the route that will be used as the first routing attempt by the protocol when transmitting to a node. The Priority Route is stored in NVM.
- Parameters
-
[in] | SetPriorityRoute.nodeID | The node ID specifies the destination node for whom the Priority Route is to be set. |
[in] | SetPriorityRoute.repeaters | Pointer for a 5-byte array containing the new Priority Route to be set. If NULL then current APR is released (protocol now has 2 entries for LWRs). The first 4 bytes (index 0-3) contains the repeaters active in the route and last (index 4) byte contains the speed information. The routespeed byte (index 4) can be either ZW_PRIORITY_ROUTE_SPEED_9600, ZW_PRIORITY_ROUTE_SPEED_40K or ZW_PRIORITY_ROUTE_SPEED_100K |
[in] | SetPriorityRoute.clearGolden | if true then clear the Priority Route else set it |
[out] | SetPriorityRouteStatus.bRouteUpdated | TRUE if the Priority Route was successfully set to the specified route FALSE if the specified node ID was not valid and no Priority Route was set |
|
EZWAVECOMMANDTYPE_SET_SLAVE_LEARN_MODE | Enable/disable home/node ID learn mode for virtual nodes. When learn mode is enabled, received "Assign ID's Command" for the current virtual node 'node' are handled: If 'node' is zero, the received nodeID will be stored as a new virtual node. If the received nodeID is zero the virtual node 'node' will be removed.
Enable the possibility for enabling or disabling "Slave Learn Mode", which when enabled makes it possible for other controllers (primary or inclusion controllers) to add or remove a Virtual Slave Node to the Z-Wave network. Also is it possible for the bridge controller (only when primary or inclusion controller) to add or remove a Virtual Slave Node without involving other controllers. Available Slave Learn Modes are:
- VIRTUAL_SLAVE_LEARN_MODE_DISABLE - Disables the Slave Learn Mode so that no Virtual Slave Node can be added or removed.
- VIRTUAL_SLAVE_LEARN_MODE_ENABLE - Enables the possibility for other Primary/Inclusion controllers to add or remove a Virtual Slave Node. To add a new Virtual Slave node to the Z-Wave Network the provided "node" ID must be ZERO and to make it possible to remove a specific Virtual Slave Node the provided "node" ID must be the nodeID for this specific (locally present) Virtual Slave Node. When the Slave Learn Mode has been enabled the Virtual Slave node must identify itself to the external Primary/Inclusion Controller node by sending a "Node Information" frame (see ZW_SendSlaveNodeInformation) to make the add/remove operation commence.
- VIRTUAL_SLAVE_LEARN_MODE_ADD - Add Virtual Slave Node to the Z-Wave network without involving any external controller. This Slave Learn Mode is only possible when bridge controller is either a Primary controller or an Inclusion controller.
- VIRTUAL_SLAVE_LEARN_MODE_REMOVE - Remove a locally present Virtual Slave Node from the Z-Wave network without involving any external controller. This Slave Learn Mode is only possible when bridge controller is either a Primary controller or an Inclusion controller.
The callback function is called as the "Assign" process progresses. The returned "orgID" is the Virtual Slave node put into Slave Learn Mode, the "newID" is the new Node ID. If the Slave Learn Mode is VIRTUAL_SLAVE_LEARN_MODE_ENABLE and nothing is received from the assigning controller the callback function will not be called. It is then up to the main application code to switch of Slave Learn mode by setting the VIRTUAL_SLAVE_LEARN_MODE_DISABLE Slave Learn Mode. Once the assignment process has been started the callback function may be called more than once.
- Parameters
-
[in] | NetworkManagement.mode | Mode |
[in] | NetworkManagement.nodeID | Node ID on virtual node to set in Learn Mode - for adding a virtual node then this must be ZERO |
[out] | SetSlaveLearnModeStatus.result | true if successful or false if node is invalid or controller is primary |
Callback
- Parameters
-
[out] | NetworkManagementStatus.statusInfo | Pointer to a 5-byte array
- index 0: Status of the assign process:
- ASSIGN_COMPLETE - Is returned by the callback function when in the VIRTUAL_SLAVE_LEARN_MODE_ENABLE Slave Learn Mode and assignment is done. Now the Application can continue normal operation.
- ASSIGN_NODEID_DONE - Node ID have been assigned. The "orgID" contains the node ID on the Virtual Slave Node who was put into Slave Learn Mode. The "newID" contains the new node ID for "orgID". If "newID" is ZERO then the "orgID" Virtual Slave node has been deleted and the assign operation is completed. When this status is received the Slave Learn Mode is complete for all Slave Learn Modes except the VIRTUAL_SLAVE_LEARN_MODE_ENABLE mode.
- ASSIGN_RANGE_INFO_UPDATE - Node is doing Neighbour discovery Application should not attempt to send any frames during this time, this is only applicable when in VIRTUAL_SLAVE_LEARN_MODE_ENABLE.
- index 1: org node ID MSB
- index 2: org node ID LSB
- The original node ID that was put into Slave Learn Mode.
- index 3: new node ID MSB
- index 4: new node ID LSB
- The new Node ID. Zero if "OrgID" was deleted from the Z-Wave network.
|
|
EZWAVECOMMANDTYPE_IS_VIRTUAL_NODE | Check if node is a Virtual Slave node.
- Parameters
-
[in] | IsVirtualNode.value | Node ID |
[out] | IsVirtualNodeStatus.result | true if node is a Virtual Slave node else false |
|
EZWAVECOMMANDTYPE_GET_VIRTUAL_NODES | Read the virtual node flags for all nodes in the network. Will read the flag from all available node data files.
- Parameters
-
[out] | GetVirtualNodesStatus.vNodesMask | Buffer to store the virtual node flags read from the nodes data files the flags are stored as a bitmask array and the array size is 29 bytes |
|
EZWAVECOMMANDTYPE_GET_CONTROLLER_CAPABILITIES | Returns the Controller capabilities.
The returned capability is a bitmask where the following bits are defined:
- CONTROLLER_IS_SECONDARY - If bit is set then the controller is a secondary controller
- CONTROLLER_ON_OTHER_NETWORK - If this bit is set then this controller is not using its built-in home ID
- CONTROLLER_NODEID_SERVER_PRESENT - If this bit is set then there is a SUC ID server (SIS) in the network and this controller can therefore include/exclude nodes in the network. This is called an inclusion controller
- CONTROLLER_IS_REAL_PRIMARY - If this bit is set then this controller was the original primary controller in the network before the SIS was added to the network
- CONTROLLER_IS_SUC - If this bit is set then this controller is a SUC
- NO_NODES_INCLUDED - If this bit is set then no nodes are included
- Note
- Not all status bits are available on all controllers' types
- Parameters
-
[out] | GetControllerCapabilitiesStatus.result | Capability bitmask |
|
EZWAVECOMMANDTYPE_SET_ROUTING_MAX | Set the maximum number of route tries which should be done before failing or resorting to exploring if this is specified.
- Parameters
-
[in] | SetRoutingMax.value | Maximum number of source routing attempts |
|
EZWAVECOMMANDTYPE_IS_PRIMARY_CTRL | Returns wether the controller is a primary controller.
- Parameters
-
[out] | IsPrimaryCtrlStatus.result | true if the controller is a primary controller else false |
|
EZWAVECOMMANDTYPE_ADD_NODE_TO_NETWORK | Add any type of node to the network.
- Parameters
-
[in] | NetworkManagement.pHandle | Use callback function |
[in] | NetworkManagement.mode | Mode
- ADD_NODE_ANY - Add any node to the network
- ADD_NODE_CONTROLLER - Add a controller to the network
- ADD_NODE_SLAVE - Add a slave node to the network
- ADD_NODE_SMART_START - Listen for SmartStart node wanting to be included
- ADD_NODE_STOP - Stop learn mode without reporting an error
- ADD_NODE_STOP_FAILED - Stop learn mode and report an error to the new controller
- ADD_NODE_OPTION_NORMAL_POWER - Set this flag in mode for High Power inclusion
- ADD_NODE_OPTION_NETWORK_WIDE - Set this flag in mode for enabling Networkwide inclusion via explore frames
|
If NetworkManagement.pHandle is not NULL
- Parameters
-
[out] | NetworkManagementStatus.statusInfo | |
|
EZWAVECOMMANDTYPE_REMOVE_NODE_FROM_NETWORK | - Parameters
-
[in] | NetworkManagement.mode | Mode |
[out] | NetworkManagementStatus.statusInfo | |
|
EZWAVECOMMANDTYPE_AES_ECB | |
EZWAVECOMMANDTYPE_GET_BACKGROUND_RSSI | Returns the most recent background RSSI levels detected. The RSSI is only measured when the radio is in receive mode.
- Parameters
-
[out] | GetBackgroundRssiStatus.rssi | Pointer to a struct containing the RSSI levels in dBms |
The rssi levels struct is defined as typedef struct
{
#define ZPAL_RADIO_NUM_CHANNELS_LR_CH_CFG_1_2 Definition zpal_radio.h:220
Each value in the rssi_dBm contains an RSSI value encoded according to the table below. ZPAL_RADIO_NUM_CHANNELS_LR_CH_CFG_1_2 is set to 4.
The rssi level in a single channel is contained in a BYTE encoded as a signed integer:
Hexadecimal | Decimal | Description |
0x80..0xFF | -128..-1 | This value represents the measured RSSI in dBm |
0x00..0x7C | 0..124 | This value represents the measured RSSI in dBm |
0x7D | 125 | The RSSI is below sensitivity and could not be measured. |
0x7E | 126 | The radio receiver is saturated and the RSSI could not be measured. |
0x7F | 127 | The RSSI is not available. |
|
EZWAVECOMMANDTYPE_REMOVE_FAILED_NODE_ID | Remove a node from the failed node list.
Remove a non-responding node from the routing table in the requesting controller. A non-responding node is put onto the failed node ID list in the requesting controller. In case the node responds again at a later stage then it is removed from the failed node ID list. A node must be on the failed node ID list and as an extra precaution also fail to respond before it is removed. Responding nodes can't be removed. The call works on a primary controller and an inclusion controller.
- Parameters
-
[in] | FailedNodeIDCmd.nodeID | Node ID |
[out] | FailedNodeIDStatus.result | Return value (If the replacing process started successfully then the function will return):
- ZW_FAILED_NODE_REMOVE_STARTED - The removing process started
Return values (If the replacing process cannot be started then the API function will return one or more of the following flags):
- ZW_NOT_PRIMARY_CONTROLLER - The removing process was aborted because the controller is not the primary one.
- ZW_NO_CALLBACK_FUNCTION - The removing process was aborted because no callback function is used.
- ZW_FAILED_NODE_NOT_FOUND - The requested process failed. The nodeID was not found in the controller list of failing nodes.
- ZW_FAILED_NODE_REMOVE_PROCESS_BUSY - The removing process is busy.
- ZW_FAILED_NODE_REMOVE_FAIL - The requested process failed. Reasons include:
- Controller is busy
- The node responded to a NOP, therefore, the node is no longer failing.
|
|
EZWAVECOMMANDTYPE_REPLACE_FAILED_NODE_ID | Replace a node from the failed node list.
Replace a non-responding node with a new one in the requesting controller. A non-responding node is put onto the failed node ID list in the requesting controller. In case the node responds again at a later stage then it is removed from the failed node ID list. A node must be on the failed node ID list and as an extra precaution also fail to respond before it is removed. Responding nodes can't be replace. The call works on a primary controller and an inclusion controller.
- Parameters
-
[in] | FailedNodeIDCmd.nodeID | Node ID |
[out] | FailedNodeIDStatus.result | Return value (If the replacing process started successfully then the function will return):
- ZW_FAILED_NODE_REMOVE_STARTED The replacing process has started.
Return values (If the replacing process cannot be started then the API function will return one or more of the following flags:):
- ZW_NOT_PRIMARY_CONTROLLER - The replacing process was aborted because the controller is not a primary/inclusion/SIS controller.
- ZW_NO_CALLBACK_FUNCTION - The replacing process was aborted because no callback function is used.
- ZW_FAILED_NODE_NOT_FOUND - The requested process failed. The nodeID was not found in the controller list of failing nodes.
- ZW_FAILED_NODE_REMOVE_PROCESS_BUSY - The removing process is busy.
- ZW_FAILED_NODE_REMOVE_FAIL - The requested process failed. Reasons include:
- Controller is busy
- The node responded to a NOP, therefore, the node is no longer failing.
|
|
EZWAVECOMMANDTYPE_PM_STAY_AWAKE | |
EZWAVECOMMANDTYPE_PM_CANCEL | |
EZWAVECOMMANDTYPE_PM_REGISTER | |
EZWAVECOMMANDTYPE_ZW_UPDATE_CTRL_NODE_INFORMATION | - Parameters
-
[in] | UpdateCtrlNodeInformation.value | |
|
EZWAVECOMMANDTYPE_ZW_SET_LBT_THRESHOLD | Set the LBT RSSI level.
Set the "Listen Before Talk" threshold that controls at what RSSI level a Z-Wave node will refuse to transmit because of noise. ZW_SetListenBeforeTalkThreshold stores the threshold values in RAM thus it needs to be called after every reset or power-up. The RAM variables that stores the threshold values are initialized after ApplicationInitHW thus ZW_SetListenBeforeTalkThreshold should be called in ApplicationInitSW. The default threshold value is set to a value corresponding to the RF regulatory requirements for a Z-Wave module in the specific country. The appropriate value range goes from 34(dec) to 78(dec) and each threshold step corresponds to a 1.5dB input power step.
Region | Default Threshold (dec) | dBm |
JP | 50 | -80 |
KR | 64 | -65 |
EU, US, HK, ANZ, CN, IL, IN, MY & RU | 64 | -65 |
For instance, if a SAW filter with an insertion loss of 3dB is inserted between the antenna feed-point and the chip on a JP product, the threshold value should be set to 48(dec) .
- Note
- In some contries (JP and KR) the value of the LBT threshold is specified in the RF regulatory for the country and must be set to the value corresponding to the regulatory requirements.
- Parameters
-
[in] | SetLBTThreshold.channel | Channel number the threshold should be set for. Valid channel numbers are 0, 1 and 2 |
[in] | SetLBTThreshold.level | LBT RSSI level in dBm. The threshold the RSSI should use. Valid threshold range is from 34(dec) to 78(dec). 34 will set the threshold to the lowest amount of noise which the node will refuse to transmit and thus will only transmit in a quiet RF environment. 78 sets the threshold to the highest amount of noise and the node will transmit even in the presence of a lot of RF noise. |
|
EZWAVECOMMANDTYPE_ADD_NODE_DSK_TO_NETWORK | - Parameters
-
[in] | NetworkManagementDSK.pHandle | Use callback function |
[in] | NetworkManagementDSK.mode | Mode |
[in] | NetworkManagementDSK.dsk | DSK |
If NetworkManagement.pHandle is not NULL
- Parameters
-
[out] | NetworkManagementStatus.statusInfo | |
|
EZWAVECOMMANDTYPE_NETWORK_LEARN_MODE_START | Enable/disable the Network Management module inclusion/exclusion mode sequence according to specified mode.
- Parameters
-
[in] | SetSmartStartLearnMode.eLearnMode | Mode
- E_NETWORK_LEARN_MODE_DISABLE - Disable learn process
- E_NETWORK_LEARN_MODE_INCLUSION - Enable the learn process to do an inclusion
- E_NETWORK_LEARN_MODE_EXCLUSION - Enable the learn process to do an exclusion
- E_NETWORK_LEARN_MODE_EXCLUSION_NWE - Enable the learn process to do a Networkwide exclusion
- E_NETWORK_LEARN_MODE_INCLUSION_SMARTSTART - Enable the learn process to do a SmartStart inclusion
|
[in] | SetSmartStartLearnMode.eWakeUpReason | Wake up reason |
[out] | NetworkManagementStatus.statusInfo | true if Requested Network Learn process is initiated else false |
|
EZWAVECOMMANDTYPE_CREAT_NEW_PRIMARY_CTRL | |
EZWAVECOMMANDTYPE_CONTROLLER_CHANGE | Add a controller to the Z-Wave network and transfer the role as primary controller to it.
Has the same functionality as EZWAVECOMMANDTYPE_ADD_NODE_TO_NETWORK with mode ADD_NODE_ANY, except that the new controller will be a primary controller and the controller invoking the function will become secondary.
- Parameters
-
[in] | NetworkManagement.pHandle | Use callback function |
[in] | NetworkManagement.mode | Mode
- CONTROLLER_CHANGE_START - Start the process of adding a controller to the network
- CONTROLLER_CHANGE_STOP - Stop the controller change
- CONTROLLER_CHANGE_STOP_FAILED - Stop the controller change and report a failure
- ADD_NODE_OPTION_NORMAL_POWER - Set this flag in mode for High Power exchange.
|
If NetworkManagement.pHandle is not NULL
- Parameters
-
[out] | NetworkManagementStatus.statusInfo |
- index 0: Status of learn mode:
- ADD_NODE_STATUS_LEARN_READY - The controller is now ready to include a node into the network
- ADD_NODE_STATUS_NODE_FOUND - A node that wants to be included into the network has been found
- ADD_NODE_STATUS_ADDING_CONTROLLER - A new controller has been added to the network
- ADD_NODE_STATUS_PROTOCOL_DONE - The protocol part of adding a controller is complete
- ADD_NODE_STATUS_DONE - The new node has now been included and the controller is ready to continue normal operation again
- ADD_NODE_STATUS_FAILED - The learn process failed
- index 1: Node ID MSB
- index 2: Node ID LSB
- index 3: Node info length
- index 4: Pointer to Application Node information data. NULL if no information present. Only contains information when the length is not zero, so the information should be stored when that is the case. Regardless of the bStatus.
|
|
EZWAVECOMMANDTYPE_CLEAR_TX_TIMERS | Clear current Channel Transmit timers.
Clear the protocol's internal tx timers. The tx timers are updated by the protocol every time a frame is sent.
|
EZWAVECOMMANDTYPE_ZW_SET_MAX_INCL_REQ_INTERVALS | Set the maximum interval between SmartStart inclusion requests.
- Parameters
-
[in] | SetMaxInclReqInterval.inclusionRequestInterval | The maximum number of 128 sec ticks between SmartStart inclusion requests. Valid range is 5-99, which corresponds to 640-12672 sec. |
- Parameters
-
[out] | NetworkManagementStatus.statusInfo | true if interval was set to the provided value else false |
|
EZWAVECOMMANDTYPE_NVM_BACKUP_OPEN | - Parameters
-
[in] | NvmBackupRestore.offset | |
[in] | NvmBackupRestore.length | |
[out] | NvmBackupRestoreStatus.status | |
|
EZWAVECOMMANDTYPE_NVM_BACKUP_READ | - Parameters
-
[in] | NvmBackupRestore.offset | |
[in] | NvmBackupRestore.length | |
[in] | NvmBackupRestore.nvmData | |
[out] | NvmBackupRestoreStatus.status | |
|
EZWAVECOMMANDTYPE_NVM_BACKUP_WRITE | - Parameters
-
[in] | NvmBackupRestore.offset | |
[in] | NvmBackupRestore.length | |
[in] | NvmBackupRestore.nvmData | |
[out] | NvmBackupRestoreStatus.status | |
|
EZWAVECOMMANDTYPE_NVM_BACKUP_CLOSE | |
EZWAVECOMMANDTYPE_PM_SET_POWERDOWN_CALLBACK | Register application functions to be called just before power down.
The provided function will be called as the last steps before the chip is forced into EM4 hibernate.
- Note
- When the function is called the OS tick has been disabled and the FreeRTOS scheduler is no longer running. OS features like events, queues and timers are therefore unavailable.
- Parameters
-
[in] | PMSetPowerDownCallback.callback | Function to call on power down. Set to NULL to unregister any previously registered function. |
[out] | SetPowerDownCallbackStatus.result | true if function was added else false |
|
EZWAVECOMMANDTYPE_SET_SECURITY_KEYS | Initiate the S2 inclusion engine.
- Parameters
-
[in] | SetSecurityKeys.keys | Keys to request during inclusion |
|
EZWAVECOMMANDTYPE_SOFT_RESET | Perform a soft reset.
|
EZWAVECOMMANDTYPE_BOOTLOADER_REBOOT | |
EZWAVECOMMANDTYPE_REMOVE_NODEID_FROM_NETWORK | Remove a specific node from a Z-Wave network.
- Parameters
-
[in] | NetworkManagement.pHandle | Use callback function |
[in] | NetworkManagement.mode | Mode |
[in] | NetworkManagement.nodeID | Node ID |
If NetworkManagement.pHandle is not NULL
- Parameters
-
[out] | NetworkManagementStatus.statusInfo | |
|
EZWAVECOMMANDTYPE_ZW_GET_INCLUDED_NODES | Get the node IDs for the nodes included in the network.
- Parameters
-
[out] | GetIncludedNodes.node_id_list | A bitmask list of the nodes included in the network |
|
EZWAVECOMMANDTYPE_REQUESTNODENEIGHBORUPDATE | Start neighbor discovery for node if primary and other nodes are present.
- Parameters
-
[in] | RequestNodeNeighborUpdate.Handle | Callback function |
[in] | RequestNodeNeighborUpdate.NodeId | Node ID |
[out] | RequestNodeNeigborUpdateStatus.result | true if neighbor discovery started else false |
|
EZWAVECOMMANDTYPE_ZW_INITIATE_SHUTDOWN | Initiate graceful shutdown.
The API will stop the radio and cancel all timers and power locks. The protocol will notfiy the applciation when ready to go into deepsleep by the provided callback
- Parameters
-
[in] | InitiateShutdown.Handle | Pointer to callback used to notify the application before ging into deep sleep |
[out] | InitiateShutdownStatus.result | true |
|
EZWAVECOMMANDTYPE_ZW_GET_INCLUDED_LR_NODES | Get the node IDs for the long range nodes included in the network.
- Parameters
-
[out] | GetIncludedNodesLR.node_id_list | A bitmask list of the long range nodes included in the network |
|
EZWAVECOMMANDTYPE_ZW_GET_LR_CHANNEL | Get the current Primary Long Range Channel.
- Parameters
-
[out] | GetLRChannel.result | Current Primary Long Range Channel |
|
EZWAVECOMMANDTYPE_ZW_SET_LR_CHANNEL | Set the Primary Long Range Channel.
- Parameters
-
[in] | SetLRChannel.value | Primary Long Range Channel |
|
EZWAVECOMMANDTYPE_ZW_SET_LR_VIRTUAL_IDS | Enable Long Range virtual node IDs.
- Parameters
-
[in] | SetLRVirtualNodeIDs.value | Bitmask. The lowest 4 bits enables node ID 4002, 4003, 4004 and 4005 |
|
EZWAVECOMMANDTYPE_UNUSED1 | Legacy command. Now unused.
|
EZWAVECOMMANDTYPE_UNUSED2 | |
EZWAVECOMMANDTYPE_ZW_GET_PTI_CONFIG | Check if the PTI Zniffer functionality is enabled/disabled.
- Parameters
-
[out] | GetPTIconfig.result | true if enabled else false |
|
EZWAVECOMMANDTYPE_ZW_SET_TX_ATTENUATION | Reduce Tx power of classic non-listening devices.
- Parameters
-
[in] | SetTxAttenuation.value | Reduces the devices default Tx power in dB. Valid range: 0-9 dB |
[out] | SetTxAttenuation.result | true when reduction is allowed / false for listening devices and out of range input |
|
EZWAVECOMMANDTYPE_SECURE_NETWORK_MANAGEMENT_ADD_NODE | Add a new node to the network.
Used by Portable Controller application to start the process of including a new node to its network. After successful inclusion the protocol will send an EZWAVECOMMANDSTATUS_SECURE_ON_NODE_ADDED event to the application.
|
EZWAVECOMMANDTYPE_SECURE_NETWORK_MANAGEMENT_ABORT | Abort Inclusion or Exclusion of node.
Used by Portable Controller application to abort an Inclusion or Exclusion process it has started.
|
EZWAVECOMMANDTYPE_SECURE_NETWORK_MANAGEMENT_REMOVE_NODE | Remove a node from the network.
Used by Portable Controller application to start the process of excluding a node from its network. After successful exclusion the protocol will send an EZWAVECOMMANDSTATUS_SECURE_ON_NODE_DELETED event to the application.
|
EZWAVECOMMANDTYPE_SECURE_SEND_DATA | Unused. Data frames to network nodes are placed directly on the Zwave TxQueue.
|
EZWAVECOMMANDTYPE_SECURE_NETWORK_MANAGEMENT_LEARN_MODE_INCLUSION | Put the application in Network Wide Inclusion mode so it can be included in a network.
Used by Portable Controller application to get included by a different Controller. After successful inclusion the protocol will send an EZWAVECOMMANDSTATUS_SECURE_ON_NEW_NETWORK_ENTERED event to the application.
|
EZWAVECOMMANDTYPE_SECURE_NETWORK_MANAGEMENT_LEARN_MODE_EXCLUSION | Put the application in Network Wide Exclusion mode so it can be excluded from a network.
Used by Portable Controller application to get excluded from a network. After successful exclusion the protocol will send an EZWAVECOMMANDSTATUS_SECURE_ON_NETWORK_MANAGEMENT_STATE_UPDATE event to the application.
|
EZWAVECOMMANDTYPE_SECURE_NETWORK_MANAGEMENT_SET_SECURITY_FLAGS | Set security flags for a network node.
Used by Portable Controller application to set security related flags for a node in its network. S2 capable flag, S2 included flag, Secure included flag.
|
EZWAVECOMMANDTYPE_ZW_GET_TX_POWER_MAX_SUPPORTED | Get the maximum settable tx power.
- Parameters
-
[out] | GetTxPowerMaximumSupported.tx_power_max_supported | maximum settable tx power in deci dBm |
|
EZWAVECOMMANDTYPE_REQUESTNODETYPE_NEIGHBORUPDATE | |
NUM_EZWAVECOMMANDTYPE | |