ph_zwavesetconfig PowerHome formula function
Description
Queues a request with the Z-Wave controller
to set a configuration parameter for the specified Z-Wave
node ID
Syntax
ph_zwavesetconfig ( as_controller, ai_nodeid, ai_instance, ai_parm, al_value, ai_size )
Argument | Description |
as_controller | String. The ID of the Z-Wave controller to
queue the set command with |
ai_nodeid | Integer. The Z-Wave node number. Must be in
the range of 1 to 255 |
ai_instance | Integer. The instance number for the node you
wish to query. Must be in the range of 0 to 255 |
ai_parm | Integer. The parameter number you wish to
query. Must be in the range of 0 to 255 |
al_value | Long. The value you wish to set for the
parameter. If ai_size is 1, should be in the range of 0 to 255. If ai_size
is 2, should be in the range of 0 to 65,535. If ai_size = 4,
should be in the range of 0 to 2,147,483,647 |
ai_size | Integer
. The size
of the parameter value in bytes. Must be 1, 2, or 4. |
Return value
Integer. Returns 0 if the request was
successfully queued with the specified Z-Wave controller. Returns -1
if the specified controller does not exist or isnt active. Returns -51 if
the command is not supported. Returns -52, -53, -54 if the node,
instance, or size parameters are
out of range
Usage
Use this function to queue a request to set
a configuration parameter for a Z-Wave node/instance. This function queues
a Z-Wave Command Class (CC) 112 with the specified controller. The
parameter value to pass needs to be obtained from the particular Z-Wave
device's documentation. Z-Wave configuration parameters are numbers
from 0 to 255. Each number represents a different configuration parameter
that is specific to that particular manufacturer and device type. PowerHome does
not attempt to keep track of manufacturer device types and their specific
configuration parameters and it is up to the user to glean this information from
the device documentation. You can enter and store the configuration parameters
for each unique node ID in the Z-Wave Explorer on the "Node Config" tab. Usually
it is not necessary to execute this function as the configuration parameters
will already be set from the "Node Config" tab however if you wish to
dynamically update a parameter on the fly, this would be the function
to use
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_zwavesetconfig("RAZ",3,0,1,15,2)
- Returns 0 if successful. Assuming that node ID 3 is a Fibaro Motion sensor,
parameter 1 is a request to set the motion detection sensitivity. This
example will set the parameter to a value of
15.