Search documentation of grizzly

# View Source Grizzly.ZWave.CommandClasses.NetworkManagementInclusion (grizzly v7.4.2)

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()

Extended node info report

node_add_status()

The status of the inclusion process

node_info_report()

Node info report

tagged_command_classes()

Command classes have different ways they are support for each device

tx_opt()

## Functions

node_add_status_to_byte(atom)

Encode a `node_add_status()` to a byte

parse_node_add_status(int)

Parse the node add status byte into an atom

parse_node_info(arg)

Parse node information from node add status and extended node add status reports

tx_opt_from_byte(byte)
tx_opt_to_byte(atom)

# Types

Link to this type

# extended_node_info_report()

View Source

    @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()],
      keys_granted: [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
- `:keys_granted` - S2 keys granted by the user during the time of inclusion
- `:kex_fail_type` - the type of key exchange failure if there is one

Link to this type

# node_add_status()

View Source

    @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.

Link to this type

# node_info_report()

View Source

    @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(:keys_granted) => [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
- `:keys_granted` - 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 above
- `input_dsk` - the DSK of the device version 3 and above. If the info report is used

Link to this type

# tagged_command_classes()

View Source

    @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

Link to this type

# tx_opt()

View Source

    @type tx_opt() :: :null | :low_power | :explore

# Functions

Link to this function

# node_add_status_to_byte(atom)

View Source

    @spec node_add_status_to_byte(node_add_status()) :: 6 | 7 | 9

Encode a `node_add_status()` to a byte

Link to this function

# parse_node_add_status(int)

View Source

    @spec parse_node_add_status(6 | 7 | 9) :: node_add_status()

Parse the node add status byte into an atom

Link to this function

# parse_node_info(arg)

View Source

    @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

Link to this function

# tx_opt_from_byte(byte)

View Source

    @spec tx_opt_from_byte(byte()) ::
      {:ok, tx_opt()} | {:error, Grizzly.ZWave.DecodeError.t()}

Link to this function

# tx_opt_to_byte(atom)

View Source

    @spec tx_opt_to_byte(tx_opt()) :: byte()