libopenzwave module

This file is part of python-openzwave project https://github.com/OpenZWave/python-openzwave.

platform:Unix, Windows, MacOS X
sinopsis:openzwave C++

License : GPL(v3)

python-openzwave is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

python-openzwave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with python-openzwave. If not, see http://www.gnu.org/licenses.

class libopenzwave.EnumWithDoc

Bases: str

Enum helper

setDoc
class libopenzwave.EnumWithDocType

Bases: str

Enum helper

setDocType
class libopenzwave.InstanceAssociationAlloc

Bases: object

Map an array of InstanceAssociation_t used when retrieving sets of associationInstances. Allocate memory at init and free it when no more reference to it exist. Give it to lion as Nico0084 says : http://blog.naviso.fr/wordpress/wp-sphinxdoc/uploads/2011/11/MemoryLeaks3.jpg

exception libopenzwave.LibZWaveException

Bases: Exception

Exception class for LibOpenZWave

class libopenzwave.PyManager

Bases: object

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 setening or sleeping) have been polled, an “AllNodesQueried” notification is sent.

CALLBACK_DESC = ('value added', 'value removed', 'value changed', 'groups changed', 'new node', 'node added', 'node removed', 'node protocol info', 'node naming', 'node event', 'polling disabled', 'polling enabled', 'driver ready', 'driver reset', 'message complete', 'node queries complete', 'awake nodes queried', 'all nodes queried')
COMMAND_CLASS_DESC = {0: 'COMMAND_CLASS_NO_OPERATION', 32: 'COMMAND_CLASS_BASIC', 33: 'COMMAND_CLASS_CONTROLLER_REPLICATION', 34: 'COMMAND_CLASS_APPLICATION_STATUS', 35: 'COMMAND_CLASS_ZIP_SERVICES', 36: 'COMMAND_CLASS_ZIP_SERVER', 37: 'COMMAND_CLASS_SWITCH_BINARY', 38: 'COMMAND_CLASS_SWITCH_MULTILEVEL', 39: 'COMMAND_CLASS_SWITCH_ALL', 40: 'COMMAND_CLASS_SWITCH_TOGGLE_BINARY', 41: 'COMMAND_CLASS_SWITCH_TOGGLE_MULTILEVEL', 42: 'COMMAND_CLASS_CHIMNEY_FAN', 43: 'COMMAND_CLASS_SCENE_ACTIVATION', 44: 'COMMAND_CLASS_SCENE_ACTUATOR_CONF', 45: 'COMMAND_CLASS_SCENE_CONTROLLER_CONF', 46: 'COMMAND_CLASS_ZIP_CLIENT', 47: 'COMMAND_CLASS_ZIP_ADV_SERVICES', 48: 'COMMAND_CLASS_SENSOR_BINARY', 49: 'COMMAND_CLASS_SENSOR_MULTILEVEL', 50: 'COMMAND_CLASS_METER', 51: 'COMMAND_CLASS_COLOR', 52: 'COMMAND_CLASS_ZIP_ADV_CLIENT', 53: 'COMMAND_CLASS_METER_PULSE', 56: 'COMMAND_CLASS_THERMOSTAT_HEATING', 60: 'COMMAND_CLASS_METER_TBL_CONFIG', 61: 'COMMAND_CLASS_METER_TBL_MONITOR', 62: 'COMMAND_CLASS_METER_TBL_PUSH', 64: 'COMMAND_CLASS_THERMOSTAT_MODE', 66: 'COMMAND_CLASS_THERMOSTAT_OPERATING_STATE', 67: 'COMMAND_CLASS_THERMOSTAT_SETPOINT', 68: 'COMMAND_CLASS_THERMOSTAT_FAN_MODE', 69: 'COMMAND_CLASS_THERMOSTAT_FAN_STATE', 70: 'COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE', 71: 'COMMAND_CLASS_THERMOSTAT_SETBACK', 76: 'COMMAND_CLASS_DOOR_LOCK_LOGGING', 78: 'COMMAND_CLASS_SCHEDULE_ENTRY_LOCK', 80: 'COMMAND_CLASS_BASIC_WINDOW_COVERING', 81: 'COMMAND_CLASS_MTP_WINDOW_COVERING', 86: 'COMMAND_CLASS_CRC_16_ENCAP', 90: 'COMMAND_CLASS_DEVICE_RESET_LOCALLY', 91: 'COMMAND_CLASS_CENTRAL_SCENE', 94: 'COMMAND_CLASS_ZWAVEPLUS_INFO', 96: 'COMMAND_CLASS_MULTI_INSTANCE/CHANNEL', 97: 'COMMAND_CLASS_DISPLAY', 98: 'COMMAND_CLASS_DOOR_LOCK', 99: 'COMMAND_CLASS_USER_CODE', 100: 'COMMAND_CLASS_GARAGE_DOOR', 102: 'COMMAND_CLASS_BARRIER_OPERATOR', 112: 'COMMAND_CLASS_CONFIGURATION', 113: 'COMMAND_CLASS_ALARM', 114: 'COMMAND_CLASS_MANUFACTURER_SPECIFIC', 115: 'COMMAND_CLASS_POWERLEVEL', 117: 'COMMAND_CLASS_PROTECTION', 118: 'COMMAND_CLASS_LOCK', 119: 'COMMAND_CLASS_NODE_NAMING', 120: 'COMMAND_CLASS_ACTUATOR_MULTILEVEL', 121: 'COMMAND_CLASS_KICK', 122: 'COMMAND_CLASS_FIRMWARE_UPDATE_MD', 123: 'COMMAND_CLASS_GROUPING_NAME', 124: 'COMMAND_CLASS_REMOTE_ASSOCIATION_ACTIVATE', 125: 'COMMAND_CLASS_REMOTE_ASSOCIATION', 128: 'COMMAND_CLASS_BATTERY', 129: 'COMMAND_CLASS_CLOCK', 130: 'COMMAND_CLASS_HAIL', 131: 'COMMAND_CLASS_NETWORK_STAT', 132: 'COMMAND_CLASS_WAKE_UP', 133: 'COMMAND_CLASS_ASSOCIATION', 134: 'COMMAND_CLASS_VERSION', 135: 'COMMAND_CLASS_INDICATOR', 136: 'COMMAND_CLASS_PROPRIETARY', 137: 'COMMAND_CLASS_LANGUAGE', 138: 'COMMAND_CLASS_TIME', 139: 'COMMAND_CLASS_TIME_PARAMETERS', 140: 'COMMAND_CLASS_GEOGRAPHIC_LOCATION', 141: 'COMMAND_CLASS_COMPOSITE', 142: 'COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION', 143: 'COMMAND_CLASS_MULTI_CMD', 144: 'COMMAND_CLASS_ENERGY_PRODUCTION', 145: 'COMMAND_CLASS_MANUFACTURER_PROPRIETARY', 146: 'COMMAND_CLASS_SCREEN_MD', 147: 'COMMAND_CLASS_SCREEN_ATTRIBUTES', 148: 'COMMAND_CLASS_SIMPLE_AV_CONTROL', 149: 'COMMAND_CLASS_AV_CONTENT_DIRECTORY_MD', 150: 'COMMAND_CLASS_AV_RENDERER_STATUS', 151: 'COMMAND_CLASS_AV_CONTENT_SEARCH_MD', 152: 'COMMAND_CLASS_SECURITY', 153: 'COMMAND_CLASS_AV_TAGGING_MD', 154: 'COMMAND_CLASS_IP_CONFIGURATION', 155: 'COMMAND_CLASS_ASSOCIATION_COMMAND_CONFIGURATION', 156: 'COMMAND_CLASS_SENSOR_ALARM', 157: 'COMMAND_CLASS_SILENCE_ALARM', 158: 'COMMAND_CLASS_SENSOR_CONFIGURATION', 239: 'COMMAND_CLASS_MARK', 240: 'COMMAND_CLASS_NON_INTEROPERABLE'}
activateScene()

Activate given scene to perform all its actions.

Parameters:sceneId (int) – The ID of the scene to activate.
Returns:True if it is successful.
Return type:bool
See:getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues
addAssociation()

Adds a node to an association group.

Due to the possibility of a device being asleep, the command is assumed to suceeed, 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node whose associations are to be changed.
  • groupIdx (int) – One-based index of the group (because Z-Wave product manuals use one-based group numbering).
  • targetNodeId (int) – Identifier for the node that will be added to the association group.
  • instance (int) – Identifier for the instance that will be added to the association group.
See:

getNumGroups, getAssociations, getMaxAssociations, removeAssociation

addDriver()

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 set 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.

Parameters:serialport (str) – The string used to open the controller. On Windows this might be something like “.COM3”, or on Linux “/dev/ttyUSB0”.
Returns:True if a new driver was created
Return type:bool
See:removeDriver
addNode()

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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • doSecurity (bool) – Whether to initialize the Network Key on the device if it supports the Security CC
Returns:

True if the request was sent successfully.

Return type:

bool

addSceneValue()

Add a ValueID of value to an existing scene.

Actually I don’t know how to use it :)

Parameters:
  • sceneid (int) – The ID of a scene.
  • id (int) – The ID of a value.
  • value (bool, int, float, string) – The value to set
Returns:

An integer representing the result of the operation 0 : The C method fails 1 : The C method succeed 2 : Can’t find id in the map

Return type:

int

See:

getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, setSceneValue, sceneGetValues

addWatcher()

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.

Parameters:pythonfunc (callback) – Watcher pointer to a function that will be called by the notification system.
See:removeWatcher
assignReturnRoute()

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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

beginControllerCommand()

Start a controller command process.

Commands :

  • Driver::ControllerCommand_AddDevice - Add a new device or controller to the Z-Wave network.
  • Driver::ControllerCommand_CreateNewPrimary - Create a new primary controller when old primary fails. Requires SUC.
  • Driver::ControllerCommand_ReceiveConfiguration - Receive network configuration information from primary controller. Requires secondary.
  • Driver::ControllerCommand_RemoveDevice - Remove a device or controller from the Z-Wave network.
  • Driver::ControllerCommand_RemoveFailedNode - Remove a node from the network. The node must not be responding and be on the controller’s failed node list.
  • Driver::ControllerCommand_HasNodeFailed - Check whether a node is in the controller’s failed nodes list.
  • Driver::ControllerCommand_ReplaceFailedNode - 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.
  • Driver:: ControllerCommand_TransferPrimaryRole - Add a new controller to the network and make it the primary. The existing primary will become a secondary controller.
  • Driver::ControllerCommand_RequestNetworkUpdate - Update the controller with network information from the SUC/SIS.
  • Driver::ControllerCommand_RequestNodeNeighborUpdate - Get a node to rebuild its neighbour list. This method also does RequestNodeNeighbors afterwards.
  • Driver::ControllerCommand_AssignReturnRoute - Assign a network return route to a device.
  • Driver::ControllerCommand_DeleteAllReturnRoutes - Delete all network return routes from a device.
  • Driver::ControllerCommand_SendNodeInformation - Send a node information frame.
  • Driver::ControllerCommand_ReplicationSend - Send information from primary to secondary
  • Driver::ControllerCommand_CreateButton - Create a handheld button id.
  • Driver::ControllerCommand_DeleteButton - Delete a handheld button id.

Callbacks :

  • Driver::ControllerState_Waiting, the controller is waiting for a user action. A notice should be displayed to the user at this point, telling them what to do next. For the add, remove, replace and transfer primary role commands, the user needs to be told to press the inclusion button on the device that is going to be added or removed. For ControllerCommand_ReceiveConfiguration, they must set their other controller to send its data, and for ControllerCommand_CreateNewPrimary, set the other controller to learn new data.
  • Driver::ControllerState_InProgress - the controller is in the process of adding or removing the chosen node. It is now too late to cancel the command.
  • Driver::ControllerState_Complete - the controller has finished adding or removing the node, and the command is complete.
  • Driver::ControllerState_Failed - will be sent if the command fails for any reason.
Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller.
  • command (ControllerCommand) – The command to be sent to the controller.
  • callback (pfnControllerCallback_t) – 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.
  • context – Pointer to user defined data that will be passed into to the callback function. Defaults to NULL.
  • highPower (bool) – 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 (int) – Used only with the ReplaceFailedNode command, to specify the node that is going to be replaced.
  • arg (int) –
Returns:

True if the command was accepted and has started.

Return type:

bool

See:

cancelControllerCommand

cancelControllerCommand()

Cancels any in-progress command running on a controller.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:True if a command was running and was cancelled.
Return type:bool
See:beginControllerCommand
clearSwitchPoints()

Clears all switch points from the schedule

Parameters:id (int) – The unique identifier of the schedule value.
Returns:True if all switch points are clear.
Return type:bool
See:setSwitchPoint, removeSwitchPoint, getSwitchPoint, getNumSwitchPoints
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.

See:destroy
createButton()

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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
  • buttonid (int) – the ID of the Button to query.
Returns:

True if the request was sent successfully.

Return type:

bool

createNewPrimary()

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

Parameters:homeId (int) – The Home ID of the Z-Wave controller that manages the node.
Returns:True if the request was sent successfully.
Return type:bool
createScene()

Create a Scene.

Returns:Scene ID used to reference the scene. 0 is failure result.
Return type:id
See:getNumScenes, getAllScenes, sceneExists, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues, removeAllScenes
deleteAllReturnRoutes()

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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

deleteButton()

Delete 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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

destroy()

Deletes the Manager and cleans up any associated objects.

See:create
disablePoll()

Disable polling of a value.

Parameters:id (int) – The ID of the value to disable polling.
Returns:True if polling was disabled.
Return type:bool
See:getPollInterval, setPollInterval, enablePoll, isPolled, setPollIntensity, getPollIntensity
enablePoll()

Enable the polling of a device’s state.

Parameters:
  • id (int) – The ID of the value to start polling
  • intensity (int) – The intensity of the poll
Returns:

True if polling was enabled.

Return type:

bool

See:

getPollInterval, setPollInterval, isPolled, setPollIntensity, disablePoll, getPollIntensity

getAllScenes()

Gets a set of all the SceneIds

Returns:A set() containing neighboring scene IDs
Return type:set()
See:getNumScenes, sceneExists, createScene, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues, removeAllScenes
getAssociations()

Gets the associations for a group

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node whose associations we are interested in.
  • groupIdx (int) – one-based index of the group (because Z-Wave product manuals use one-based group numbering).
Returns:

A set containing IDs of members of the group

Return type:

set()

See:

getNumGroups, addAssociation, removeAssociation, getMaxAssociations

getAssociationsInstances()

Gets the associationsInstances for a group

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node whose associations we are interested in.
  • groupIdx (int) – one-based index of the group (because Z-Wave product manuals use one-based group numbering).
Returns:

A set containing tuples containing the node_id and the instance

Return type:

set((node_id,instance))

See:

getNumGroups, addAssociation, removeAssociation, getMaxAssociations

getChangeVerified()

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.

Parameters:id (int) – The unique identifier of the value whose changes should or should not be verified.
Returns:True if is verified.
Return type:bool
getControllerInterfaceType()

.._getControllerInterfaceType: Retrieve controller interface type, Unknown, Serial, Hid

Parameters:homeId – The Home ID of the Z-Wave controller.
Returns:The controller interface type
Return type:str
getControllerNodeId()

Get the node ID of the Z-Wave controller.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:The node ID of the Z-Wave controller
Return type:int
getControllerPath()

.._getControllerPath: Retrieve controller interface path, name or path used to open the controller hardware

Parameters:homeId – The Home ID of the Z-Wave controller.
Returns:The controller interface type
Return type:str
getDriverStatistics()

Retrieve statistics from driver.

Statistics:

  • SOFCnt : Number of SOF bytes received
  • ACKWaiting : Number of unsolicited messages while waiting for an ACK
  • readAborts : Number of times read were aborted due to timeouts
  • badChecksum : Number of bad checksums
  • readCnt : Number of messages successfully read
  • writeCnt : Number of messages successfully sent
  • CANCnt : Number of CAN bytes received
  • NAKCnt : Number of NAK bytes received
  • ACKCnt : Number of ACK bytes received
  • OOFCnt : Number of bytes out of framing
  • dropped : Number of messages dropped & not delivered
  • retries : Number of messages retransmitted
  • callbacks : Number of unexpected callbacks
  • badroutes : Number of failed messages due to bad route response
  • noack : Number of no ACK returned errors
  • netbusy : Number of network busy/failure messages
  • nondelivery : Number of messages not delivered to network
  • routedbusy : Number of messages received with routed busy status
  • broadcastReadCnt : Number of broadcasts read
  • broadcastWriteCnt : Number of broadcasts sent
Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller.
  • data (int) – Pointer to structure DriverData to return values
Returns:

A dict containing statistics of the driver.

Return type:

dict()

See:

getNodeStatistics

getGroupLabel()

Returns a label for the particular group of a node.

This label is populated by the device specific configuration files.

Parameters:
  • homeid (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeid (int) – The ID of the node whose associations are to be changed.
  • groupidx (int) – One-based index of the group (because Z-Wave product manuals use one-based group numbering).
Returns:

The label for the particular group of a node.

Return type:

str

See:

getNumGroups, getAssociations, getMaxAssociations, addAssociation

getLibraryTypeName()

Get a string containing the Z-Wave API library type used by a controller.

The possible library types are:

  • Static Controller
  • Controller
  • Enhanced Slave
  • Slave
  • Installer
  • Routing Slave
  • Bridge Controller
  • Device Under Test

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.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:A string containing the library type.
Return type:str
See:getLibraryVersion, getPythonLibraryVersion, getOzwLibraryVersion
getLibraryVersion()

Get the version of the Z-Wave API library used by a controller.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:A string containing the library version. For example, “Z-Wave 2.48”.
Return type:str
See:getPythonLibraryVersion, getLibraryTypeName, getOzwLibraryVersion
getMaxAssociations()

Gets the maximum number of associations for a group.

Parameters:
  • homeid (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeid (int) – The ID of the node whose associations we are interested in.
  • groupidx (int) – One-based index of the group (because Z-Wave product manuals use one-based group numbering).
Returns:

The maximum number of nodes that can be associated into the group.

Return type:

int

See:

getNumGroups, addAssociation, removeAssociation, getAssociations

getNodeBasic()

Get the basic type of a node.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

The node basic type.

Return type:

int

See:

getNodeType, getNodeSpecific, getNodeGeneric, getNodeSecurity

getNodeClassInformation()

Helper method to return whether a particular class is available in a node

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
  • commandClassId (int) – control class to query
  • className (str) – (optional, default=None) specific name of class to query
  • classVersion (int) – (optional, default=None) specific class version
Returns:

True if the node does have the class instantiated, will return name & version

Return type:

bool

getNodeDeviceType()

Get the node DeviceType as reported in the Z-Wave+ Info report.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

The node version number

Return type:

int

getNodeDeviceTypeString()

Get the node DeviceType (string) as reported in the Z-Wave+ Info report.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

name of current query stage as a string.

Return type:

str

getNodeGeneric()

Get the generic type of a node.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

The node generic type.

Return type:

int

See:

getNodeType, getNodeSpecific, getNodeBasic, getNodeSecurity

getNodeLocation()

Get the location of a node

The node location is a user-editable string that would normally be handled by the Node Naming commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

str – A string containing the nodes location.

See:

setNodeLocation, getNodeName, setNodeName

getNodeManufacturerId()

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 commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

A string containing the nodes manufacturer ID, or an empty string if the manufactuer-specific command class is not supported by the device.

Return type:

str

See:

getNodeProductType, getNodeProductId, getNodeManufacturerName, setNodeManufacturerName, getNodeProductName, setNodeProductName

getNodeManufacturerName()

Get the manufacturer name of a device

The manufacturer name would normally be handled by the Manufacturer Specific commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

A string containing the nodes manufacturer name.

Return type:

str

See:

setNodeManufacturerName, getNodeProductName, setNodeProductName, getNodeManufacturerId, getNodeProductId, getNodeProductType

getNodeMaxBaudRate()

Get the maximum baud rate of a nodes communications

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

The baud rate in bits per second.

Return type:

int

getNodeName()

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 commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

str – A string containing the node name.

See:

setNodeName, getNodeLocation, setNodeLocation

getNodeNeighbors()

Get the bitmap of this node’s neighbors.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

A set containing neighboring node IDs

Return type:

set()

getNodePlusType()

Get the node plus type as reported in the Z-Wave+ Info report.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

The node version number

Return type:

int

getNodePlusTypeString()

Get the node plus type (string) as reported in the Z-Wave+ Info report.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

name of current query stage as a string.

Return type:

str

getNodeProductId()

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 commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

A string containing the nodes product ID, or an empty string if the manufactuer-specific command class is not supported by the device.

Return type:

str

See:

getNodeManufacturerId, getNodeProductType, getNodeManufacturerName, setNodeManufacturerName, getNodeProductName, setNodeProductName

getNodeProductName()

Get the product name of a device

The product name would normally be handled by the Manufacturer Specific commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

str – A string containing the nodes product name.

See:

setNodeProductName, getNodeManufacturerName, setNodeManufacturerName, getNodeManufacturerId, getNodeProductId, getNodeProductType

getNodeProductType()

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 commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

A string containing the nodes product type, or an empty string if the manufactuer-specific command class is not supported by the device.

Return type:

str

See:

getNodeManufacturerId, getNodeProductId, getNodeManufacturerName, setNodeManufacturerName, getNodeProductName, setNodeProductName

getNodeQueryStage()
Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

name of current query stage as a string.

Return type:

str

getNodeQueryStageCode()
Parameters:queryStage (str) – The query stage description.
Returns:code value.
Return type:int
getNodeRole()

Get the node role as reported in the Z-Wave+ Info report.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

The node version number

Return type:

int

getNodeRoleString()

Get the node role (string) as reported in the Z-Wave+ Info report.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

name of current query stage as a string.

Return type:

str

getNodeSecurity()

Get the security byte for a node. Bit meanings are still to be determined.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

The node security byte

Return type:

int

See:

getNodeType, getNodeSpecific, getNodeGeneric, getNodeBasic

getNodeSpecific()

Get the specific type of a node.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId – The ID of the node to query.
Returns:

int – The node specific type.

See:

getNodeType, getNodeGeneric, getNodeBasic, getNodeSecurity

getNodeStatistics()

Retrieve statistics per node

Statistics:

cdef struct NodeData:
  • sentCnt # Number of messages sent from this node.
  • sentFailed # Number of sent messages failed
  • retries # Number of message retries
  • receivedCnt # Number of messages received from this node.
  • receivedDups # Number of duplicated messages received;
  • receivedUnsolicited # Number of messages received unsolicited
  • sentTS # Last message sent time
  • receivedTS # Last message received time
  • lastRequestRTT # Last message request RTT
  • averageRequestRTT # Average Request Round Trip Time (ms).
  • lastResponseRTT # Last message response RTT
  • averageResponseRTT #Average Reponse round trip time.
  • quality # Node quality measure
  • lastReceivedMessage[254] # Place to hold last received message
Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller.
  • nodeId (int) – The ID of the node to query.
  • data (int) – Pointer to structure NodeData to return values
Returns:

A dict containing statistics of the node.

Return type:

dict()

See:

getDriverStatistics

getNodeType()

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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

A string containing the label text.

Return type:

str

See:

getNodeSpecific, getNodeGeneric, getNodeBasic, getNodeSecurity

getNodeVersion()

Get the version number of a node

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

The node version number

Return type:

int

getNumGroups()

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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node whose groups we are interested in.
Returns:

The number of groups.

Return type:

int

See:

getAssociations, getMaxAssociations, addAssociation, removeAssociation

getNumScenes()

Gets the number of scenes that have been defined

Returns:The number of scenes.
Return type:int
See:getAllScenes, sceneExists, createScene, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues, removeAllScenes
getNumSwitchPoints()

Get the number of switch points defined in a schedule

Parameters:id (int) – The unique identifier of the schedule value.
Returns:The number of switch points defined in this schedule. Returns zero if the value is not a ValueID::ValueType_Schedule. The type can be tested with a call to ValueID::GetType.
Return type:int
See:setSwitchPoint, removeSwitchPoint, clearSwitchPoints, getSwitchPoint
getOzwLibraryLongVersion()

Get a string containing the openzwave library version.

Returns:A string containing the library type.
Return type:str
See:getLibraryVersion, getPythonLibraryVersion, getLibraryTypeName, getOzwLibraryVersion
getOzwLibraryVersion()

Get a string containing the openzwave library version.

Returns:A string containing the library type.
Return type:str
See:getLibraryVersion, getPythonLibraryVersion, getLibraryTypeName, getOzwLibraryLongVersion
getOzwLibraryVersionNumber()

_getOzwLibraryVersionNumber: Get the openzwave library version number.

Returns:A string containing the library type.
Return type:str
See:getLibraryVersion, getPythonLibraryVersion, getLibraryTypeName
getPollIntensity()

Get the intensity with which this value is polled (0=none, 1=every time through the list, 2-every other time, etc). :param id: The ID of a value. :type id: int :return: A integer containing the poll intensity :rtype: int :see: getPollInterval, setPollInterval, enablePoll, setPollIntensity, disablePoll, isPolled

getPollInterval()

Get the time period between polls of a nodes state

Returns:The number of milliseconds between polls
Return type:int
See:setPollInterval, enablePoll, isPolled, setPollIntensity, disablePoll, getPollIntensity
getPythonLibraryFlavor()

Get the flavor of the python library.

Returns:A string containing the python library flavor. For example, “embed”.
Return type:str
See:getLibraryTypeName, getLibraryVersion, getOzwLibraryVersion, getOzwLibraryLongVersion
getPythonLibraryVersion()

Get the version of the python library.

Returns:A string containing the python library version. For example, “python-openzwave version 0.1”.
Return type:str
See:getLibraryTypeName, getLibraryVersion, getOzwLibraryVersion, getOzwLibraryLongVersion
getPythonLibraryVersionNumber()

Get the python library version number

Returns:A string containing the python library version. For example, “0.1”.
Return type:str
See:getLibraryTypeName, getLibraryVersion, getOzwLibraryVersion, getOzwLibraryLongVersion
getSUCNodeId()

Get the node ID of the Static Update Controller.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:the node ID of the Z-Wave controller.
Return type:int
getSceneLabel()

Returns a label for the particular scene.

Parameters:
  • sceneId (int) – The ID of a scene.
  • value (int) – The value to set
Returns:

The label string.

Return type:

str

See:

getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, activateScene, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues

getSendQueueCount()

Get count of messages in the outgoing send queue.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:Message count
Return type:int
getSwitchPoint()

Gets switch point data from the schedule

Parameters:
  • id (int) – The unique identifier of the schedule value.
  • idx (int) – The index of the switch point, between zero and one less than the value returned by GetNumSwitchPoints.
  • hours (int) – An integer that will be filled with the hours part of the switch point data.
  • minutes (int) – An integer that will be filled with the minutes part of the switch point data.
  • setback (int) – An integer 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.
Returns:

True if successful. Returns False if the value is not a ValueID::ValueType_Schedule. The type can be tested with a call to ValueID::GetType.

Return type:

bool

See:

setSwitchPoint, removeSwitchPoint, clearSwitchPoints, getNumSwitchPoints

getValue()

Gets a value.

Parameters:
  • id (int) – The ID of a value.
  • value (int) – The value to set.
Returns:

Depending of the type of the valueId, None otherwise

Return type:

variable

See:

isValueSet, getValueAsBool, getValueAsByte, getValueListItems, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueAsString, getValueType, getValueInstance, getValueIndex, getValueCommandClass

getValueAsBool()

Gets a value as a bool.

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:bool
See:isValueSet, getValue, getValueAsByte, getValueListItems, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueAsString, getValueType, getValueInstance, getValueIndex, getValueCommandClass
getValueAsByte()

Gets a value as an 8-bit unsigned integer.

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:int
See:isValueSet, getValue, getValueAsBool, getValueListItems, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueAsString, getValueType, getValueInstance, getValueIndex, getValueCommandClass
getValueAsFloat()

Gets a value as a float.

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:float
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionStr , getValueListSelectionNum, getValueAsShort, getValueAsInt, getValueAsString, getValueListItems, getValueType, getValueInstance, getValueIndex
getValueAsInt()

Gets a value as a 32-bit signed integer.

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:int
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsString, getValueListItems, getValueType, getValueInstance, getValueIndex
getValueAsRaw()

Gets a value as raw.

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:str
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueListItems, getValueType, getValueInstance, getValueIndex
getValueAsShort()

Gets a value as a 16-bit signed integer.

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:int
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsInt, getValueAsString, getValueListItems, getValueType, getValueInstance, getValueIndex
getValueAsString()

Gets a value as a string.

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:str
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueListItems, getValueType, getValueInstance, getValueIndex
getValueCommandClass()

Get the command class instance of this value. It is possible for there to be multiple instances of a command class, although currently it appears that only the SensorMultilevel command class ever does this. Knowledge of instances and command classes is not required to use OpenZWave, but this information is exposed in case it is of interest.

Parameters:id (int) – The ID of a value.
Returns:The command class of the value
Return type:int
See:isValueSet, getValueAsBool, getValueAsByte, getValueListItems, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueGenre, getValueAsString, getValue, getValueType, getValueInstance, getValueIndex
getValueFloatPrecision()
Parameters:id (int) – The unique identifier of the value.
Returns:a float value’s precision.
Return type:int
getValueGenre()

Get the genre of the value. The genre classifies a value to enable low-level system or configuration parameters to be filtered out by the application

Parameters:id (int) – The ID of a value.
Returns:A string containing the type of the value
Return type:str
See:isValueSet, getValueAsBool, getValueAsByte, getValueListItems, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueCommandClass,getValueAsString_, getValue, getValueType, getValueInstance, getValueIndex
getValueHelp()

Gets a help string describing the value’s purpose and usage.

Parameters:id (int) – The ID of a value.
Returns:A string containing the value help text.
Return type:str
See:setValueHelp
getValueIndex()

Get the value index. The index is used to identify one of multiple values created and managed by a command class. In the case of configurable parameters (handled by the configuration command class), the index is the same as the parameter ID.

Parameters:id (int) – The ID of a value.
Returns:A string containing the type of the value
Return type:str
See:isValueSet, getValueAsBool, getValueAsByte, getValueListItems, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueCommandClass, getValueAsString, getValue, getValueType
getValueInstance()

Get the command class instance of this value. It is possible for there to be multiple instances of a command class, although currently it appears that only the SensorMultilevel command class ever does this.

Parameters:id (int) – The ID of a value.
Returns:A string containing the type of the value
Return type:str
See:isValueSet, getValueAsBool, getValueAsByte, getValueListItems, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueCommandClass, getValueAsString, getValue, getValueType, getValueIndex
getValueLabel()

Gets the user-friendly label for the value

Parameters:id (int) – The ID of a value.
Returns:A string containing the user-friendly label of the value
Return type:str
See:setValueLabel
getValueListItems()

Gets the list of items from a list value

Parameters:id (int) – The ID of a value.
Returns:The list of possible values
Return type:set()
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionStr , getValueListSelectionNum getValueAsFloat, getValueAsShort, getValueAsInt, getValueAsString, getValueType, getValueInstance, getValueIndex
getValueListSelectionNum()

Gets value of items from a list value

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:int
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionStr, getValueListItems,getValueAsFloat_, getValueAsShort, getValueAsInt, getValueAsString, getValueType, getValueInstance, getValueIndex
getValueListSelectionStr()

Gets value of items from a list value

Parameters:id (int) – The ID of a value.
Returns:The value
Return type:str
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionNum, getValueListItems,getValueAsFloat_, getValueAsShort, getValueAsInt, getValueAsString, getValueType, getValueInstance, getValueIndex
getValueListValues()

Gets the list of values from a list value.

Parameters:id (int) – The ID of a value.
Returns:The list of values
Return type:set()
See:isValueSet, getValue, getValueAsBool, getValueAsByte, getValueListSelectionStr , getValueListSelectionNum getValueAsFloat, getValueAsShort, getValueAsInt, getValueAsString, getValueType, getValueInstance, getValueIndex
getValueMax()

Gets the maximum that this value may contain.

Parameters:id (int) – The ID of a value.
Returns:The value maximum.
Return type:int
See:getValueMin
getValueMin()

Gets the minimum that this value may contain.

Parameters:id (int) – The ID of a value.
Returns:The value minimum.
Return type:int
See:getValueMax
getValueType()

Gets the type of the value

Parameters:id (int) – The ID of a value.
Returns:A string containing the type of the value
Return type:str
See:isValueSet, getValueAsBool, getValueAsByte, getValueListItems, getValueListSelectionStr , getValueListSelectionNum, getValueAsFloat, getValueAsShort, getValueAsInt, getValueAsString, getValue, getValueInstance, getValueIndex, getValueCommandClass
getValueUnits()

Gets the units that the value is measured in.

Parameters:id (int) – The ID of a value.
Returns:A string containing the value of the units.
Return type:str
See:setValueUnits
hasNodeFailed()

Ask a Node to update its Neighbor Tables

This command will ask a Node to update its Neighbor Tables.

Results of the HasNodeFailed Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

healNetwork()

Heal network by requesting nodes rediscover their neighbors. Sends a ControllerCommand_RequestNodeNeighborUpdate to every node. Can take a while on larger networks.

Parameters:
  • homeid (int) – The Home ID of the Z-Wave controller that manages the node.
  • upNodeRoute (bool) – Optional Whether to perform return routes initialization. (default = false).
See:

healNetworkNode

healNetworkNode()

Heal network node by requesting the node rediscover their neighbors. Sends a ControllerCommand_RequestNodeNeighborUpdate to the node.

Parameters:
  • homeid (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeid (int) – The ID of the node to query.
  • upNodeRoute (bool) – Optional Whether to perform return routes initialization. (default = false).
See:

healNetwork

isBridgeController()

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.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:True if it is a bridge controller, False if not.
Return type:bool
See:isPrimaryController, isStaticUpdateController
isNodeAwake()
Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the node is awake.

Return type:

bool

isNodeBeamingDevice()

Get whether the node is a beam capable device.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the node is a beaming device

Return type:

bool

See:

isNodeListeningDevice, isNodeFrequentListeningDevice, isNodeSecurityDevice, isNodeRoutingDevice

isNodeFailed()

Get whether the node is working or has failed

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the node has failed and is no longer part of the network.

Return type:

bool

isNodeFrequentListeningDevice()

Get whether the node is a frequent setening device that goes to sleep but can be woken up by a beam. Useful to determine node and controller consistency.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if it is a frequent setening node.

Return type:

bool

See:

isNodeBeamingDevice, isNodeListeningDevice, isNodeSecurityDevice, isNodeRoutingDevice

isNodeInfoReceived()

Get whether the node information has been received

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

bool – True if the node information has been received yet

isNodeListeningDevice()

Get whether the node is a setening device that does not go to sleep

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if it is a setening node.

Return type:

bool

See:

isNodeBeamingDevice, isNodeFrequentListeningDevice, isNodeSecurityDevice, isNodeRoutingDevice

isNodeRoutingDevice()

Get whether the node is a routing device that passes messages to other nodes

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the node is a routing device

Return type:

bool

See:

isNodeBeamingDevice, isNodeListeningDevice, isNodeFrequentListeningDevice, isNodeSecurityDevice

isNodeSecurityDevice()

Get the security attribute for a node. True if node supports security features.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if security features implemented.

Return type:

bool

See:

isNodeBeamingDevice, isNodeListeningDevice, isNodeFrequentListeningDevice, isNodeRoutingDevice

isNodeZWavePlus()

Get whether the node is a ZWave+ one

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the node has failed and is no longer part of the network.

Return type:

bool

isPolled()

Check polling status of a value

Parameters:id (int) – The ID of the value to check polling.
Returns:True if polling is active.
Return type:bool
See:getPollInterval, setPollInterval, enablePoll, setPollIntensity, disablePoll, getPollIntensity
isPrimaryController()

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 promary 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.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:True if it is a primary controller, False if not.
Return type:bool
See:isBridgeController, isStaticUpdateController
isStaticUpdateController()

Query if the controller is a static update controller (SUC).

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.

Parameters:homeId (int) – The Home ID of the Z-Wave controller.
Returns:True if it is a static update controller, False if not.
Return type:bool
See:isBridgeController, isPrimaryController
isValuePolled()

Test whether the value is currently being polled.

Parameters:id (int) – the ID of a value.
Returns:True if the value is being polled, otherwise false.
Return type:bool
isValueReadOnly()

Test whether the value is read-only.

Parameters:id (int) – The ID of a value.
Returns:True if the value cannot be changed by the user.
Return type:bool
See:isValueWriteOnly
isValueSet()

Test whether the value has been set.

Parameters:id (int) – the ID of a value.
Returns:True if the value has actually been set by a status message from the device, rather than simply being the default.
Return type:bool
See:getValue, getValueAsBool, getValueAsByte, getValueListItems, getValueAsFloat, getValueAsShort, getValueAsInt, getValueAsString, getValueType, getValueInstance, getValueIndex
isValueWriteOnly()

Test whether the value is write-only.

Parameters:id (int) – The ID of a value.
Returns:True if the value can only be written to and not read.
Return type:bool
See:isValueReadOnly
logDriverStatistics()

Send current driver statistics to the log file.

Parameters:homeid (int) – The Home ID of the Z-Wave controller.
pressButton()

Starts an activity in a device. Since buttons are write-only values that do not report a state, no notification callbacks are sent.

Parameters:id (int) – The ID of an integer value.
Returns:True if the activity was started. Returns false if the value is not a ValueID::ValueType_Button. The type can be tested with a call to ValueID::GetType.
Return type:bool
See:releaseButton
receiveConfiguration()

Receive network configuration information from primary controller. Requires secondary.

This command prepares the controller to recieve 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

Parameters:homeId (int) – The Home ID of the Z-Wave controller that manages the node.
Returns:True if the request was sent successfully.
Return type:bool
refreshNodeInfo()

Trigger the fetching of fixed data about a node.

Causes the nodes 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 the data held by the library. This can be especially useful for devices that were asleep when the application was first run.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

refreshValue()

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).

Parameters:id (int) – The unique identifier of the value to be refreshed.
Returns:bool – True if the driver and node were found; false otherwise
releaseButton()

Stops an activity in a device. Since buttons are write-only values that do not report a state, no notification callbacks are sent.

Parameters:id (int) – the ID of an integer value.
Returns:True if the activity was stopped. Returns false if the value is not a ValueID::ValueType_Button. The type can be tested with a call to ValueID::GetType.
Return type:bool
See:pressButton
removeAllScenes()

Delete all scenes.

Parameters:homeid (int) – The Home ID of the Z-Wave controller that manages the node.
See:getNumScenes, getAllScenes, sceneExists, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues
removeAssociation()

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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node whose associations are to be changed.
  • groupIdx (int) – One-based index of the group (because Z-Wave product manuals use one-based group numbering).
  • targetNodeId (int) – Identifier for the node that will be removed from the association group.
  • instance (int) – Identifier for the instance that will be added to the association group.
See:

getNumGroups, getAssociations, getMaxAssociations, addAssociation

removeDriver()

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.

Parameters:serialport (str) – The same string as was passed in the original call toAddDriver.
Returns:True if the driver was removed, False if it could not be found.
Return type:bool
See:addDriver
removeFailedNode()

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 RemoveFailedNode Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

removeNode()

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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • doSecurity (bool) – Whether to initialize the Network Key on the device if it supports the Security CC
Returns:

True if the request was sent successfully.

Return type:

bool

removeScene()

Remove an existing Scene.

Parameters:sceneId (int) – The unique Scene ID to be removed.
Returns:True if scene was removed.
Return type:bool
See:getNumScenes, getAllScenes, sceneExists, createScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues, removeAllScenes
removeSceneValue()

Remove the Value ID from an existing scene.

Parameters:
  • sceneid (int) – The ID of a scene.
  • id (int) – The ID of a value.
Returns:

True if succee. False otherwise

Return type:

bool

See:

getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, setSceneValue, sceneGetValues

removeSwitchPoint()

Remove a switch point from the schedule

Parameters:
  • id (int) – The unique identifier of the schedule value.
  • hours (int) – 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 (int) – The minutes part of the time when the switch point will trigger. This value must be between 0 and 59.
Returns:

True if the switch point is removed.

Return type:

bool

See:

setSwitchPoint, clearSwitchPoints, getSwitchPoint, getNumSwitchPoints

removeWatcher()

Remove a notification watcher.

Parameters:pythonfunc (callback) – Watcher pointer to a function
See:addWatcher
replaceFailedNode()

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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

replicationSend()

Create a handheld button id.

Only intended for Bridge Firmware Controllers.

Results of the ReplicationSend Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
  • buttonid (int) – the ID of the Button to query.
Returns:

True if the request was sent successfully.

Return type:

bool

requestAllConfigParams()

Request the values of all known configurable parameters from a device.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to configure.
See:

requestConfigParam, setConfigParam

requestConfigParam()

Request the value of a configurable parameter from a device.

Some devices have various parameters that can be configured to control the device behaviour. These are not reported by the device over the Z-Wave network but can usually be found in the devices 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to configure.
  • param (int) – The index of the parameter.
See:

requestAllConfigParams, setConfigParam

requestNetworkUpdate()

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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

requestNodeDynamic()

Trigger the fetching of fixed data about a node.

Causes the nodes 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 the data held by the library. This can be especially useful for devices that were asleep when the application was first run.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

requestNodeNeighborUpdate()

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

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

requestNodeState()

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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

resetController()

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.

Parameters:homeId (int) – The Home ID of the Z-Wave controller to be reset.
See:softResetController
sceneExists()

Check if a Scene ID is defined.

Parameters:sceneId (int) – The ID of the scene to check.
Returns:True if Scene ID exists.
Return type:bool
See:getNumScenes, getAllScenes, removeAllScenes, createScene, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues
sceneGetValues()

Retrieve the list of values from a scene.

Parameters:id (int) – The ID of a scene.
Return type:dict()
Returns:A dict containing : {valueid : value, …}
See:getNumScenes, getAllScenes, sceneExists, createScene, removeScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues, removeAllScenes
sendNodeInformation()

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 SendNodeInformation Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
Returns:

True if the request was sent successfully.

Return type:

bool

setChangeVerified()

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.

Parameters:
  • id (int) – The unique identifier of the value whose changes should or should not be verified.
  • verify (bool) – if true, verify changes; if false, don’t verify changes
setConfigParam()

Set the value of a configurable parameter in a device.

Some devices have various parameters that can be configured to control the device behaviour. These are not reported by the device over the Z-Wave network but can usually be found in the devices user manual. This method returns immediately, without waiting for confirmation from the device that the change has been made.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to configure.
  • param (int) – The index of the parameter.
  • value (int) – The value to which the parameter should be set.
  • size (int) – Is an optional number of bytes to be sent for the parameter value. Defaults to 2.
Returns:

True if the message setting the value was sent to the device.

Return type:

bool

See:

requestConfigParam, requestAllConfigParams

setNodeLevel()

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 nodes Basic command class and will generate a ValueChanged notification from that class.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to be changed.
  • level (int) – 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).
See:

setNodeOn, setNodeOff

setNodeLocation()

Set the location of a node

The node location is a user-editable string that would normally be handled by the Node Naming commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
  • location (int) – A string containing the nodes location.
See:

getNodeLocation, getNodeName, setNodeName

setNodeManufacturerName()

Set the manufacturer name of a device

The manufacturer name would normally be handled by the Manufacturer Specific commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
  • manufacturerName (str) – A string containing the nodess manufacturer name.
See:

getNodeManufacturerName, getNodeProductName, setNodeProductName

setNodeName()

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 commmand 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.

Parameters:
  • homeI – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
  • nodeName (str) – A string containing the nodes name.
See:

getNodeName, getNodeLocation, setNodeLocation

setNodeOff()

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 nodes Basic command class to zero, and will generate a ValueChanged notification from that class.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to be changed.
See:

setNodeOn, setNodeLevel

setNodeOn()

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 nodes 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%.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to be changed.
See:

setNodeOff, setNodeLevel

setNodeProductName()

Set the product name of a device

The product name would normally be handled by the Manufacturer Specific commmand 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.

Parameters:
  • homeId (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeId (int) – The ID of the node to query.
  • productName (str) – A string containing the nodes product name.
See:

getNodeProductName, getNodeManufacturerName, setNodeManufacturerName

setPollIntensity()

Set the frequency of polling (0=none, 1=every time through the set, 2-every other time, etc)

Parameters:
  • id (int) – The ID of the value whose intensity should be set
  • intensity (int) – the intensity of the poll
See:

getPollInterval, setPollInterval, enablePoll, isPolled, disablePoll, getPollIntensity

setPollInterval()

Set the time period between polls of a nodes 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).

Parameters:
  • milliseconds (int) – The length of the polling interval in milliseconds.
  • bIntervalBetweenPolls (bool) – If set to true (via SetPollInterval), the pollInterval will be interspersed between each poll (so a much smaller m_pollInterval like 100, 500, or 1,000 may be appropriate). If false, the library attempts to complete all polls within m_pollInterval
See:

getPollInterval, enablePoll, isPolled, setPollIntensity, disablePoll, getPollIntensity

setSceneLabel()

Sets a label for the particular scene.

Parameters:
  • sceneId (int) – The ID of the scene.
  • value (int) – The new value of the label.
See:

getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, activateScene, getSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues

setSceneValue()

Set a value to an existing scene’s ValueID.

Parameters:
  • sceneid (int) – The ID of a scene.
  • id (int) – The ID of a value.
  • value (bool, int, float, string) – The value to set
Returns:

An integer representing the result of the operation 0 : The C method fails 1 : The C method succeed 2 : Can’t find id in the map

Return type:

int

See:

getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, addSceneValue, sceneGetValues

setSwitchPoint()

Set a switch point in the schedule.

Parameters:
  • id (int) – The unique identifier of the schedule value.
  • hours (int) – 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 (int) – The minutes part of the time when the switch point will trigger. This value must be between 0 and 59.
  • setback (int) – 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.
Returns:

True if the switch point is set.

Return type:

bool

See:

removeSwitchPoint, clearSwitchPoints, getSwitchPoint, getNumSwitchPoints

setValue()

Sets the value of a device valueid. Due to the possibility of a device being asleep, the command is assumed to suceeed, 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.

Parameters:
  • id (int) – The ID of a value.
  • value (int) – The value to set.
Returns:

An integer representing the result of the operation 0 : The C method fails, 1 : The C method succeed, 2 : Can’t find id in the map

Return type:

int

setValueHelp()

Sets a help string describing the value’s purpose and usage.

Parameters:
  • id (int) – the ID of a value.
  • help (str) – The new value of the help text.
See:

getValueHelp

setValueLabel()

Sets the user-friendly label for the value

Parameters:
  • id (int) – The ID of a value.
  • label (str) – The label of the value.
See:

getValueLabel

setValueUnits()

Sets the units that the value is measured in.

Parameters:
  • id (int) – The ID of a value.
  • label (str) – The new value of the units.
See:

getValueUnits

softResetController()

Soft Reset a PC Z-Wave Controller.

Resets a controller without erasing its network configuration settings.

Parameters:homeId (int) – The Home ID of the Z-Wave controller to be reset.
See:resetController
switchAllOff()

Switch all devices off. All devices that support the SwitchAll command class will be turned off.

Parameters:homeId (int) – The Home ID of the Z-Wave controller that manages the node.
See:switchAllOn
switchAllOn()

Switch all devices on. All devices that support the SwitchAll command class will be turned on.

Parameters:homeId (int) – The Home ID of the Z-Wave controller that manages the node.
See:switchAllOff
testNetwork()

Test network.

Sends a series of messages to every node on the network for testing network reliability.

Parameters:
  • homeid (int) – The Home ID of the Z-Wave controller that manages the node.
  • count (int) – This is the number of test messages to send.
See:

testNetworkNode

testNetworkNode()

Test network node.

Sends a series of messages to a network node for testing network reliability.

Parameters:
  • homeid (int) – The Home ID of the Z-Wave controller that manages the node.
  • nodeid (int) – The ID of the node to query.
  • count (int) – This is the number of test messages to send.
See:

testNetwork

transferPrimaryRole()

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

Parameters:homeId (int) – The Home ID of the Z-Wave controller that manages the node.
Returns:True if the request was sent successfully.
Return type:bool
writeConfig()

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.

Parameters:homeid (int) – The Home ID of the Z-Wave controller to save.
class libopenzwave.PyOptions

Bases: object

Manage options manager

addOption()

Add an option.

Parameters:
  • name (string) – The name of the option.
  • value (boolean, integer, string) – The value of the option.
Returns:

The result of the operation.

Return type:

bool

See:

addOptionBool, addOptionInt, addOptionString

addOptionBool()

Add a boolean option.

Parameters:
  • name (str) – The name of the option.
  • value (boolean) – The value of the option.
Returns:

The result of the operation.

Return type:

bool

See:

addOption, addOptionInt, addOptionString

addOptionInt()

Add an integer option.

Parameters:
  • name (str) – The name of the option.
  • value (boolean) – The value of the option.
Returns:

The result of the operation.

Return type:

bool

See:

addOption, addOptionBool, addOptionString

addOptionString()

Add a string option.

Parameters:
  • name (str) – The name of the option. Option names are case insensitive and must be unique.
  • value (str) – The value of the option.
  • append (boolean) – Setting append to true will cause values read from the command line or XML file to be concatenated into a comma delimited set. If _append is false, newer values will overwrite older ones.
Returns:

The result of the operation.

Return type:

bool

See:

addOption, addOptionBool, addOptionInt

areLocked()
Test whether the options have been locked.
Returns:true if the options have been locked.
Return type:boolean
See:lock
create()

Create an option object used to start the manager

Parameters:
  • a (str) – The path of the config directory
  • b (str) – The path of the user directory
  • c (str) – The “command line” options of the openzwave library
See:

destroyoptions

destroy()
Deletes the Options and cleans up any associated objects. The application is responsible for destroying the Options object, but this must not be done until after the Manager object has been destroyed.
Returns:The result of the operation.
Return type:bool
See:createoptions
getConfigPath()

Retrieve the config path. This directory hold the xml files.

Returns:A string containing the library config path or None.
Return type:str
getOption()

Retrieve option of a value.

Parameters:name (string) – The name of the option.
Returns:The value
Return type:boolean, integer, string or None
See:getOptionAsBool, getOptionAsInt, getOptionAsString
getOptionAsBool()

Retrieve boolean value of an option.

Parameters:name (string) – The name of the option.
Returns:The value or None
Return type:boolean or None
See:getOption, getOptionAsInt, getOptionAsString
getOptionAsInt()

Retrieve integer value of an option.

Parameters:name (string) – The name of the option.
Returns:The value or None
Return type:Integer or None
See:getOption, getOptionAsBool, getOptionAsString
getOptionAsString()

Retrieve string value of an option.

Parameters:name (string) – The name of the option.
Returns:The value or None
Return type:String or None
See:getOption, getOptionAsBool, getOptionAsInt
lock()

Lock the options. Needed to start the manager

Returns:The result of the operation.
Return type:bool
See:areLocked
class libopenzwave.RetAlloc

Bases: object

Map an array of uint8_t used when retrieving sets. Allocate memory at init and free it when no more reference to it exist. Give it to lion as Nico0084 says : http://blog.naviso.fr/wordpress/wp-sphinxdoc/uploads/2011/11/MemoryLeaks3.jpg

libopenzwave.configPath()

Retrieve the config path. This directory hold the xml files.

Returns:A string containing the library config path or None.
Return type:str
libopenzwave.driverData()

This file is part of python-openzwave project https://github.com/OpenZWave/python-openzwave.

platform:Unix, Windows, MacOS X
sinopsis:openzwave C++

License : GPL(v3)

python-openzwave is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

python-openzwave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with python-openzwave. If not, see http://www.gnu.org/licenses.

libopenzwave.PyNotifications = ['ValueAdded', 'ValueRemoved', 'ValueChanged', 'ValueRefreshed', 'Group', 'NodeNew', 'NodeAdded', 'NodeRemoved', 'NodeProtocolInfo', 'NodeNaming', 'NodeEvent', 'PollingDisabled', 'PollingEnabled', 'SceneEvent', 'CreateButton', 'DeleteButton', 'ButtonOn', 'ButtonOff', 'DriverReady', 'DriverFailed', 'DriverReset', 'EssentialNodeQueriesComplete', 'NodeQueriesComplete', 'AwakeNodesQueried', 'AllNodesQueriedSomeDead', 'AllNodesQueried', 'Notification', 'DriverRemoved', 'ControllerCommand', 'NodeReset']

list() -> new empty list list(iterable) -> new list initialized from iterable’s items

libopenzwave.PyGenres = ['Basic', 'User', 'Config', 'System']

list() -> new empty list list(iterable) -> new list initialized from iterable’s items

libopenzwave.PyValueTypes = ['Bool', 'Byte', 'Decimal', 'Int', 'List', 'Schedule', 'Short', 'String', 'Button', 'Raw']

list() -> new empty list list(iterable) -> new list initialized from iterable’s items

libopenzwave.PyLogLevels = {'Alert': {'doc': 'Something unexpected by the library about which the controlling application should be aware', 'value': 6}, 'Always': {'doc': 'These messages should always be shown', 'value': 2}, 'Debug': {'doc': 'Very detailed information on progress that will create a huge log file quickly but this level (as others) can be queued and sent to the log only on an error or warning', 'value': 9}, 'Detail': {'doc': 'Detailed information on the progress of each message', 'value': 8}, 'Error': {'doc': 'A serious issue with the library or the network', 'value': 4}, 'Fatal': {'doc': 'A likely fatal issue in the library', 'value': 3}, 'Info': {'doc': "Everything's working fine...these messages provide streamlined feedback on each message", 'value': 7}, 'Internal': {'doc': 'Used only within the log class (uses existing timestamp, etc', 'value': 11}, 'Invalid': {'doc': 'Invalid Log Status', 'value': 0}, 'None': {'doc': 'Disable all logging', 'value': 1}, 'StreamDetail': {'doc': 'Will include low-level byte transfers from controller to buffer to application and back', 'value': 10}, 'Warning': {'doc': 'A minor issue from which the library should be able to recover', 'value': 5}}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
libopenzwave.PyControllerCommand = ['None', 'AddDevice', 'CreateNewPrimary', 'ReceiveConfiguration', 'RemoveDevice', 'RemoveFailedNode', 'HasNodeFailed', 'ReplaceFailedNode', 'TransferPrimaryRole', 'RequestNetworkUpdate', 'RequestNodeNeighborUpdate', 'AssignReturnRoute', 'DeleteAllReturnRoutes', 'SendNodeInformation', 'ReplicationSend', 'CreateButton', 'DeleteButton']

list() -> new empty list list(iterable) -> new list initialized from iterable’s items

libopenzwave.PyControllerError = ['None', 'ButtonNotFound', 'NodeNotFound', 'NotBridge', 'NotSUC', 'NotSecondary', 'NotPrimary', 'IsPrimary', 'NotFound', 'Busy', 'Failed', 'Disabled', 'Overflow']

list() -> new empty list list(iterable) -> new list initialized from iterable’s items

libopenzwave.PyControllerState = ['Normal', 'Starting', 'Cancel', 'Error', 'Waiting', 'Sleeping', 'InProgress', 'Completed', 'Failed', 'NodeOK', 'NodeFailed']

list() -> new empty list list(iterable) -> new list initialized from iterable’s items

libopenzwave.PyOptionList = {'AppendLogFile': {'doc': 'Append new session logs to existing log file (false = overwrite).', 'type': 'Bool'}, 'Associate': {'doc': 'Enable automatic association of the controller with group one of every device.', 'type': 'Bool'}, 'AssumeAwake': {'doc': 'Assume Devices that Support the Wakeup CC are awake when we first query them ...', 'type': 'Bool'}, 'ConfigPath': {'doc': 'Path to the OpenZWave config folder.', 'type': 'String'}, 'ConsoleOutput': {'doc': 'Display log information on console (as well as save to disk).', 'type': 'Bool'}, 'CustomSecuredCC': {'doc': 'What List of Custom CC should we always encrypt if SecurityStrategy is CUSTOM.', 'type': 'String', 'value': '0x62,0x4c,0x63'}, 'DriverMaxAttempts': {'doc': '.', 'type': 'Int'}, 'DumpTriggerLevel': {'doc': 'Default is to never dump RAM-stored log messages.', 'type': 'Int'}, 'EnableSIS': {'doc': 'Automatically become a SUC if there is no SUC on the network.', 'type': 'Bool'}, 'EnforceSecureReception': {'doc': 'If we recieve a clear text message for a CC that is Secured, should we drop the message', 'type': 'Bool'}, 'Exclude': {'doc': 'Remove support for the listed command classes.', 'type': 'String'}, 'Include': {'doc': 'Only handle the specified command classes. The Exclude option is ignored if anything is listed here.', 'type': 'String'}, 'Interface': {'doc': 'Identify the serial port to be accessed (TODO: change the code so more than one serial port can be specified and HID).', 'type': 'String'}, 'IntervalBetweenPolls': {'doc': 'If false, try to execute the entire poll list within the PollInterval time frame. If true, wait for PollInterval milliseconds between polls.', 'type': 'Bool'}, 'LogFileName': {'doc': 'Name of the log file (can be changed via Log::SetLogFileName).', 'type': 'String'}, 'Logging': {'doc': 'Enable logging of library activity.', 'type': 'Bool'}, 'NetworkKey': {'doc': 'Key used to negotiate and communicate with devices that support Security Command Class', 'type': 'String'}, 'NotifyOnDriverUnload': {'doc': 'Should we send the Node/Value Notifications on Driver Unloading - Read comments in Driver::~Driver() method about possible race conditions.', 'type': 'Bool'}, 'NotifyTransactions': {'doc': 'Notifications when transaction complete is reported.', 'type': 'Bool'}, 'PerformReturnRoutes': {'doc': 'If true, return routes will be updated.', 'type': 'Bool'}, 'PollInterval': {'doc': '30 seconds (can easily poll 30 values in this time; ~120 values is the effective limit for 30 seconds).', 'type': 'Int'}, 'QueueLogLevel': {'doc': 'Save (in RAM) log messages equal to or above LogLevel_Debug.', 'type': 'Int'}, 'RefreshAllUserCodes': {'doc': "If true, during startup, we refresh all the UserCodes the device reports it supports. If False, we stop after we get the first 'Available' slot (Some devices have 250+ usercode slots! - That makes our Session Stage Very Long ).", 'type': 'Bool'}, 'RetryTimeout': {'doc': 'How long do we wait to timeout messages sent.', 'type': 'Int'}, 'SaveConfiguration': {'doc': 'Save the XML configuration upon driver close.', 'type': 'Bool'}, 'SaveLogLevel': {'doc': 'Save (to file) log messages equal to or above LogLevel_Detail.', 'type': 'Int'}, 'SecurityStrategy': {'doc': "Should we encrypt CC's that are available via both clear text and Security CC?.", 'type': 'String', 'value': 'SUPPORTED'}, 'SuppressValueRefresh': {'doc': 'If true, notifications for refreshed (but unchanged) values will not be sent.', 'type': 'Bool'}, 'UserPath': {'doc': "Path to the user's data folder.", 'type': 'String'}}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
libopenzwave.PyStatDriver = {'ACKCnt': 'Number of ACK bytes received', 'ACKWaiting': 'Number of unsolicited messages while waiting for an ACK', 'CANCnt': 'Number of CAN bytes received', 'NAKCnt': 'Number of NAK bytes received', 'OOFCnt': 'Number of bytes out of framing', 'SOFCnt': 'Number of SOF bytes received', 'badChecksum': 'Number of bad checksums', 'badroutes': 'Number of failed messages due to bad route response', 'broadcastReadCnt': 'Number of broadcasts read', 'broadcastWriteCnt': 'Number of broadcasts sent', 'callbacks': 'Number of unexpected callbacks', 'dropped': 'Number of messages dropped & not delivered', 'netbusy': 'Number of network busy/failure messages', 'noack': 'Number of no ACK returned errors', 'nondelivery': 'Number of messages not delivered to network', 'readAborts': 'Number of times read were aborted due to timeouts', 'readCnt': 'Number of messages successfully read', 'retries': 'Number of messages retransmitted', 'routedbusy': 'Number of messages received with routed busy status', 'writeCnt': 'Number of messages successfully sent'}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
libopenzwave.PyStatNode = {'averageRequestRTT': 'Average Request round trip time', 'averageResponseRTT': 'Average Response round trip time', 'errors': 'Count errors for dead node detection', 'lastReceivedMessage': 'Place to hold last received message', 'lastRequestRTT': 'Last message request RTT', 'lastResponseRTT': 'Last message response RTT', 'quality': 'Node quality measure', 'receivedCnt': 'Number of messages received from this node', 'receivedDups': 'Number of duplicated messages received', 'receivedTS': 'Last message received time', 'receivedUnsolicited': 'Number of messages received unsolicited', 'retries': 'Number of message retries', 'sentCnt': 'Number of messages sent from this node', 'sentFailed': 'Number of sent messages failed', 'sentTS': 'Last message sent time'}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)