Search documentation of grizzly

# View Source Grizzly.Network (grizzly v7.4.2)

Module for working with the Z-Wave network

# Summary

## Types

opt()
reset_opt()

Options for when you want to reset the device

## Functions

add_long_range_device(dsk, opts \\ [])

Add a long range device to the provisioning list

delete_node_provisioning(dsk, opts \\ [])

Delete a node from the network's provisioning list via the node's DSK

get_all_node_ids(opts \\ [])

Gets all the node ids both from the Z-Wave network and any virtual nodes

get_node_ids(opts \\ [])

Get a list of node ids from the Z-Wave network

get_node_provisioning(dsk, opts \\ [])

Get the nodes provisioning list information via the node's DSK

list_node_provisionings(remaining_counter, opts \\ [])

List all the nodes on the provisioning list

node_neighbor_update_request(node_id, opts \\ [])

Request a node to peform a neighbor update operation.

remove_failed_node(opts \\ [])

Remove a (presumably) failed node

report_failed_node_ids(opts \\ [])

Get the list of ids of all failed nodes.

request_network_update(opts \\ [])

Request a network update from another controller. This is a no-op if this is the network's primary controller.

reset_controller(opts \\ [])

Reset the Z-Wave controller

set_node_provisioning(dsk, meta_extensions, opts \\ [])

A node to the network provisioning list

# Types

Link to this type

# opt()

View Source

    @type opt() :: {:node_id, Grizzly.ZWave.node_id()} | {:seq_number, integer()}

Link to this type

# reset_opt()

View Source

    @type reset_opt() :: {:notify, boolean()}

Options for when you want to reset the device

- `:notify` - if the flag is set to true this will try to notify any node that is part of the lifeline association group (default `true`)

# Functions

Link to this function

# add_long_range_device(dsk, opts \\ [])

View Source

    @spec add_long_range_device(Grizzly.ZWave.DSK.t(), [opt()]) ::
      Grizzly.send_command_response()

Add a long range device to the provisioning list

Link to this function

# delete_node_provisioning(dsk, opts \\ [])

View Source

    @spec delete_node_provisioning(Grizzly.ZWave.DSK.t(), [opt()]) ::
      Grizzly.send_command_response()

Delete a node from the network's provisioning list via the node's DSK

Options

- `:node_id` - If your controller is part of another controller's network you might want to issue network commands to that controller. By default this option will chose your controller.

Link to this function

# get_all_node_ids(opts \\ [])

View Source (since 3.0.0)

    @spec get_all_node_ids([opt()]) ::
      {:ok, [Grizzly.ZWave.node_id() | Grizzly.VirtualDevices.id()]}
      | {:error, :timeout | :nack_response}

Gets all the node ids both from the Z-Wave network and any virtual nodes

If everything is okay the response will be `{:ok, list_of_node_ids}` where the list of node ids will be a combination of actual Z-Wave devices and virtual device ids.

Link to this function

# get_node_ids(opts \\ [])

View Source

    @spec get_node_ids([opt()]) :: Grizzly.send_command_response()

Get a list of node ids from the Z-Wave network

Just because a node id might be in the list does not mean the node is on the network. A device might have been reset or unpaired from the controller with out the controller knowing. However, in most use cases this shouldn't be an issue.

Options

- `:node_id` - If your controller is part of another controller's network you might want to issue network commands to that controller. By default this option will chose your controller.

Link to this function

# get_node_provisioning(dsk, opts \\ [])

View Source

    @spec get_node_provisioning(Grizzly.ZWave.DSK.t(), [opt()]) ::
      Grizzly.send_command_response()

Get the nodes provisioning list information via the node's DSK

Options

- `:node_id` - If your controller is part of another controller's network you might want to issue network commands to that controller. By default this option will chose your controller.

Link to this function

# list_node_provisionings(remaining_counter, opts \\ [])

View Source

    @spec list_node_provisionings(integer(), [opt()]) :: Grizzly.send_command_response()

List all the nodes on the provisioning list

Options

- `:node_id` - If your controller is part of another controller's network you might want to issue network commands to that controller. By default this option will chose your controller.

Link to this function

# node_neighbor_update_request(node_id, opts \\ [])

View Source

    @spec node_neighbor_update_request(Grizzly.node_id(), [Grizzly.command_opt()]) ::
      Grizzly.send_command_response()

Request a node to peform a neighbor update operation.

Link to this function

# remove_failed_node(opts \\ [])

View Source

    @spec remove_failed_node([opt()]) :: Grizzly.send_command_response()

Remove a (presumably) failed node

Options

- `:node_id` - If your controller is part of another controller's network you might want to issue network commands to that controller. By default this option will chose your controller.

Link to this function

# report_failed_node_ids(opts \\ [])

View Source

    @spec report_failed_node_ids([opt()]) ::
      {:ok, [Grizzly.ZWave.node_id()]} | {:error, atom()}

Get the list of ids of all failed nodes.

Link to this function

# request_network_update(opts \\ [])

View Source

    @spec request_network_update([opt()]) :: Grizzly.send_command_response()

Request a network update from another controller. This is a no-op if this is the network's primary controller.

### Options

- `:node_id` - If your controller is part of another controller's network you might want to issue network commands to that controller. By default this option will chose your controller.

Link to this function

# reset_controller(opts \\ [])

View Source

    @spec reset_controller([reset_opt() | opt()]) :: Grizzly.send_command_response()

Reset the Z-Wave controller

This command takes a few seconds to run.

Options

- `:node_id` - If your controller is part of another controller's network you might want to issue network commands to that controller. By default this option will chose your controller.

Link to this function

# set_node_provisioning(dsk, meta_extensions, opts \\ [])

View Source

    @spec set_node_provisioning(
      Grizzly.ZWave.DSK.t(),
      [Grizzly.ZWave.SmartStart.MetaExtension.extension()],
      [opt()]
    ) :: Grizzly.send_command_response()

A node to the network provisioning list

Options

- `:node_id` - If your controller is part of another controller's network you might want to issue network commands to that controller. By default this option will chose your controller.