ph_getzwavedataraw PowerHome formula function
Description
Retrieves specified data for a fully qualified Z-Wave entry from the internally stored JSON structure for Z-Wave devices. This is different from the ph_getzwavedata function in that the you must fully qualify the name of the JSON value you wish to retrieve and the device does NOT have to be defined within PowerHome
Syntax
ph_getzwavedataraw ( as_ctlr, as_id, ai_type )
Argument Description
as_ctlr String. The ID of the Z-Wave controller
as_id String. The fully qualified JSON name for the requested value
ai_type Integer. The type of data you wish to have returned. Valid values are 0 thru 4
Return value
String. Returns the specified data for the fully qualified JSON name specified in as_id from the Z-Wave controller specified in as_ctlr.
Usage
Use this function to access Z-Wave device data at its lowest level from the internal JSON structure for Z-Wave.

PowerHome maintains a JSON structure that contains the full device and status tree that is available within the specified Z-Wave controller. This is a flattened JSON structure of name/value pairs and is accessed by a fully qualified JSON name. In the case of a Razberry controller, this would typically look like this:

devices.20.instances.0.commandClasses.114.data.serialNumber

To retrieve the value for the fully qualified JSON name above, you would need to set the as_id parameter to "devices.20.instances.0.commandClasses.114.data.serialNumber". The specified Node ID and Command Class do NOT have to be defined within PowerHome.

The ai_type parameter must have a value from 0 to 4. A value of 0 will return the string value associated with the JSON name. A value of 1 will return the data type of the string value. A value of 2 will return the Invalidate Time for the JSON name. A value of 3 will return the Update Time for the JSON name. A value of 4 will return the Other value associated with the JSON name.

In normal usage, this function and the ph_getzwavedata( ) function will probably never be called. These functions are for those who want to access the Z-Wave data within PowerHome at its lowest level

Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_getzwavedataraw("RAZ","devices.20.instances.0.commandClasses.114.data.serialNumber",0) - Returns the string value for the "devices.20.instances.0.commandClasses.114.data.serialNumber" JSON name contained within the "RAZ" Z-Wave controller