![]() |
OpenZWave Library
1.4.3015
|
The main public interface to OpenZWave. More...
#include <Manager.h>
Public Types | |
typedef void(* | pfnOnNotification_t) (Notification const *_pNotification, void *_context) |
Friends | |
class | Driver |
class | CommandClass |
class | Group |
class | Node |
class | Value |
class | ValueStore |
class | ValueButton |
class | Msg |
Construction | |
For creating and destroying the Manager singleton. | |
static Manager * | Create () |
Creates the Manager singleton object. The Manager provides the public interface to OpenZWave, exposing all the functionality required to add Z-Wave support to an application. There can be only one Manager in an OpenZWave application. An Options object must be created and Locked first, otherwise the call to Manager::Create will fail. Once the Manager has been created, call AddWatcher to install a notification callback handler, and then call the AddDriver method for each attached PC Z-Wave controller in turn. More... | |
static Manager * | Get () |
Gets a pointer to the Manager object. More... | |
static void | Destroy () |
Deletes the Manager and cleans up any associated objects. More... | |
static std::string | getVersionAsString () |
Get the Version Number of OZW as a string. More... | |
static std::string | getVersionLongAsString () |
Get the Version Number including Git commit of OZW as a string. More... | |
static ozwversion | getVersion () |
Get the Version Number as the Version Struct (Only Major/Minor returned) More... | |
Configuration | |
For saving the Z-Wave network configuration so that the entire network does not need to be polled every time the application starts. | |
void | WriteConfig (uint32 const _homeId) |
Saves the configuration of a PC Controller's Z-Wave network to the application's user data folder. This method does not normally need to be called, since OpenZWave will save the state automatically during the shutdown process. It is provided here only as an aid to development. The configuration of each PC Controller's Z-Wave network is stored in a separate file. The filename consists of the 8 digit hexadecimal version of the controller's Home ID, prefixed with the string 'zwcfg_'. This convention allows OpenZWave to find the correct configuration file for a controller, even if it is attached to a different serial port, USB device path, etc. More... | |
Options * | GetOptions () const |
Gets a pointer to the locked Options object. More... | |
Drivers | |
Methods for adding and removing drivers and obtaining basic controller information. | |
bool | AddDriver (string const &_controllerPath, Driver::ControllerInterface const &_interface=Driver::ControllerInterface_Serial) |
Creates a new driver for a Z-Wave controller. This method creates a Driver object for handling communications with a single Z-Wave controller. In the background, the driver first tries to read configuration data saved during a previous run. It then queries the controller directly for any missing information, and a refresh of the list of nodes that it controls. Once this information has been received, a DriverReady notification callback is sent, containing the Home ID of the controller. This Home ID is required by most of the OpenZWave Manager class methods. More... | |
bool | RemoveDriver (string const &_controllerPath) |
Removes the driver for a Z-Wave controller, and closes the controller. Drivers do not need to be explicitly removed before calling Destroy - this is handled automatically. More... | |
uint8 | GetControllerNodeId (uint32 const _homeId) |
Get the node ID of the Z-Wave controller. More... | |
uint8 | GetSUCNodeId (uint32 const _homeId) |
Get the node ID of the Static Update Controller. More... | |
bool | IsPrimaryController (uint32 const _homeId) |
Query if the controller is a primary controller. The primary controller is the main device used to configure and control a Z-Wave network. There can only be one primary controller - all other controllers are secondary controllers. More... | |
bool | IsStaticUpdateController (uint32 const _homeId) |
Query if the controller is a static update controller. A Static Update Controller (SUC) is a controller that must never be moved in normal operation and which can be used by other nodes to receive information about network changes. More... | |
bool | IsBridgeController (uint32 const _homeId) |
Query if the controller is using the bridge controller library. A bridge controller is able to create virtual nodes that can be associated with other controllers to enable events to be passed on. More... | |
string | GetLibraryVersion (uint32 const _homeId) |
Get the version of the Z-Wave API library used by a controller. More... | |
string | GetLibraryTypeName (uint32 const _homeId) |
Get a string containing the Z-Wave API library type used by a controller. The possible library types are: More... | |
int32 | GetSendQueueCount (uint32 const _homeId) |
Get count of messages in the outgoing send queue. More... | |
void | LogDriverStatistics (uint32 const _homeId) |
Send current driver statistics to the log file. More... | |
Driver::ControllerInterface | GetControllerInterfaceType (uint32 const _homeId) |
Obtain controller interface type. More... | |
string | GetControllerPath (uint32 const _homeId) |
Obtain controller interface path. More... | |
Polling Z-Wave devices | |
Methods for controlling the polling of Z-Wave devices. Modern devices will not require polling. Some old devices need to be polled as the only way to detect status changes. | |
int32 | GetPollInterval () |
Get the time period between polls of a node's state. More... | |
void | SetPollInterval (int32 _milliseconds, bool _bIntervalBetweenPolls) |
Set the time period between polls of a node's state. Due to patent concerns, some devices do not report state changes automatically to the controller. These devices need to have their state polled at regular intervals. The length of the interval is the same for all devices. To even out the Z-Wave network traffic generated by polling, OpenZWave divides the polling interval by the number of devices that have polling enabled, and polls each in turn. It is recommended that if possible, the interval should not be set shorter than the number of polled devices in seconds (so that the network does not have to cope with more than one poll per second). More... | |
bool | EnablePoll (ValueID const &_valueId, uint8 const _intensity=1) |
Enable the polling of a device's state. More... | |
bool | DisablePoll (ValueID const &_valueId) |
Disable the polling of a device's state. More... | |
bool | isPolled (ValueID const &_valueId) |
Determine the polling of a device's state. More... | |
void | SetPollIntensity (ValueID const &_valueId, uint8 const _intensity) |
Set the frequency of polling (0=none, 1=every time through the list, 2-every other time, etc) More... | |
uint8 | GetPollIntensity (ValueID const &_valueId) |
Get the polling intensity of a device's state. More... | |
Node information | |
bool | RefreshNodeInfo (uint32 const _homeId, uint8 const _nodeId) |
Trigger the fetching of fixed data about a node. Causes the node's data to be obtained from the Z-Wave network in the same way as if it had just been added. This method would normally be called automatically by OpenZWave, but if you know that a node has been changed, calling this method will force a refresh of all of the data held by the library. This can be especially useful for devices that were asleep when the application was first run. This is the same as the query state starting from the beginning. More... | |
bool | RequestNodeState (uint32 const _homeId, uint8 const _nodeId) |
Trigger the fetching of dynamic value data for a node. Causes the node's values to be requested from the Z-Wave network. This is the same as the query state starting from the associations state. More... | |
bool | RequestNodeDynamic (uint32 const _homeId, uint8 const _nodeId) |
Trigger the fetching of just the dynamic value data for a node. Causes the node's values to be requested from the Z-Wave network. This is the same as the query state starting from the dynamic state. More... | |
bool | IsNodeListeningDevice (uint32 const _homeId, uint8 const _nodeId) |
Get whether the node is a listening device that does not go to sleep. More... | |
bool | IsNodeFrequentListeningDevice (uint32 const _homeId, uint8 const _nodeId) |
Get whether the node is a frequent listening device that goes to sleep but can be woken up by a beam. Useful to determine node and controller consistency. More... | |
bool | IsNodeBeamingDevice (uint32 const _homeId, uint8 const _nodeId) |
Get whether the node is a beam capable device. More... | |
bool | IsNodeRoutingDevice (uint32 const _homeId, uint8 const _nodeId) |
Get whether the node is a routing device that passes messages to other nodes. More... | |
bool | IsNodeSecurityDevice (uint32 const _homeId, uint8 const _nodeId) |
Get the security attribute for a node. True if node supports security features. More... | |
uint32 | GetNodeMaxBaudRate (uint32 const _homeId, uint8 const _nodeId) |
Get the maximum baud rate of a node's communications. More... | |
uint8 | GetNodeVersion (uint32 const _homeId, uint8 const _nodeId) |
Get the version number of a node. More... | |
uint8 | GetNodeSecurity (uint32 const _homeId, uint8 const _nodeId) |
Get the security byte of a node. More... | |
bool | IsNodeZWavePlus (uint32 const _homeId, uint8 const _nodeId) |
Is this a ZWave+ Supported Node? More... | |
uint8 | GetNodeBasic (uint32 const _homeId, uint8 const _nodeId) |
Get the basic type of a node. More... | |
uint8 | GetNodeGeneric (uint32 const _homeId, uint8 const _nodeId) |
Get the generic type of a node. More... | |
uint8 | GetNodeSpecific (uint32 const _homeId, uint8 const _nodeId) |
Get the specific type of a node. More... | |
string | GetNodeType (uint32 const _homeId, uint8 const _nodeId) |
Get a human-readable label describing the node The label is taken from the Z-Wave specific, generic or basic type, depending on which of those values are specified by the node. More... | |
uint32 | GetNodeNeighbors (uint32 const _homeId, uint8 const _nodeId, uint8 **_nodeNeighbors) |
Get the bitmap of this node's neighbors. More... | |
string | GetNodeManufacturerName (uint32 const _homeId, uint8 const _nodeId) |
Get the manufacturer name of a device The manufacturer name would normally be handled by the Manufacturer Specific command class, taking the manufacturer ID reported by the device and using it to look up the name from the manufacturer_specific.xml file in the OpenZWave config folder. However, there are some devices that do not support the command class, so to enable the user to manually set the name, it is stored with the node data and accessed via this method rather than being reported via a command class Value object. More... | |
string | GetNodeProductName (uint32 const _homeId, uint8 const _nodeId) |
Get the product name of a device The product name would normally be handled by the Manufacturer Specific command class, taking the product Type and ID reported by the device and using it to look up the name from the manufacturer_specific.xml file in the OpenZWave config folder. However, there are some devices that do not support the command class, so to enable the user to manually set the name, it is stored with the node data and accessed via this method rather than being reported via a command class Value object. More... | |
string | GetNodeName (uint32 const _homeId, uint8 const _nodeId) |
Get the name of a node The node name is a user-editable label for the node that would normally be handled by the Node Naming command class, but many devices do not support it. So that a node can always be named, OpenZWave stores it with the node data, and provides access through this method and SetNodeName, rather than reporting it via a command class Value object. The maximum length of a node name is 16 characters. More... | |
string | GetNodeLocation (uint32 const _homeId, uint8 const _nodeId) |
Get the location of a node The node location is a user-editable string that would normally be handled by the Node Naming command class, but many devices do not support it. So that a node can always report its location, OpenZWave stores it with the node data, and provides access through this method and SetNodeLocation, rather than reporting it via a command class Value object. More... | |
string | GetNodeManufacturerId (uint32 const _homeId, uint8 const _nodeId) |
Get the manufacturer ID of a device The manufacturer ID is a four digit hex code and would normally be handled by the Manufacturer Specific command class, but not all devices support it. Although the value reported by this method will be an empty string if the command class is not supported and cannot be set by the user, the manufacturer ID is still stored with the node data (rather than being reported via a command class Value object) to retain a consistent approach with the other manufacturer specific data. More... | |
string | GetNodeProductType (uint32 const _homeId, uint8 const _nodeId) |
Get the product type of a device The product type is a four digit hex code and would normally be handled by the Manufacturer Specific command class, but not all devices support it. Although the value reported by this method will be an empty string if the command class is not supported and cannot be set by the user, the product type is still stored with the node data (rather than being reported via a command class Value object) to retain a consistent approach with the other manufacturer specific data. More... | |
string | GetNodeProductId (uint32 const _homeId, uint8 const _nodeId) |
Get the product ID of a device The product ID is a four digit hex code and would normally be handled by the Manufacturer Specific command class, but not all devices support it. Although the value reported by this method will be an empty string if the command class is not supported and cannot be set by the user, the product ID is still stored with the node data (rather than being reported via a command class Value object) to retain a consistent approach with the other manufacturer specific data. More... | |
void | SetNodeManufacturerName (uint32 const _homeId, uint8 const _nodeId, string const &_manufacturerName) |
Set the manufacturer name of a device The manufacturer name would normally be handled by the Manufacturer Specific command class, taking the manufacturer ID reported by the device and using it to look up the name from the manufacturer_specific.xml file in the OpenZWave config folder. However, there are some devices that do not support the command class, so to enable the user to manually set the name, it is stored with the node data and accessed via this method rather than being reported via a command class Value object. More... | |
void | SetNodeProductName (uint32 const _homeId, uint8 const _nodeId, string const &_productName) |
Set the product name of a device The product name would normally be handled by the Manufacturer Specific command class, taking the product Type and ID reported by the device and using it to look up the name from the manufacturer_specific.xml file in the OpenZWave config folder. However, there are some devices that do not support the command class, so to enable the user to manually set the name, it is stored with the node data and accessed via this method rather than being reported via a command class Value object. More... | |
void | SetNodeName (uint32 const _homeId, uint8 const _nodeId, string const &_nodeName) |
Set the name of a node The node name is a user-editable label for the node that would normally be handled by the Node Naming command class, but many devices do not support it. So that a node can always be named, OpenZWave stores it with the node data, and provides access through this method and GetNodeName, rather than reporting it via a command class Value object. If the device does support the Node Naming command class, the new name will be sent to the node. The maximum length of a node name is 16 characters. More... | |
void | SetNodeLocation (uint32 const _homeId, uint8 const _nodeId, string const &_location) |
Set the location of a node The node location is a user-editable string that would normally be handled by the Node Naming command class, but many devices do not support it. So that a node can always report its location, OpenZWave stores it with the node data, and provides access through this method and GetNodeLocation, rather than reporting it via a command class Value object. If the device does support the Node Naming command class, the new location will be sent to the node. More... | |
void | SetNodeOn (uint32 const _homeId, uint8 const _nodeId) |
Turns a node on This is a helper method to simplify basic control of a node. It is the equivalent of changing the level reported by the node's Basic command class to 255, and will generate a ValueChanged notification from that class. This command will turn on the device at its last known level, if supported by the device, otherwise it will turn it on at 100%. More... | |
void | SetNodeOff (uint32 const _homeId, uint8 const _nodeId) |
Turns a node off This is a helper method to simplify basic control of a node. It is the equivalent of changing the level reported by the node's Basic command class to zero, and will generate a ValueChanged notification from that class. More... | |
void | SetNodeLevel (uint32 const _homeId, uint8 const _nodeId, uint8 const _level) |
Sets the basic level of a node This is a helper method to simplify basic control of a node. It is the equivalent of changing the value reported by the node's Basic command class and will generate a ValueChanged notification from that class. More... | |
bool | IsNodeInfoReceived (uint32 const _homeId, uint8 const _nodeId) |
Get whether the node information has been received. More... | |
bool | GetNodeClassInformation (uint32 const _homeId, uint8 const _nodeId, uint8 const _commandClassId, string *_className=NULL, uint8 *_classVersion=NULL) |
Get whether the node has the defined class available or not. More... | |
bool | IsNodeAwake (uint32 const _homeId, uint8 const _nodeId) |
Get whether the node is awake or asleep. More... | |
bool | IsNodeFailed (uint32 const _homeId, uint8 const _nodeId) |
Get whether the node is working or has failed. More... | |
string | GetNodeQueryStage (uint32 const _homeId, uint8 const _nodeId) |
Get whether the node's query stage as a string. More... | |
uint16 | GetNodeDeviceType (uint32 const _homeId, uint8 const _nodeId) |
Get the node device type as reported in the Z-Wave+ Info report. More... | |
string | GetNodeDeviceTypeString (uint32 const _homeId, uint8 const _nodeId) |
Get the node device type as reported in the Z-Wave+ Info report. More... | |
uint8 | GetNodeRole (uint32 const _homeId, uint8 const _nodeId) |
Get the node role as reported in the Z-Wave+ Info report. More... | |
string | GetNodeRoleString (uint32 const _homeId, uint8 const _nodeId) |
Get the node role as reported in the Z-Wave+ Info report. More... | |
uint8 | GetNodePlusType (uint32 const _homeId, uint8 const _nodeId) |
Get the node PlusType as reported in the Z-Wave+ Info report. More... | |
string | GetNodePlusTypeString (uint32 const _homeId, uint8 const _nodeId) |
Get the node PlusType as reported in the Z-Wave+ Info report. More... | |
Values | |
Methods for accessing device values. All the methods require a ValueID, which will have been provided in the ValueAdded Notification callback when the the value was first discovered by OpenZWave. | |
string | GetValueLabel (ValueID const &_id) |
Gets the user-friendly label for the value. More... | |
void | SetValueLabel (ValueID const &_id, string const &_value) |
Sets the user-friendly label for the value. More... | |
string | GetValueUnits (ValueID const &_id) |
Gets the units that the value is measured in. More... | |
void | SetValueUnits (ValueID const &_id, string const &_value) |
Sets the units that the value is measured in. More... | |
string | GetValueHelp (ValueID const &_id) |
Gets a help string describing the value's purpose and usage. More... | |
void | SetValueHelp (ValueID const &_id, string const &_value) |
Sets a help string describing the value's purpose and usage. More... | |
int32 | GetValueMin (ValueID const &_id) |
Gets the minimum that this value may contain. More... | |
int32 | GetValueMax (ValueID const &_id) |
Gets the maximum that this value may contain. More... | |
bool | IsValueReadOnly (ValueID const &_id) |
Test whether the value is read-only. More... | |
bool | IsValueWriteOnly (ValueID const &_id) |
Test whether the value is write-only. More... | |
bool | IsValueSet (ValueID const &_id) |
Test whether the value has been set. More... | |
bool | IsValuePolled (ValueID const &_id) |
Test whether the value is currently being polled. More... | |
bool | GetValueAsBool (ValueID const &_id, bool *o_value) |
Gets a value as a bool. More... | |
bool | GetValueAsByte (ValueID const &_id, uint8 *o_value) |
Gets a value as an 8-bit unsigned integer. More... | |
bool | GetValueAsFloat (ValueID const &_id, float *o_value) |
Gets a value as a float. More... | |
bool | GetValueAsInt (ValueID const &_id, int32 *o_value) |
Gets a value as a 32-bit signed integer. More... | |
bool | GetValueAsShort (ValueID const &_id, int16 *o_value) |
Gets a value as a 16-bit signed integer. More... | |
bool | GetValueAsString (ValueID const &_id, string *o_value) |
Gets a value as a string. Creates a string representation of a value, regardless of type. More... | |
bool | GetValueAsRaw (ValueID const &_id, uint8 **o_value, uint8 *o_length) |
Gets a value as a collection of bytes. More... | |
bool | GetValueListSelection (ValueID const &_id, string *o_value) |
Gets the selected item from a list (as a string). More... | |
bool | GetValueListSelection (ValueID const &_id, int32 *o_value) |
Gets the selected item from a list (as an integer). More... | |
bool | GetValueListItems (ValueID const &_id, vector< string > *o_value) |
Gets the list of items from a list value. More... | |
bool | GetValueListValues (ValueID const &_id, vector< int32 > *o_value) |
Gets the list of values from a list value. More... | |
bool | GetValueFloatPrecision (ValueID const &_id, uint8 *o_value) |
Gets a float value's precision. More... | |
bool | SetValue (ValueID const &_id, bool const _value) |
Sets the state of a bool. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
bool | SetValue (ValueID const &_id, uint8 const _value) |
Sets the value of a byte. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
bool | SetValue (ValueID const &_id, float const _value) |
Sets the value of a decimal. It is usually better to handle decimal values using strings rather than floats, to avoid floating point accuracy issues. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
bool | SetValue (ValueID const &_id, int32 const _value) |
Sets the value of a 32-bit signed integer. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
bool | SetValue (ValueID const &_id, int16 const _value) |
Sets the value of a 16-bit signed integer. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
bool | SetValue (ValueID const &_id, uint8 const *_value, uint8 const _length) |
Sets the value of a collection of bytes. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
bool | SetValue (ValueID const &_id, string const &_value) |
Sets the value from a string, regardless of type. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
bool | SetValueListSelection (ValueID const &_id, string const &_selectedItem) |
Sets the selected item in a list. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
bool | RefreshValue (ValueID const &_id) |
Refreshes the specified value from the Z-Wave network. A call to this function causes the library to send a message to the network to retrieve the current value of the specified ValueID (just like a poll, except only one-time, not recurring). More... | |
void | SetChangeVerified (ValueID const &_id, bool _verify) |
Sets a flag indicating whether value changes noted upon a refresh should be verified. If so, the library will immediately refresh the value a second time whenever a change is observed. This helps to filter out spurious data reported occasionally by some devices. More... | |
bool | GetChangeVerified (ValueID const &_id) |
determine if value changes upon a refresh should be verified. If so, the library will immediately refresh the value a second time whenever a change is observed. This helps to filter out spurious data reported occasionally by some devices. More... | |
bool | PressButton (ValueID const &_id) |
Starts an activity in a device. Since buttons are write-only values that do not report a state, no notification callbacks are sent. More... | |
bool | ReleaseButton (ValueID const &_id) |
Stops an activity in a device. Since buttons are write-only values that do not report a state, no notification callbacks are sent. More... | |
Climate Control Schedules | |
Methods for accessing schedule values. All the methods require a ValueID, which will have been provided in the ValueAdded Notification callback when the the value was first discovered by OpenZWave. The ValueType_Schedule is a specialized Value used to simplify access to the switch point schedule information held by a setback thermostat that supports the Climate Control Schedule command class. Each schedule contains up to nine switch points for a single day, consisting of a time in hours and minutes (24 hour clock) and a setback in tenths of a degree Celsius. The setback value can range from -128 (-12.8C) to 120 (12.0C). There are two special setback values - 121 is used to set Frost Protection mode, and 122 is used to set Energy Saving mode. The switch point methods only modify OpenZWave's copy of the schedule information. Once all changes have been made, they are sent to the device by calling SetSchedule. | |
uint8 | GetNumSwitchPoints (ValueID const &_id) |
Get the number of switch points defined in a schedule. More... | |
bool | SetSwitchPoint (ValueID const &_id, uint8 const _hours, uint8 const _minutes, int8 const _setback) |
Set a switch point in the schedule. Inserts a new switch point into the schedule, unless a switch point already exists at the specified time in which case that switch point is updated with the new setback value instead. A maximum of nine switch points can be set in the schedule. More... | |
bool | RemoveSwitchPoint (ValueID const &_id, uint8 const _hours, uint8 const _minutes) |
Remove a switch point from the schedule. Removes the switch point at the specified time from the schedule. More... | |
void | ClearSwitchPoints (ValueID const &_id) |
Clears all switch points from the schedule. More... | |
bool | GetSwitchPoint (ValueID const &_id, uint8 const _idx, uint8 *o_hours, uint8 *o_minutes, int8 *o_setback) |
Gets switch point data from the schedule. Retrieves the time and setback values from a switch point in the schedule. More... | |
SwitchAll | |
Methods for switching all devices on or off together. The devices must support the SwitchAll command class. The command is first broadcast to all nodes, and then followed up with individual commands to each node (because broadcasts are not routed, the message might not otherwise reach all the nodes). | |
void | SwitchAllOn (uint32 const _homeId) |
Switch all devices on. All devices that support the SwitchAll command class will be turned on. More... | |
void | SwitchAllOff (uint32 const _homeId) |
Switch all devices off. All devices that support the SwitchAll command class will be turned off. More... | |
Configuration Parameters | |
Methods for accessing device configuration parameters. Configuration parameters are values that are managed by the Configuration command class. The values are device-specific and are not reported by the devices. Information on parameters is provided only in the device user manual. An ongoing task for the OpenZWave project is to create XML files describing the available parameters for every Z-Wave. See the config folder in the project source code for examples. | |
bool | SetConfigParam (uint32 const _homeId, uint8 const _nodeId, uint8 const _param, int32 _value, uint8 const _size=2) |
Set the value of a configurable parameter in a device. Some devices have various parameters that can be configured to control the device behavior. These are not reported by the device over the Z-Wave network, but can usually be found in the device's user manual. This method returns immediately, without waiting for confirmation from the device that the change has been made. More... | |
void | RequestConfigParam (uint32 const _homeId, uint8 const _nodeId, uint8 const _param) |
Request the value of a configurable parameter from a device. Some devices have various parameters that can be configured to control the device behavior. These are not reported by the device over the Z-Wave network, but can usually be found in the device's user manual. This method requests the value of a parameter from the device, and then returns immediately, without waiting for a response. If the parameter index is valid for this device, and the device is awake, the value will eventually be reported via a ValueChanged notification callback. The ValueID reported in the callback will have an index set the same as _param and a command class set to the same value as returned by a call to Configuration::StaticGetCommandClassId. More... | |
void | RequestAllConfigParams (uint32 const _homeId, uint8 const _nodeId) |
Request the values of all known configurable parameters from a device. More... | |
Groups | |
uint8 | GetNumGroups (uint32 const _homeId, uint8 const _nodeId) |
Gets the number of association groups reported by this node In Z-Wave, groups are numbered starting from one. For example, if a call to GetNumGroups returns 4, the _groupIdx value to use in calls to GetAssociations, AddAssociation and RemoveAssociation will be a number between 1 and 4. More... | |
uint32 | GetAssociations (uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx, uint8 **o_associations) |
Gets the associations for a group. Makes a copy of the list of associated nodes in the group, and returns it in an array of uint8's. The caller is responsible for freeing the array memory with a call to delete []. More... | |
uint32 | GetAssociations (uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx, InstanceAssociation **o_associations) |
Gets the associations for a group. Makes a copy of the list of associated nodes in the group, and returns it in an array of InstanceAssociation's. The caller is responsible for freeing the array memory with a call to delete []. More... | |
uint8 | GetMaxAssociations (uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx) |
Gets the maximum number of associations for a group. More... | |
string | GetGroupLabel (uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx) |
Returns a label for the particular group of a node. This label is populated by the device specific configuration files. More... | |
void | AddAssociation (uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance=0x00) |
Adds a node to an association group. Due to the possibility of a device being asleep, the command is assumed to succeed, and the association data held in this class is updated directly. This will be reverted by a future Association message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
void | RemoveAssociation (uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance=0x00) |
Removes a node from an association group. Due to the possibility of a device being asleep, the command is assumed to succeed, and the association data held in this class is updated directly. This will be reverted by a future Association message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases. More... | |
Notifications | |
For notification of changes to the Z-Wave network or device values and associations. | |
bool | AddWatcher (pfnOnNotification_t _watcher, void *_context) |
Add a notification watcher. In OpenZWave, all feedback from the Z-Wave network is sent to the application via callbacks. This method allows the application to add a notification callback handler, known as a "watcher" to OpenZWave. An application needs only add a single watcher - all notifications will be reported to it. More... | |
bool | RemoveWatcher (pfnOnNotification_t _watcher, void *_context) |
Remove a notification watcher. More... | |
Controller Commands | |
Commands for Z-Wave network management using the PC Controller. | |
void | ResetController (uint32 const _homeId) |
Hard Reset a PC Z-Wave Controller. Resets a controller and erases its network configuration settings. The controller becomes a primary controller ready to add devices to a new network. More... | |
void | SoftReset (uint32 const _homeId) |
Soft Reset a PC Z-Wave Controller. Resets a controller without erasing its network configuration settings. More... | |
DEPRECATED bool | BeginControllerCommand (uint32 const _homeId, Driver::ControllerCommand _command, Driver::pfnControllerCallback_t _callback=NULL, void *_context=NULL, bool _highPower=false, uint8 _nodeId=0xff, uint8 _arg=0) |
Start a controller command process. Most Controller Commands are implemented via Other Manager methods, you should only use this method if you need advanced control over a existing Controller Command or if a ControllerCommand is not implemented. More... | |
bool | CancelControllerCommand (uint32 const _homeId) |
Cancels any in-progress command running on a controller. More... | |
Network Commands | |
Commands for Z-Wave network for testing, routing and other internal operations. | |
void | TestNetworkNode (uint32 const _homeId, uint8 const _nodeId, uint32 const _count) |
Test network node. Sends a series of messages to a network node for testing network reliability. More... | |
void | TestNetwork (uint32 const _homeId, uint32 const _count) |
Test network. Sends a series of messages to every node on the network for testing network reliability. More... | |
void | HealNetworkNode (uint32 const _homeId, uint8 const _nodeId, bool _doRR) |
Heal network node by requesting the node rediscover their neighbors. Sends a ControllerCommand_RequestNodeNeighborUpdate to the node. More... | |
void | HealNetwork (uint32 const _homeId, bool _doRR) |
Heal network by requesting node's rediscover their neighbors. Sends a ControllerCommand_RequestNodeNeighborUpdate to every node. Can take a while on larger networks. More... | |
bool | AddNode (uint32 const _homeId, bool _doSecurity=true) |
Start the Inclusion Process to add a Node to the Network. The Status of the Node Inclusion is communicated via Notifications. Specifically, you should monitor ControllerCommand Notifications. More... | |
bool | RemoveNode (uint32 const _homeId) |
Remove a Device from the Z-Wave Network The Status of the Node Removal is communicated via Notifications. Specifically, you should monitor ControllerCommand Notifications. More... | |
bool | RemoveFailedNode (uint32 const _homeId, uint8 const _nodeId) |
Remove a Failed Device from the Z-Wave Network This Command will remove a failed node from the network. The Node should be on the Controllers Failed Node List, otherwise this command will fail. You can use the HasNodeFailed function below to test if the Controller believes the Node has Failed. The Status of the Node Removal is communicated via Notifications. Specifically, you should monitor ControllerCommand Notifications. More... | |
bool | HasNodeFailed (uint32 const _homeId, uint8 const _nodeId) |
Check if the Controller Believes a Node has Failed. This is different from the IsNodeFailed call in that we test the Controllers Failed Node List, whereas the IsNodeFailed is testing our list of Failed Nodes, which might be different. The Results will be communicated via Notifications. Specifically, you should monitor the ControllerCommand notifications. More... | |
bool | RequestNodeNeighborUpdate (uint32 const _homeId, uint8 const _nodeId) |
Ask a Node to update its Neighbor Tables This command will ask a Node to update its Neighbor Tables. More... | |
bool | AssignReturnRoute (uint32 const _homeId, uint8 const _nodeId) |
Ask a Node to update its update its Return Route to the Controller This command will ask a Node to update its Return Route to the Controller. More... | |
bool | DeleteAllReturnRoutes (uint32 const _homeId, uint8 const _nodeId) |
Ask a Node to delete all Return Route. This command will ask a Node to delete all its return routes, and will rediscover when needed. More... | |
bool | SendNodeInformation (uint32 const _homeId, uint8 const _nodeId) |
Send a NIF frame from the Controller to a Node. This command send a NIF frame from the Controller to a Node. More... | |
bool | CreateNewPrimary (uint32 const _homeId) |
Create a new primary controller when old primary fails. Requires SUC. This command Creates a new Primary Controller when the Old Primary has Failed. Requires a SUC on the network to function. More... | |
bool | ReceiveConfiguration (uint32 const _homeId) |
Receive network configuration information from primary controller. Requires secondary. This command prepares the controller to receive Network Configuration from a Secondary Controller. More... | |
bool | ReplaceFailedNode (uint32 const _homeId, uint8 const _nodeId) |
Replace a failed device with another. If the node is not in the controller's failed nodes list, or the node responds, this command will fail. You can check if a Node is in the Controllers Failed node list by using the HasNodeFailed method. More... | |
bool | TransferPrimaryRole (uint32 const _homeId) |
Add a new controller to the network and make it the primary. The existing primary will become a secondary controller. More... | |
bool | RequestNetworkUpdate (uint32 const _homeId, uint8 const _nodeId) |
Update the controller with network information from the SUC/SIS. More... | |
bool | ReplicationSend (uint32 const _homeId, uint8 const _nodeId) |
Send information from primary to secondary. More... | |
bool | CreateButton (uint32 const _homeId, uint8 const _nodeId, uint8 const _buttonid) |
Create a handheld button id. More... | |
bool | DeleteButton (uint32 const _homeId, uint8 const _nodeId, uint8 const _buttonid) |
Delete a handheld button id. More... | |
Scene Commands | |
uint8 | GetNumScenes () |
Gets the number of scenes that have been defined. More... | |
uint8 | GetAllScenes (uint8 **_sceneIds) |
Gets a list of all the SceneIds. More... | |
void | RemoveAllScenes (uint32 const _homeId) |
Remove all the SceneIds. More... | |
uint8 | CreateScene () |
Create a new Scene passing in Scene ID. More... | |
bool | RemoveScene (uint8 const _sceneId) |
Remove an existing Scene. More... | |
bool | AddSceneValue (uint8 const _sceneId, ValueID const &_valueId, bool const _value) |
Add a bool Value ID to an existing scene. More... | |
bool | AddSceneValue (uint8 const _sceneId, ValueID const &_valueId, uint8 const _value) |
Add a byte Value ID to an existing scene. More... | |
bool | AddSceneValue (uint8 const _sceneId, ValueID const &_valueId, float const _value) |
Add a decimal Value ID to an existing scene. More... | |
bool | AddSceneValue (uint8 const _sceneId, ValueID const &_valueId, int32 const _value) |
Add a 32-bit signed integer Value ID to an existing scene. More... | |
bool | AddSceneValue (uint8 const _sceneId, ValueID const &_valueId, int16 const _value) |
Add a 16-bit signed integer Value ID to an existing scene. More... | |
bool | AddSceneValue (uint8 const _sceneId, ValueID const &_valueId, string const &_value) |
Add a string Value ID to an existing scene. More... | |
bool | AddSceneValueListSelection (uint8 const _sceneId, ValueID const &_valueId, string const &_value) |
Add the selected item list Value ID to an existing scene (as a string). More... | |
bool | AddSceneValueListSelection (uint8 const _sceneId, ValueID const &_valueId, int32 const _value) |
Add the selected item list Value ID to an existing scene (as a integer). More... | |
bool | RemoveSceneValue (uint8 const _sceneId, ValueID const &_valueId) |
Remove the Value ID from an existing scene. More... | |
int | SceneGetValues (uint8 const _sceneId, vector< ValueID > *o_value) |
Retrieves the scene's list of values. More... | |
bool | SceneGetValueAsBool (uint8 const _sceneId, ValueID const &_valueId, bool *o_value) |
Retrieves a scene's value as a bool. More... | |
bool | SceneGetValueAsByte (uint8 const _sceneId, ValueID const &_valueId, uint8 *o_value) |
Retrieves a scene's value as an 8-bit unsigned integer. More... | |
bool | SceneGetValueAsFloat (uint8 const _sceneId, ValueID const &_valueId, float *o_value) |
Retrieves a scene's value as a float. More... | |
bool | SceneGetValueAsInt (uint8 const _sceneId, ValueID const &_valueId, int32 *o_value) |
Retrieves a scene's value as a 32-bit signed integer. More... | |
bool | SceneGetValueAsShort (uint8 const _sceneId, ValueID const &_valueId, int16 *o_value) |
Retrieves a scene's value as a 16-bit signed integer. More... | |
bool | SceneGetValueAsString (uint8 const _sceneId, ValueID const &_valueId, string *o_value) |
Retrieves a scene's value as a string. More... | |
bool | SceneGetValueListSelection (uint8 const _sceneId, ValueID const &_valueId, string *o_value) |
Retrieves a scene's value as a list (as a string). More... | |
bool | SceneGetValueListSelection (uint8 const _sceneId, ValueID const &_valueId, int32 *o_value) |
Retrieves a scene's value as a list (as a integer). More... | |
bool | SetSceneValue (uint8 const _sceneId, ValueID const &_valueId, bool const _value) |
Set a bool Value ID to an existing scene's ValueID. More... | |
bool | SetSceneValue (uint8 const _sceneId, ValueID const &_valueId, uint8 const _value) |
Set a byte Value ID to an existing scene's ValueID. More... | |
bool | SetSceneValue (uint8 const _sceneId, ValueID const &_valueId, float const _value) |
Set a decimal Value ID to an existing scene's ValueID. More... | |
bool | SetSceneValue (uint8 const _sceneId, ValueID const &_valueId, int32 const _value) |
Set a 32-bit signed integer Value ID to an existing scene's ValueID. More... | |
bool | SetSceneValue (uint8 const _sceneId, ValueID const &_valueId, int16 const _value) |
Set a 16-bit integer Value ID to an existing scene's ValueID. More... | |
bool | SetSceneValue (uint8 const _sceneId, ValueID const &_valueId, string const &_value) |
Set a string Value ID to an existing scene's ValueID. More... | |
bool | SetSceneValueListSelection (uint8 const _sceneId, ValueID const &_valueId, string const &_value) |
Set the list selected item Value ID to an existing scene's ValueID (as a string). More... | |
bool | SetSceneValueListSelection (uint8 const _sceneId, ValueID const &_valueId, int32 const _value) |
Set the list selected item Value ID to an existing scene's ValueID (as a integer). More... | |
string | GetSceneLabel (uint8 const _sceneId) |
Returns a label for the particular scene. More... | |
void | SetSceneLabel (uint8 const _sceneId, string const &_value) |
Sets a label for the particular scene. More... | |
bool | SceneExists (uint8 const _sceneId) |
Check if a Scene ID is defined. More... | |
bool | ActivateScene (uint8 const _sceneId) |
Activate given scene to perform all its actions. More... | |
Statistics retrieval interface | |
void | GetDriverStatistics (uint32 const _homeId, Driver::DriverData *_data) |
Retrieve statistics from driver. More... | |
void | GetNodeStatistics (uint32 const _homeId, uint8 const _nodeId, Node::NodeData *_data) |
Retrieve statistics per node. More... | |
The main public interface to OpenZWave.
A singleton class providing the main public interface to OpenZWave. The Manager class exposes all the functionality required to add Z-Wave support to an application. It handles the sending and receiving of Z-Wave messages as well as the configuration of a Z-Wave network and its devices, freeing the library user from the burden of learning the low-level details of the Z-Wave protocol.
All Z-Wave functionality is accessed via the Manager class. While this does not make for the most efficient code structure, it does enable the library to handle potentially complex and hard-to-debug issues such as multi-threading and object lifespans behind the scenes. Application development is therefore simplified and less prone to bugs.
There can be only one instance of the Manager class, and all applications will start by calling Manager::Create static method to create that instance. From then on, a call to the Manager::Get static method will return the pointer to the Manager object. On application exit, Manager::Destroy should be called to allow OpenZWave to clean up and delete any other objects it has created.
Once the Manager has been created, a call should be made to Manager::AddWatcher to install a notification callback handler. This handler will receive notifications of Z-Wave network changes and updates to device values, and is an essential element of OpenZWave.
Next, a call should be made to Manager::AddDriver for each Z-Wave controller attached to the PC. Each Driver will handle the sending and receiving of messages for all the devices in its controller's Z-Wave network. The Driver will read any previously saved configuration and then query the Z-Wave controller for any missing information. Once that process is complete, a DriverReady notification callback will be sent containing the Home ID of the controller, which is required by most of the other Manager class methods.
[After the DriverReady notification is sent, the Driver will poll each node on the network to update information about each node. After all "awake" nodes have been polled, an "AllAwakeNodesQueried" notification is sent. This is when a client application can expect all of the node information (both static information, like the physical device's capabilities, session information (like [associations and/or names] and dynamic information (like temperature or on/off state) to be available. Finally, after all nodes (whether listening or sleeping) have been polled, an "AllNodesQueried" notification is sent.]
typedef void(* OpenZWave::Manager::pfnOnNotification_t) (Notification const *_pNotification, void *_context) |
bool Manager::ActivateScene | ( | uint8 const | _sceneId | ) |
Activate given scene to perform all its actions.
_sceneId | The Scene ID. |
void Manager::AddAssociation | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
uint8 const | _groupIdx, | ||
uint8 const | _targetNodeId, | ||
uint8 const | _instance = 0x00 |
||
) |
Adds a node to an association group. Due to the possibility of a device being asleep, the command is assumed to succeed, and the association data held in this class is updated directly. This will be reverted by a future Association message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node whose associations are to be changed. |
_groupIdx | One-based index of the group (because Z-Wave product manuals use one-based group numbering). |
_targetNodeId | Identifier for the node that will be added to the association group. |
_instance | Identifier for the instance that will be added to the association group. |
bool Manager::AddDriver | ( | string const & | _controllerPath, |
Driver::ControllerInterface const & | _interface = Driver::ControllerInterface_Serial |
||
) |
Creates a new driver for a Z-Wave controller. This method creates a Driver object for handling communications with a single Z-Wave controller. In the background, the driver first tries to read configuration data saved during a previous run. It then queries the controller directly for any missing information, and a refresh of the list of nodes that it controls. Once this information has been received, a DriverReady notification callback is sent, containing the Home ID of the controller. This Home ID is required by most of the OpenZWave Manager class methods.
_controllerPath | The string used to open the controller. On Windows this might be something like "\\.\COM3", or on Linux "/dev/ttyUSB0". |
bool Manager::AddNode | ( | uint32 const | _homeId, |
bool | _doSecurity = true |
||
) |
Start the Inclusion Process to add a Node to the Network. The Status of the Node Inclusion is communicated via Notifications. Specifically, you should monitor ControllerCommand Notifications.
Results of the AddNode Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The Home ID of the Z-Wave network where the device should be added. |
_doSecurity | Whether to initialize the Network Key on the device if it supports the Security CC |
bool Manager::AddSceneValue | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
string const & | _value | ||
) |
bool Manager::AddSceneValueListSelection | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
string const & | _value | ||
) |
Add the selected item list Value ID to an existing scene (as a string).
_sceneId | is an integer representing the unique Scene ID. |
_valueId | is the Value ID to be added. |
_value | is the string value to be saved. |
bool Manager::AddSceneValueListSelection | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
int32 const | _value | ||
) |
Add the selected item list Value ID to an existing scene (as a integer).
_sceneId | is an integer representing the unique Scene ID. |
_valueId | is the Value ID to be added. |
_value | is the integer value to be saved. |
bool Manager::AddWatcher | ( | pfnOnNotification_t | _watcher, |
void * | _context | ||
) |
Add a notification watcher. In OpenZWave, all feedback from the Z-Wave network is sent to the application via callbacks. This method allows the application to add a notification callback handler, known as a "watcher" to OpenZWave. An application needs only add a single watcher - all notifications will be reported to it.
_watcher | pointer to a function that will be called by the notification system. |
_context | pointer to user defined data that will be passed to the watcher function with each notification. |
Ask a Node to update its update its Return Route to the Controller This command will ask a Node to update its Return Route to the Controller.
Results of the AssignReturnRoute Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network where you want to update the device |
_nodeId | The NodeID of the Node. |
bool Manager::BeginControllerCommand | ( | uint32 const | _homeId, |
Driver::ControllerCommand | _command, | ||
Driver::pfnControllerCallback_t | _callback = NULL , |
||
void * | _context = NULL , |
||
bool | _highPower = false , |
||
uint8 | _nodeId = 0xff , |
||
uint8 | _arg = 0 |
||
) |
Start a controller command process. Most Controller Commands are implemented via Other Manager methods, you should only use this method if you need advanced control over a existing Controller Command or if a ControllerCommand is not implemented.
_homeId | The Home ID of the Z-Wave controller. |
_command | The command to be sent to the controller. |
_callback | pointer to a function that will be called at various stages during the command process to notify the user of progress or to request actions on the user's part. Defaults to NULL. Callbacks are also sent via Notification mechanism with type of Notification::Type_ControllerCommand |
_context | pointer to user defined data that will be passed into to the callback function. Defaults to NULL. |
_highPower | used only with the AddDevice, AddController, RemoveDevice and RemoveController commands. Usually when adding or removing devices, the controller operates at low power so that the controller must be physically close to the device for security reasons. If _highPower is true, the controller will operate at normal power levels instead. Defaults to false. |
_nodeId | is the node ID used by the command if necessary. |
_arg | is an optional argument, usually another node ID, that is used by the command. |
Commands
Callbacks
bool Manager::CancelControllerCommand | ( | uint32 const | _homeId | ) |
Cancels any in-progress command running on a controller.
_homeId | The Home ID of the Z-Wave controller. |
void Manager::ClearSwitchPoints | ( | ValueID const & | _id | ) |
Clears all switch points from the schedule.
_id | The unique identifier of the schedule value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
|
static |
Creates the Manager singleton object. The Manager provides the public interface to OpenZWave, exposing all the functionality required to add Z-Wave support to an application. There can be only one Manager in an OpenZWave application. An Options object must be created and Locked first, otherwise the call to Manager::Create will fail. Once the Manager has been created, call AddWatcher to install a notification callback handler, and then call the AddDriver method for each attached PC Z-Wave controller in turn.
_options | a locked Options object containing all the application's configurable option values. |
OZWException | with Type OZWException::OZWEXCEPTION_OPTIONS if the Options Class is not setup and Locked |
Create a handheld button id.
Only intended for Bridge Firmware Controllers.
Results of the CreateButton Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network |
_nodeId | the ID of the Virtual Node |
_buttonId | the ID of the Button to create |
bool Manager::CreateNewPrimary | ( | uint32 const | _homeId | ) |
Create a new primary controller when old primary fails. Requires SUC. This command Creates a new Primary Controller when the Old Primary has Failed. Requires a SUC on the network to function.
Results of the CreateNewPrimary Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network |
uint8 Manager::CreateScene | ( | ) |
Ask a Node to delete all Return Route. This command will ask a Node to delete all its return routes, and will rediscover when needed.
Results of the DeleteAllReturnRoutes Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network where you want to update the device |
_nodeId | The NodeID of the Node. |
Delete a handheld button id.
Only intended for Bridge Firmware Controllers.
Results of the DeleteButton Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network |
_nodeId | the ID of the Virtual Node |
_buttonId | the ID of the Button to delete |
|
static |
bool Manager::DisablePoll | ( | ValueID const & | _valueId | ) |
Disable the polling of a device's state.
_valueId | The ID of the value to stop polling. |
Enable the polling of a device's state.
_valueId | The ID of the value to start polling. |
_intensity,number | of polling for one polling interval. |
|
inlinestatic |
Gets a list of all the SceneIds.
_sceneIds | is a pointer to an array of integers. |
uint32 Manager::GetAssociations | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
uint8 const | _groupIdx, | ||
uint8 ** | o_associations | ||
) |
Gets the associations for a group. Makes a copy of the list of associated nodes in the group, and returns it in an array of uint8's. The caller is responsible for freeing the array memory with a call to delete [].
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node whose associations we are interested in. |
_groupIdx | One-based index of the group (because Z-Wave product manuals use one-based group numbering). |
o_associations | If the number of associations returned is greater than zero, o_associations will be set to point to an array containing the IDs of the associated nodes. |
uint32 Manager::GetAssociations | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
uint8 const | _groupIdx, | ||
InstanceAssociation ** | o_associations | ||
) |
Gets the associations for a group. Makes a copy of the list of associated nodes in the group, and returns it in an array of InstanceAssociation's. The caller is responsible for freeing the array memory with a call to delete [].
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node whose associations we are interested in. |
_groupIdx | One-based index of the group (because Z-Wave product manuals use one-based group numbering). |
o_associations | If the number of associations returned is greater than zero, o_associations will be set to point to an array containing the IDs and instances of the associated nodes. |
bool Manager::GetChangeVerified | ( | ValueID const & | _id | ) |
determine if value changes upon a refresh should be verified. If so, the library will immediately refresh the value a second time whenever a change is observed. This helps to filter out spurious data reported occasionally by some devices.
_id | The unique identifier of the value whose changes should or should not be verified. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Driver::ControllerInterface Manager::GetControllerInterfaceType | ( | uint32 const | _homeId | ) |
Obtain controller interface type.
_homeId | The Home ID of the Z-Wave controller. |
Get the node ID of the Z-Wave controller.
_homeId | The Home ID of the Z-Wave controller. |
string Manager::GetControllerPath | ( | uint32 const | _homeId | ) |
Obtain controller interface path.
_homeId | The Home ID of the Z-Wave controller. |
void Manager::GetDriverStatistics | ( | uint32 const | _homeId, |
Driver::DriverData * | _data | ||
) |
Retrieve statistics from driver.
_homeId | The Home ID of the driver to obtain counters |
_data | Pointer to structure DriverData to return values |
Returns a label for the particular group of a node. This label is populated by the device specific configuration files.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node whose associations are to be changed. |
_groupIdx | One-based index of the group (because Z-Wave product manuals use one-based group numbering). |
string Manager::GetLibraryTypeName | ( | uint32 const | _homeId | ) |
Get a string containing the Z-Wave API library type used by a controller. The possible library types are:
The controller should never return a slave library type. For a more efficient test of whether a controller is a Bridge Controller, use the IsBridgeController method.
_homeId | The Home ID of the Z-Wave controller. |
string Manager::GetLibraryVersion | ( | uint32 const | _homeId | ) |
Get the version of the Z-Wave API library used by a controller.
_homeId | The Home ID of the Z-Wave controller. |
uint8 Manager::GetMaxAssociations | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
uint8 const | _groupIdx | ||
) |
Gets the maximum number of associations for a group.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node whose associations we are interested in. |
_groupIdx | one-based index of the group (because Z-Wave product manuals use one-based group numbering). |
Get the basic type of a node.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
bool Manager::GetNodeClassInformation | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
uint8 const | _commandClassId, | ||
string * | _className = NULL , |
||
uint8 * | _classVersion = NULL |
||
) |
Get whether the node has the defined class available or not.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
_commandClassId | Id of the class to test for |
Get the node device type as reported in the Z-Wave+ Info report.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the node device type as reported in the Z-Wave+ Info report.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the generic type of a node.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the location of a node The node location is a user-editable string that would normally be handled by the Node Naming command class, but many devices do not support it. So that a node can always report its location, OpenZWave stores it with the node data, and provides access through this method and SetNodeLocation, rather than reporting it via a command class Value object.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the manufacturer ID of a device The manufacturer ID is a four digit hex code and would normally be handled by the Manufacturer Specific command class, but not all devices support it. Although the value reported by this method will be an empty string if the command class is not supported and cannot be set by the user, the manufacturer ID is still stored with the node data (rather than being reported via a command class Value object) to retain a consistent approach with the other manufacturer specific data.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the manufacturer name of a device The manufacturer name would normally be handled by the Manufacturer Specific command class, taking the manufacturer ID reported by the device and using it to look up the name from the manufacturer_specific.xml file in the OpenZWave config folder. However, there are some devices that do not support the command class, so to enable the user to manually set the name, it is stored with the node data and accessed via this method rather than being reported via a command class Value object.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the maximum baud rate of a node's communications.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the name of a node The node name is a user-editable label for the node that would normally be handled by the Node Naming command class, but many devices do not support it. So that a node can always be named, OpenZWave stores it with the node data, and provides access through this method and SetNodeName, rather than reporting it via a command class Value object. The maximum length of a node name is 16 characters.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
uint32 Manager::GetNodeNeighbors | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
uint8 ** | _nodeNeighbors | ||
) |
Get the bitmap of this node's neighbors.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
_nodeNeighbors | An array of 29 uint8s to hold the neighbor bitmap |
Get the node PlusType as reported in the Z-Wave+ Info report.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the node PlusType as reported in the Z-Wave+ Info report.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the product ID of a device The product ID is a four digit hex code and would normally be handled by the Manufacturer Specific command class, but not all devices support it. Although the value reported by this method will be an empty string if the command class is not supported and cannot be set by the user, the product ID is still stored with the node data (rather than being reported via a command class Value object) to retain a consistent approach with the other manufacturer specific data.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the product name of a device The product name would normally be handled by the Manufacturer Specific command class, taking the product Type and ID reported by the device and using it to look up the name from the manufacturer_specific.xml file in the OpenZWave config folder. However, there are some devices that do not support the command class, so to enable the user to manually set the name, it is stored with the node data and accessed via this method rather than being reported via a command class Value object.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the product type of a device The product type is a four digit hex code and would normally be handled by the Manufacturer Specific command class, but not all devices support it. Although the value reported by this method will be an empty string if the command class is not supported and cannot be set by the user, the product type is still stored with the node data (rather than being reported via a command class Value object) to retain a consistent approach with the other manufacturer specific data.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get whether the node's query stage as a string.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the node role as reported in the Z-Wave+ Info report.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the node role as reported in the Z-Wave+ Info report.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the security byte of a node.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the specific type of a node.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
void Manager::GetNodeStatistics | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
Node::NodeData * | _data | ||
) |
Retrieve statistics per node.
_homeId | The Home ID of the driver for the node |
_nodeId | The node number |
_data | Pointer to structure NodeData to return values |
Get a human-readable label describing the node The label is taken from the Z-Wave specific, generic or basic type, depending on which of those values are specified by the node.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the version number of a node.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Gets the number of association groups reported by this node In Z-Wave, groups are numbered starting from one. For example, if a call to GetNumGroups returns 4, the _groupIdx value to use in calls to GetAssociations, AddAssociation and RemoveAssociation will be a number between 1 and 4.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node whose groups we are interested in. |
uint8 Manager::GetNumScenes | ( | ) |
Gets the number of scenes that have been defined.
Get the number of switch points defined in a schedule.
_id | The unique identifier of the schedule value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
|
inline |
Get the polling intensity of a device's state.
_valueId | The ID of the value to check polling. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
int32 Manager::GetPollInterval | ( | ) |
Get the time period between polls of a node's state.
string Manager::GetSceneLabel | ( | uint8 const | _sceneId | ) |
Get count of messages in the outgoing send queue.
_homeId | The Home ID of the Z-Wave controller. |
Get the node ID of the Static Update Controller.
_homeId | The Home ID of the Z-Wave controller. |
bool Manager::GetSwitchPoint | ( | ValueID const & | _id, |
uint8 const | _idx, | ||
uint8 * | o_hours, | ||
uint8 * | o_minutes, | ||
int8 * | o_setback | ||
) |
Gets switch point data from the schedule. Retrieves the time and setback values from a switch point in the schedule.
_id | The unique identifier of the schedule value. |
_idx | The index of the switch point, between zero and one less than the value returned by GetNumSwitchPoints. |
o_hours | a pointer to a uint8 that will be filled with the hours part of the switch point data. |
o_minutes | a pointer to a uint8 that will be filled with the minutes part of the switch point data. |
o_setback | a pointer to an int8 that will be filled with the setback value. This can range from -128 (-12.8C)to 120 (12.0C). There are two special setback values - 121 is used to set Frost Protection mode, and 122 is used to set Energy Saving mode. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::GetValueAsBool | ( | ValueID const & | _id, |
bool * | o_value | ||
) |
Gets a value as a bool.
_id | The unique identifier of the value. |
o_value | Pointer to a bool that will be filled with the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets a value as an 8-bit unsigned integer.
_id | The unique identifier of the value. |
o_value | Pointer to a uint8 that will be filled with the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::GetValueAsFloat | ( | ValueID const & | _id, |
float * | o_value | ||
) |
Gets a value as a float.
_id | The unique identifier of the value. |
o_value | Pointer to a float that will be filled with the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets a value as a 32-bit signed integer.
_id | The unique identifier of the value. |
o_value | Pointer to an int32 that will be filled with the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets a value as a collection of bytes.
_id | The unique identifier of the value. |
o_value | Pointer to a uint8* that will be filled with the value. This return value will need to be freed as it was dynamically allocated. |
o_length | Pointer to a uint8 that will be fill with the data length. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets a value as a 16-bit signed integer.
_id | The unique identifier of the value. |
o_value | Pointer to an int16 that will be filled with the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::GetValueAsString | ( | ValueID const & | _id, |
string * | o_value | ||
) |
Gets a value as a string. Creates a string representation of a value, regardless of type.
_id | The unique identifier of the value. |
o_value | Pointer to a string that will be filled with the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets a float value's precision.
_id | The unique identifier of the value. |
o_value | Pointer to a uint8 that will be filled with the precision value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
string Manager::GetValueHelp | ( | ValueID const & | _id | ) |
Gets a help string describing the value's purpose and usage.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
string Manager::GetValueLabel | ( | ValueID const & | _id | ) |
Gets the user-friendly label for the value.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::GetValueListItems | ( | ValueID const & | _id, |
vector< string > * | o_value | ||
) |
Gets the list of items from a list value.
_id | The unique identifier of the value. |
o_value | Pointer to a vector of strings that will be filled with list items. The vector will be cleared before the items are added. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::GetValueListSelection | ( | ValueID const & | _id, |
string * | o_value | ||
) |
Gets the selected item from a list (as a string).
_id | The unique identifier of the value. |
o_value | Pointer to a string that will be filled with the selected item. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets the selected item from a list (as an integer).
_id | The unique identifier of the value. |
o_value | Pointer to an integer that will be filled with the selected item. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets the list of values from a list value.
_id | The unique identifier of the value. |
o_value | Pointer to a vector of integers that will be filled with list items. The vector will be cleared before the items are added. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets the maximum that this value may contain.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Gets the minimum that this value may contain.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
string Manager::GetValueUnits | ( | ValueID const & | _id | ) |
Gets the units that the value is measured in.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
|
static |
|
static |
Get the Version Number of OZW as a string.
|
static |
Get the Version Number including Git commit of OZW as a string.
Check if the Controller Believes a Node has Failed. This is different from the IsNodeFailed call in that we test the Controllers Failed Node List, whereas the IsNodeFailed is testing our list of Failed Nodes, which might be different. The Results will be communicated via Notifications. Specifically, you should monitor the ControllerCommand notifications.
Results of the HasNodeFailed Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network where you want to test the device |
_nodeId | The NodeID of the Failed Node. |
void Manager::HealNetwork | ( | uint32 const | _homeId, |
bool | _doRR | ||
) |
Heal network by requesting node's rediscover their neighbors. Sends a ControllerCommand_RequestNodeNeighborUpdate to every node. Can take a while on larger networks.
_homeId | The Home ID of the Z-Wave network to be healed. |
_doRR | Whether to perform return routes initialization. |
Heal network node by requesting the node rediscover their neighbors. Sends a ControllerCommand_RequestNodeNeighborUpdate to the node.
_homeId | The Home ID of the Z-Wave network to be healed. |
_nodeId | The node to heal. |
_doRR | Whether to perform return routes initialization. |
bool Manager::IsBridgeController | ( | uint32 const | _homeId | ) |
Query if the controller is using the bridge controller library. A bridge controller is able to create virtual nodes that can be associated with other controllers to enable events to be passed on.
_homeId | The Home ID of the Z-Wave controller. |
Get whether the node is awake or asleep.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get whether the node is a beam capable device.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get whether the node is working or has failed.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get whether the node is a frequent listening device that goes to sleep but can be woken up by a beam. Useful to determine node and controller consistency.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get whether the node information has been received.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get whether the node is a listening device that does not go to sleep.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get whether the node is a routing device that passes messages to other nodes.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Get the security attribute for a node. True if node supports security features.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
bool Manager::isPolled | ( | ValueID const & | _valueId | ) |
Determine the polling of a device's state.
_valueId | The ID of the value to check polling. |
bool Manager::IsPrimaryController | ( | uint32 const | _homeId | ) |
Query if the controller is a primary controller. The primary controller is the main device used to configure and control a Z-Wave network. There can only be one primary controller - all other controllers are secondary controllers.
The only difference between a primary and secondary controller is that the primary is the only one that can be used to add or remove other devices. For this reason, it is usually better for the primary controller to be portable, since most devices must be added when installed in their final location.
Calls to BeginControllerCommand will fail if the controller is not the primary.
_homeId | The Home ID of the Z-Wave controller. |
bool Manager::IsStaticUpdateController | ( | uint32 const | _homeId | ) |
Query if the controller is a static update controller. A Static Update Controller (SUC) is a controller that must never be moved in normal operation and which can be used by other nodes to receive information about network changes.
_homeId | The Home ID of the Z-Wave controller. |
bool Manager::IsValuePolled | ( | ValueID const & | _id | ) |
Test whether the value is currently being polled.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::IsValueReadOnly | ( | ValueID const & | _id | ) |
Test whether the value is read-only.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::IsValueSet | ( | ValueID const & | _id | ) |
Test whether the value has been set.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::IsValueWriteOnly | ( | ValueID const & | _id | ) |
Test whether the value is write-only.
_id | The unique identifier of the value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
void Manager::LogDriverStatistics | ( | uint32 const | _homeId | ) |
Send current driver statistics to the log file.
_homeId | The Home ID of the Z-Wave controller. |
bool Manager::PressButton | ( | ValueID const & | _id | ) |
Starts an activity in a device. Since buttons are write-only values that do not report a state, no notification callbacks are sent.
_id | The unique identifier of the integer value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::ReceiveConfiguration | ( | uint32 const | _homeId | ) |
Receive network configuration information from primary controller. Requires secondary. This command prepares the controller to receive Network Configuration from a Secondary Controller.
Results of the ReceiveConfiguration Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network |
Trigger the fetching of fixed data about a node. Causes the node's data to be obtained from the Z-Wave network in the same way as if it had just been added. This method would normally be called automatically by OpenZWave, but if you know that a node has been changed, calling this method will force a refresh of all of the data held by the library. This can be especially useful for devices that were asleep when the application was first run. This is the same as the query state starting from the beginning.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
bool Manager::RefreshValue | ( | ValueID const & | _id | ) |
Refreshes the specified value from the Z-Wave network. A call to this function causes the library to send a message to the network to retrieve the current value of the specified ValueID (just like a poll, except only one-time, not recurring).
_id | The unique identifier of the value to be refreshed. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::ReleaseButton | ( | ValueID const & | _id | ) |
Stops an activity in a device. Since buttons are write-only values that do not report a state, no notification callbacks are sent.
_id | The unique identifier of the integer value. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
void Manager::RemoveAllScenes | ( | uint32 const | _homeId | ) |
Remove all the SceneIds.
_homeId | The Home ID of the Z-Wave controller. 0 for all devices from all scenes. |
void Manager::RemoveAssociation | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
uint8 const | _groupIdx, | ||
uint8 const | _targetNodeId, | ||
uint8 const | _instance = 0x00 |
||
) |
Removes a node from an association group. Due to the possibility of a device being asleep, the command is assumed to succeed, and the association data held in this class is updated directly. This will be reverted by a future Association message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node whose associations are to be changed. |
_groupIdx | One-based index of the group (because Z-Wave product manuals use one-based group numbering). |
_targetNodeId | Identifier for the node that will be removed from the association group. |
_instance | Identifier for the instance that will be removed to the association group. |
bool Manager::RemoveDriver | ( | string const & | _controllerPath | ) |
Removes the driver for a Z-Wave controller, and closes the controller. Drivers do not need to be explicitly removed before calling Destroy - this is handled automatically.
_controllerPath | The same string as was passed in the original call to AddDriver. |
Remove a Failed Device from the Z-Wave Network This Command will remove a failed node from the network. The Node should be on the Controllers Failed Node List, otherwise this command will fail. You can use the HasNodeFailed function below to test if the Controller believes the Node has Failed. The Status of the Node Removal is communicated via Notifications. Specifically, you should monitor ControllerCommand Notifications.
Results of the RemoveFailedNode Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network where you want to remove the device |
_nodeId | The NodeID of the Failed Node. |
bool Manager::RemoveNode | ( | uint32 const | _homeId | ) |
Remove a Device from the Z-Wave Network The Status of the Node Removal is communicated via Notifications. Specifically, you should monitor ControllerCommand Notifications.
Results of the RemoveNode Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network where you want to remove the device |
bool Manager::RemoveScene | ( | uint8 const | _sceneId | ) |
Remove a switch point from the schedule. Removes the switch point at the specified time from the schedule.
_id | The unique identifier of the schedule value. |
_hours | The hours part of the time when the switch point will trigger. The time is set using the 24-hour clock, so this value must be between 0 and 23. |
_minutes | The minutes part of the time when the switch point will trigger. This value must be between 0 and 59. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::RemoveWatcher | ( | pfnOnNotification_t | _watcher, |
void * | _context | ||
) |
Remove a notification watcher.
_watcher | pointer to a function that must match that passed to a previous call to AddWatcher |
_context | pointer to user defined data that must match the one passed in that same previous call to AddWatcher. |
Replace a failed device with another. If the node is not in the controller's failed nodes list, or the node responds, this command will fail. You can check if a Node is in the Controllers Failed node list by using the HasNodeFailed method.
Results of the ReplaceFailedNode Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network |
_nodeId | the ID of the Failed Node |
Send information from primary to secondary.
Results of the ReplicationSend Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network |
_nodeId | the ID of the Node |
Request the values of all known configurable parameters from a device.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to configure. |
Request the value of a configurable parameter from a device. Some devices have various parameters that can be configured to control the device behavior. These are not reported by the device over the Z-Wave network, but can usually be found in the device's user manual. This method requests the value of a parameter from the device, and then returns immediately, without waiting for a response. If the parameter index is valid for this device, and the device is awake, the value will eventually be reported via a ValueChanged notification callback. The ValueID reported in the callback will have an index set the same as _param and a command class set to the same value as returned by a call to Configuration::StaticGetCommandClassId.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to configure. |
_param | The index of the parameter. |
Update the controller with network information from the SUC/SIS.
Results of the RequestNetworkUpdate Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network |
_nodeId | the ID of the Node |
Trigger the fetching of just the dynamic value data for a node. Causes the node's values to be requested from the Z-Wave network. This is the same as the query state starting from the dynamic state.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
Ask a Node to update its Neighbor Tables This command will ask a Node to update its Neighbor Tables.
Results of the RequestNodeNeighborUpdate Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network where you want to update the device |
_nodeId | The NodeID of the Node. |
Trigger the fetching of dynamic value data for a node. Causes the node's values to be requested from the Z-Wave network. This is the same as the query state starting from the associations state.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
void Manager::ResetController | ( | uint32 const | _homeId | ) |
Hard Reset a PC Z-Wave Controller. Resets a controller and erases its network configuration settings. The controller becomes a primary controller ready to add devices to a new network.
_homeId | The Home ID of the Z-Wave controller to be reset. |
bool Manager::SceneExists | ( | uint8 const | _sceneId | ) |
bool Manager::SceneGetValueAsBool | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
bool * | o_value | ||
) |
bool Manager::SceneGetValueAsByte | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
uint8 * | o_value | ||
) |
bool Manager::SceneGetValueAsFloat | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
float * | o_value | ||
) |
bool Manager::SceneGetValueAsInt | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
int32 * | o_value | ||
) |
bool Manager::SceneGetValueAsShort | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
int16 * | o_value | ||
) |
bool Manager::SceneGetValueAsString | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
string * | o_value | ||
) |
bool Manager::SceneGetValueListSelection | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
string * | o_value | ||
) |
Retrieves a scene's value as a list (as a string).
_sceneId | The Scene ID of the scene to retrieve the value from. |
_valueId | The Value ID of the value to retrieve. |
o_value | Pointer to a string that will be filled with the returned value. |
bool Manager::SceneGetValueListSelection | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
int32 * | o_value | ||
) |
Retrieves a scene's value as a list (as a integer).
_sceneId | The Scene ID of the scene to retrieve the value from. |
_valueId | The Value ID of the value to retrieve. |
o_value | Pointer to a integer that will be filled with the returned value. |
Retrieves the scene's list of values.
_sceneId | The Scene ID of the scene to retrieve the value from. |
o_value | Pointer to an array of ValueIDs if return is non-zero. |
Send a NIF frame from the Controller to a Node. This command send a NIF frame from the Controller to a Node.
_homeId | The HomeID of the Z-Wave network |
_nodeId | The NodeID of the Node to receive the NIF |
void Manager::SetChangeVerified | ( | ValueID const & | _id, |
bool | _verify | ||
) |
Sets a flag indicating whether value changes noted upon a refresh should be verified. If so, the library will immediately refresh the value a second time whenever a change is observed. This helps to filter out spurious data reported occasionally by some devices.
_id | The unique identifier of the value whose changes should or should not be verified. |
_verify | if true, verify changes; if false, don't verify changes. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::SetConfigParam | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
uint8 const | _param, | ||
int32 | _value, | ||
uint8 const | _size = 2 |
||
) |
Set the value of a configurable parameter in a device. Some devices have various parameters that can be configured to control the device behavior. These are not reported by the device over the Z-Wave network, but can usually be found in the device's user manual. This method returns immediately, without waiting for confirmation from the device that the change has been made.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to configure. |
_param | The index of the parameter. |
_value | The value to which the parameter should be set. |
_size | Is an optional number of bytes to be sent for the parameter _value. Defaults to 2. |
Sets the basic level of a node This is a helper method to simplify basic control of a node. It is the equivalent of changing the value reported by the node's Basic command class and will generate a ValueChanged notification from that class.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to be changed. |
_level | The level to set the node. Valid values are 0-99 and 255. Zero is off and 99 is fully on. 255 will turn on the device at its last known level (if supported). |
void Manager::SetNodeLocation | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
string const & | _location | ||
) |
Set the location of a node The node location is a user-editable string that would normally be handled by the Node Naming command class, but many devices do not support it. So that a node can always report its location, OpenZWave stores it with the node data, and provides access through this method and GetNodeLocation, rather than reporting it via a command class Value object. If the device does support the Node Naming command class, the new location will be sent to the node.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
_location | A string containing the node's location. |
void Manager::SetNodeManufacturerName | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
string const & | _manufacturerName | ||
) |
Set the manufacturer name of a device The manufacturer name would normally be handled by the Manufacturer Specific command class, taking the manufacturer ID reported by the device and using it to look up the name from the manufacturer_specific.xml file in the OpenZWave config folder. However, there are some devices that do not support the command class, so to enable the user to manually set the name, it is stored with the node data and accessed via this method rather than being reported via a command class Value object.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
_manufacturerName | A string containing the node's manufacturer name. |
Set the name of a node The node name is a user-editable label for the node that would normally be handled by the Node Naming command class, but many devices do not support it. So that a node can always be named, OpenZWave stores it with the node data, and provides access through this method and GetNodeName, rather than reporting it via a command class Value object. If the device does support the Node Naming command class, the new name will be sent to the node. The maximum length of a node name is 16 characters.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
_nodeName | A string containing the node's name. |
Turns a node off This is a helper method to simplify basic control of a node. It is the equivalent of changing the level reported by the node's Basic command class to zero, and will generate a ValueChanged notification from that class.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to be changed. |
Turns a node on This is a helper method to simplify basic control of a node. It is the equivalent of changing the level reported by the node's Basic command class to 255, and will generate a ValueChanged notification from that class. This command will turn on the device at its last known level, if supported by the device, otherwise it will turn it on at 100%.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to be changed. |
void Manager::SetNodeProductName | ( | uint32 const | _homeId, |
uint8 const | _nodeId, | ||
string const & | _productName | ||
) |
Set the product name of a device The product name would normally be handled by the Manufacturer Specific command class, taking the product Type and ID reported by the device and using it to look up the name from the manufacturer_specific.xml file in the OpenZWave config folder. However, there are some devices that do not support the command class, so to enable the user to manually set the name, it is stored with the node data and accessed via this method rather than being reported via a command class Value object.
_homeId | The Home ID of the Z-Wave controller that manages the node. |
_nodeId | The ID of the node to query. |
_productName | A string containing the node's product name. |
Set the frequency of polling (0=none, 1=every time through the list, 2-every other time, etc)
_valueId | The ID of the value whose intensity should be set |
void Manager::SetPollInterval | ( | int32 | _milliseconds, |
bool | _bIntervalBetweenPolls | ||
) |
Set the time period between polls of a node's state. Due to patent concerns, some devices do not report state changes automatically to the controller. These devices need to have their state polled at regular intervals. The length of the interval is the same for all devices. To even out the Z-Wave network traffic generated by polling, OpenZWave divides the polling interval by the number of devices that have polling enabled, and polls each in turn. It is recommended that if possible, the interval should not be set shorter than the number of polled devices in seconds (so that the network does not have to cope with more than one poll per second).
_seconds | The length of the polling interval in seconds. |
void Manager::SetSceneLabel | ( | uint8 const | _sceneId, |
string const & | _value | ||
) |
Sets a label for the particular scene.
_sceneId | The Scene ID |
_value | The new value of the label. |
bool Manager::SetSceneValue | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
string const & | _value | ||
) |
bool Manager::SetSceneValueListSelection | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
string const & | _value | ||
) |
Set the list selected item Value ID to an existing scene's ValueID (as a string).
_sceneId | is an integer representing the unique Scene ID. |
_valueId | is the Value ID to be added. |
_value | is the string value to be saved. |
bool Manager::SetSceneValueListSelection | ( | uint8 const | _sceneId, |
ValueID const & | _valueId, | ||
int32 const | _value | ||
) |
Set the list selected item Value ID to an existing scene's ValueID (as a integer).
_sceneId | is an integer representing the unique Scene ID. |
_valueId | is the Value ID to be added. |
_value | is the integer value to be saved. |
bool Manager::SetSwitchPoint | ( | ValueID const & | _id, |
uint8 const | _hours, | ||
uint8 const | _minutes, | ||
int8 const | _setback | ||
) |
Set a switch point in the schedule. Inserts a new switch point into the schedule, unless a switch point already exists at the specified time in which case that switch point is updated with the new setback value instead. A maximum of nine switch points can be set in the schedule.
_id | The unique identifier of the schedule value. |
_hours | The hours part of the time when the switch point will trigger. The time is set using the 24-hour clock, so this value must be between 0 and 23. |
_minutes | The minutes part of the time when the switch point will trigger. This value must be between 0 and 59. |
_setback | The setback in tenths of a degree Celsius. The setback value can range from -128 (-12.8C) to 120 (12.0C). There are two special setback values - 121 is used to set Frost Protection mode, and 122 is used to set Energy Saving mode. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::SetValue | ( | ValueID const & | _id, |
bool const | _value | ||
) |
Sets the state of a bool. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_id | The unique identifier of the bool value. |
_value | The new value of the bool. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Sets the value of a byte. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_id | The unique identifier of the byte value. |
_value | The new value of the byte. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::SetValue | ( | ValueID const & | _id, |
float const | _value | ||
) |
Sets the value of a decimal. It is usually better to handle decimal values using strings rather than floats, to avoid floating point accuracy issues. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_id | The unique identifier of the decimal value. |
_value | The new value of the decimal. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Sets the value of a 32-bit signed integer. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_id | The unique identifier of the integer value. |
_value | The new value of the integer. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Sets the value of a 16-bit signed integer. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_id | The unique identifier of the integer value. |
_value | The new value of the integer. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
Sets the value of a collection of bytes. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_id | The unique identifier of the raw value. |
_value | The new collection of bytes. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::SetValue | ( | ValueID const & | _id, |
string const & | _value | ||
) |
Sets the value from a string, regardless of type. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_id | The unique identifier of the integer value. |
_value | The new value of the string. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
void Manager::SetValueHelp | ( | ValueID const & | _id, |
string const & | _value | ||
) |
Sets a help string describing the value's purpose and usage.
_id | The unique identifier of the value. |
_value | The new value of the help text. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
void Manager::SetValueLabel | ( | ValueID const & | _id, |
string const & | _value | ||
) |
Sets the user-friendly label for the value.
_id | The unique identifier of the value. |
_value | The new value of the label. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
bool Manager::SetValueListSelection | ( | ValueID const & | _id, |
string const & | _selectedItem | ||
) |
Sets the selected item in a list. Due to the possibility of a device being asleep, the command is assumed to succeed, and the value held by the node is updated directly. This will be reverted by a future status message from the device if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
_id | The unique identifier of the list value. |
_selectedItem | A string matching the new selected item in the list. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
void Manager::SetValueUnits | ( | ValueID const & | _id, |
string const & | _value | ||
) |
Sets the units that the value is measured in.
_id | The unique identifier of the value. |
_value | The new value of the units. |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid |
OZWException | with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found |
void Manager::SoftReset | ( | uint32 const | _homeId | ) |
Soft Reset a PC Z-Wave Controller. Resets a controller without erasing its network configuration settings.
_homeId | The Home ID of the Z-Wave controller to be reset. |
void Manager::SwitchAllOff | ( | uint32 const | _homeId | ) |
Switch all devices off. All devices that support the SwitchAll command class will be turned off.
void Manager::SwitchAllOn | ( | uint32 const | _homeId | ) |
Switch all devices on. All devices that support the SwitchAll command class will be turned on.
Test network. Sends a series of messages to every node on the network for testing network reliability.
_homeId | The Home ID of the Z-Wave controller to be reset. |
_count | This is the number of test messages to send. |
Test network node. Sends a series of messages to a network node for testing network reliability.
_homeId | The Home ID of the Z-Wave controller to be reset. |
_count | This is the number of test messages to send. |
bool Manager::TransferPrimaryRole | ( | uint32 const | _homeId | ) |
Add a new controller to the network and make it the primary. The existing primary will become a secondary controller.
Results of the TransferPrimaryRole Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
_homeId | The HomeID of the Z-Wave network |
void Manager::WriteConfig | ( | uint32 const | _homeId | ) |
Saves the configuration of a PC Controller's Z-Wave network to the application's user data folder. This method does not normally need to be called, since OpenZWave will save the state automatically during the shutdown process. It is provided here only as an aid to development. The configuration of each PC Controller's Z-Wave network is stored in a separate file. The filename consists of the 8 digit hexadecimal version of the controller's Home ID, prefixed with the string 'zwcfg_'. This convention allows OpenZWave to find the correct configuration file for a controller, even if it is attached to a different serial port, USB device path, etc.
_homeId | The Home ID of the Z-Wave controller to save. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |