View Source Grizzly.ZWave.CommandClasses.NetworkManagementInclusion (grizzly v8.6.6)
Network Management Inclusion Command Class
This command class provides the commands for adding and removing Z-Wave nodes to the Z-Wave network
Summary
Types
Extended node info report
The status of the inclusion process
Node info report
Command classes have different ways they are support for each device
Functions
Encode a node_add_status()
to a byte
Parse the node add status byte into an atom
Parse node information from node add status and extended node add status reports
Types
@type extended_node_info_report() :: %{ listening?: boolean(), basic_device_class: Grizzly.ZWave.DeviceClasses.basic_device_class(), generic_device_class: Grizzly.ZWave.DeviceClasses.generic_device_class(), specific_device_class: Grizzly.ZWave.DeviceClasses.specific_device_class(), command_classes: [tagged_command_classes()], granted_keys: [Grizzly.ZWave.Security.key()], kex_fail_type: Grizzly.ZWave.Security.key_exchange_fail_type() }
Extended node info report
Node information from an extended node add status report
:listening?
- is the device a listening device:basic_device_class
- the basic device class:generic_device_class
- the generic device class:specific_device_class
- the specific device class:command_classes
- list of command classes the new device supports:granted_keys
- S2 keys granted by the user during the time of inclusion:kex_fail_type
- the type of key exchange failure if there is one
@type node_add_status() :: :done | :failed | :security_failed
The status of the inclusion process
:done
- the inclusion process is done without error:failed
- the inclusion process is done with failure, the device is not included:security_failed
- the inclusion process is done, the device is included but their was an error during the security negotiations. Device functionality will be degraded.
@type node_info_report() :: %{ :seq_number => byte(), :node_id => Grizzly.ZWave.node_id(), :status => node_add_status(), :listening? => boolean(), :basic_device_class => Grizzly.ZWave.DeviceClasses.basic_device_class(), :generic_device_class => Grizzly.ZWave.DeviceClasses.generic_device_class(), :specific_device_class => Grizzly.ZWave.DeviceClasses.specific_device_class(), :command_classes => [tagged_command_classes()], optional(:granted_keys) => [Grizzly.ZWave.Security.key()], optional(:kex_fail_type) => Grizzly.ZWave.Security.key_exchange_fail_type(), optional(:input_dsk) => Grizzly.ZWave.Security.key_exchange_fail_type() }
Node info report
node information from a node add status report
:listening?
- is the device a listening device:basic_device_class
- the basic device class:generic_device_class
- the generic device class:specific_device_class
- the specific device class:command_classes
- list of command classes the new device supports:granted_keys
- S2 keys granted by the user during the time of inclusion version 2 and above:kex_fail_type
- the type of key exchange failure if there is one version 2 and aboveinput_dsk
- the DSK of the device version 3 and above. If the info report is used
@type tagged_command_classes() :: {:non_secure_supported, [Grizzly.ZWave.CommandClasses.command_class()]} | {:non_secure_controlled, [Grizzly.ZWave.CommandClasses.command_class()]} | {:secure_supported, [Grizzly.ZWave.CommandClasses.command_class()]} | {:secure_controlled, [Grizzly.ZWave.CommandClasses.command_class()]}
Command classes have different ways they are support for each device
@type tx_opt() :: :null | :low_power | :explore
Functions
@spec node_add_status_to_byte(node_add_status()) :: 6 | 7 | 9
Encode a node_add_status()
to a byte
@spec parse_node_add_status(6 | 7 | 9) :: node_add_status()
Parse the node add status byte into an atom
@spec parse_node_info(binary()) :: node_info_report() | extended_node_info_report()
Parse node information from node add status and extended node add status reports
@spec tx_opt_from_byte(byte()) :: {:ok, tx_opt()} | {:error, Grizzly.ZWave.DecodeError.t()}