Grizzly.ZWave.Commands.NodeInfoCachedGet (grizzly v0.15.6) View Source

Get the node information that is cached on another device

This is useful for getting the command classes and device classes

When sending this command the Z-Wave network should send back a NodeInfoCachedReport command.

Params: :seq_number - the sequence number for the networked command (required) :max_age - the max age of the node info frame give in 2^n minutes see section on cached minutes below for more information (optional) :node_id - the node id that that node information is being requested for (required)

Cached Minutes

This Z-Wave network will cache node information to perverse bandwidth and provides access to node information about sleeping nodes.

When sending the NodeInfoCachedGet command we can specify the max age of the cached data. If the cached data is older than the :max_age param the Z-Wave network will try to refresh the cache and send back the most updated information.

The values for the :max_age parameter are numbers from 1 to 14. This number will be 2 ^ number minutes. So if you pass the number 4 the receiving Z-Wave device will consider that 16 minutes.

Two other options are :infinite and :force_update. Where :infinite means that the cache will not be freshed regardless of how old the data is and where :force_update means that no matter the age of the cached node data the cache will attempt to be updated.

We default to 10 which 1024 minutes, or just a little over 1 day. This default is chosen to limit bandwidth usage. Also, the data found in the report is fairly static, so there isn't a pressing need to update the cache to often.

Link to this section Summary

Link to this section Types

Specs

max_age() :: 1..14 | :infinite | :force_update

Specs

param() ::
  {:seq_number, Grizzly.seq_number()}
  | {:node_id, Grizzly.Node.id()}
  | {:max_age, max_age()}

Link to this section Functions

Specs

decode_max_age(byte()) ::
  {:ok, max_age()} | {:error, Grizzly.ZWave.DecodeError.t()}

Specs

encode_max_age(max_age()) :: 0..15