View Source Grizzly.ZWave.Commands.NodeInfoCachedGet (grizzly v8.6.6)
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 :infinity
and :force_update
. Where :infinity
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.
Summary
Types
@type max_age() :: 1..14 | :infinity | :force_update
@type param() :: {:seq_number, Grizzly.seq_number()} | {:node_id, Grizzly.ZWave.node_id()} | {:max_age, max_age()}
Functions
@spec decode_max_age(byte()) :: {:ok, max_age()} | {:error, Grizzly.ZWave.DecodeError.t()}
@spec encode_max_age(max_age()) :: 0..15