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.
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
Bases: exceptions.Exception
Exception class for LibOpenZWave
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.
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 |
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: |
|
---|---|
See: | getNumGroups, getAssociations, getMaxAssociations, removeAssociation |
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 |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
Add a ValueID of value to an existing scene.
Actually I don’t know how to use it :)
Parameters: |
|
---|---|
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 |
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 |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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: |
|
---|---|
Returns: | True if the command was accepted and has started. |
Return type: | bool |
See: |
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 |
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 |
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 |
---|
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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 |
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 |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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 |
Enable the polling of a device’s state.
Parameters: |
|
---|---|
Returns: | True if polling was enabled. |
Return type: | bool |
See: | getPollInterval, setPollInterval, isPolled, setPollIntensity, disablePoll, getPollIntensity |
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 |
Gets the associations for a group
Parameters: |
|
---|---|
Returns: | A set containing IDs of members of the group |
Return type: | set() |
See: | getNumGroups, addAssociation, removeAssociation, getMaxAssociations |
Gets the associationsInstances for a group
Parameters: |
|
---|---|
Returns: | A set containing tuples containing the node_id and the instance |
Return type: | set((node_id,instance)) |
See: | getNumGroups, addAssociation, removeAssociation, getMaxAssociations |
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: 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 |
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: 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 |
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: |
|
---|---|
Returns: | A dict containing statistics of the driver. |
Return type: | dict() |
See: |
Returns a label for the particular group of a node.
This label is populated by the device specific configuration files.
Parameters: |
|
---|---|
Returns: | The label for the particular group of a node. |
Return type: | str |
See: | getNumGroups, getAssociations, getMaxAssociations, addAssociation |
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 |
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 |
Gets the maximum number of associations for a group.
Parameters: |
|
---|---|
Returns: | The maximum number of nodes that can be associated into the group. |
Return type: | int |
See: | getNumGroups, addAssociation, removeAssociation, getAssociations |
Get the basic type of a node.
Parameters: |
|
---|---|
Returns: | The node basic type. |
Return type: | int |
See: | getNodeType, getNodeSpecific, getNodeGeneric, getNodeSecurity |
Helper method to return whether a particular class is available in a node
Parameters: |
|
---|---|
Returns: | True if the node does have the class instantiated, will return name & version |
Return type: | bool |
Get the node DeviceType as reported in the Z-Wave+ Info report.
Parameters: |
|
---|---|
Returns: | The node version number |
Return type: | int |
Get the node DeviceType (string) as reported in the Z-Wave+ Info report.
Parameters: |
|
---|---|
Returns: | name of current query stage as a string. |
Return type: | str |
Get the generic type of a node.
Parameters: |
|
---|---|
Returns: | The node generic type. |
Return type: | int |
See: |
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: |
|
---|---|
Returns: | str – A string containing the nodes location. |
See: |
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: |
|
---|---|
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 |
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: |
|
---|---|
Returns: | A string containing the nodes manufacturer name. |
Return type: | str |
See: | setNodeManufacturerName, getNodeProductName, setNodeProductName, getNodeManufacturerId, getNodeProductId, getNodeProductType |
Get the maximum baud rate of a nodes communications
Parameters: |
|
---|---|
Returns: | The baud rate in bits per second. |
Return type: | int |
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: |
|
---|---|
Returns: | str – A string containing the node name. |
See: |
Get the bitmap of this node’s neighbors.
Parameters: |
|
---|---|
Returns: | A set containing neighboring node IDs |
Return type: | set() |
Get the node plus type as reported in the Z-Wave+ Info report.
Parameters: |
|
---|---|
Returns: | The node version number |
Return type: | int |
Get the node plus type (string) as reported in the Z-Wave+ Info report.
Parameters: |
|
---|---|
Returns: | name of current query stage as a string. |
Return type: | str |
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: |
|
---|---|
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 |
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: |
|
---|---|
Returns: | str – A string containing the nodes product name. |
See: | setNodeProductName, getNodeManufacturerName, setNodeManufacturerName, getNodeManufacturerId, getNodeProductId, 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: |
|
---|---|
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 |
Parameters: |
|
---|---|
Returns: | name of current query stage as a string. |
Return type: | str |
Parameters: | queryStage (str) – The query stage description. |
---|---|
Returns: | code value. |
Return type: | int |
Get the node role as reported in the Z-Wave+ Info report.
Parameters: |
|
---|---|
Returns: | The node version number |
Return type: | int |
Get the node role (string) as reported in the Z-Wave+ Info report.
Parameters: |
|
---|---|
Returns: | name of current query stage as a string. |
Return type: | str |
Get the security byte for a node. Bit meanings are still to be determined.
Parameters: |
|
---|---|
Returns: | The node security byte |
Return type: | int |
See: |
Get the specific type of a node.
Parameters: |
|
---|---|
Returns: | int – The node specific type. |
See: |
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
- ccData # List of statistic
- commandClassId # Num of commandClass id.
- sentCnt # Number of messages sent from this CommandClass.
- receivedCnt # Number of messages received from this CommandClass.
Parameters: |
|
---|---|
Returns: | A dict containing statistics of the node. |
Return type: | dict() |
See: |
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: |
|
---|---|
Returns: | A string containing the label text. |
Return type: | str |
See: | getNodeSpecific, getNodeGeneric, getNodeBasic, getNodeSecurity |
Get the version number of a node
Parameters: |
|
---|---|
Returns: | The node version number |
Return type: | int |
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: |
|
---|---|
Returns: | The number of groups. |
Return type: | int |
See: | getAssociations, getMaxAssociations, addAssociation, removeAssociation |
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 |
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 |
Get a string containing the openzwave library version.
Returns: | A string containing the library type. |
---|---|
Return type: | str |
See: | getLibraryVersion, getPythonLibraryVersion, getLibraryTypeName, 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: Get the openzwave library version number.
Returns: | A string containing the library type. |
---|---|
Return type: | str |
See: | getLibraryVersion, getPythonLibraryVersion, getLibraryTypeName |
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
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 |
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 |
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 |
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 |
Returns a label for the particular scene.
Parameters: |
|
---|---|
Returns: | The label string. |
Return type: | str |
See: | getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, activateScene, setSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues |
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 |
Gets switch point data from the schedule
Parameters: |
|
---|---|
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 |
Gets a value.
Parameters: |
|
---|---|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Parameters: | id (int) – The unique identifier of the value. |
---|---|
Returns: | a float value’s precision. |
Return type: | int |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
Heal network by requesting nodes rediscover their neighbors. Sends a ControllerCommand_RequestNodeNeighborUpdate to every node. Can take a while on larger networks.
Parameters: |
|
---|---|
See: |
Heal network node by requesting the node rediscover their neighbors. Sends a ControllerCommand_RequestNodeNeighborUpdate to the node.
Parameters: |
|
---|---|
See: |
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 |
Parameters: |
|
---|---|
Returns: | True if the node is awake. |
Return type: | bool |
Get whether the node is a beam capable device.
Parameters: |
|
---|---|
Returns: | True if the node is a beaming device |
Return type: | bool |
See: | isNodeListeningDevice, isNodeFrequentListeningDevice, isNodeSecurityDevice, isNodeRoutingDevice |
Get whether the node is working or has failed
Parameters: |
|
---|---|
Returns: | True if the node has failed and is no longer part of the network. |
Return type: | bool |
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: |
|
---|---|
Returns: | True if it is a frequent setening node. |
Return type: | bool |
See: | isNodeBeamingDevice, isNodeListeningDevice, isNodeSecurityDevice, isNodeRoutingDevice |
Get whether the node information has been received
Parameters: |
|
---|---|
Returns: | bool – True if the node information has been received yet |
Get whether the node is a setening device that does not go to sleep
Parameters: |
|
---|---|
Returns: | True if it is a setening node. |
Return type: | bool |
See: | isNodeBeamingDevice, isNodeFrequentListeningDevice, isNodeSecurityDevice, isNodeRoutingDevice |
Get whether the node is a routing device that passes messages to other nodes
Parameters: |
|
---|---|
Returns: | True if the node is a routing device |
Return type: | bool |
See: | isNodeBeamingDevice, isNodeListeningDevice, isNodeFrequentListeningDevice, isNodeSecurityDevice |
Get the security attribute for a node. True if node supports security features.
Parameters: |
|
---|---|
Returns: | True if security features implemented. |
Return type: | bool |
See: | isNodeBeamingDevice, isNodeListeningDevice, isNodeFrequentListeningDevice, isNodeRoutingDevice |
Get whether the node is a ZWave+ one
Parameters: |
|
---|---|
Returns: | True if the node has failed and is no longer part of the network. |
Return type: | bool |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Send current driver statistics to the log file.
Parameters: | homeid (int) – The Home ID of the Z-Wave controller. |
---|
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 |
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 |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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 |
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 |
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 |
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: |
|
---|---|
See: | getNumGroups, getAssociations, getMaxAssociations, addAssociation |
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 |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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 |
Remove the Value ID from an existing scene.
Parameters: |
|
---|---|
Returns: | True if succee. False otherwise |
Return type: | bool |
See: | getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, activateScene, getSceneLabel, setSceneLabel, removeSceneValue, setSceneValue, sceneGetValues |
Remove a switch point from the schedule
Parameters: |
|
---|---|
Returns: | True if the switch point is removed. |
Return type: | bool |
See: | setSwitchPoint, clearSwitchPoints, getSwitchPoint, getNumSwitchPoints |
Remove a notification watcher.
Parameters: | pythonfunc (callback) – Watcher pointer to a function |
---|---|
See: | addWatcher |
Replace a failed device with another.
If the node is not in the controller’s failed nodes list, or the node responds, this command will fail.
You can check if a Node is in the Controllers Failed node list by using the HasNodeFailed method.
Results of the ReplaceFailedNode Command will be send as a Notification with the Notification type as Notification::Type_ControllerCommand
Parameters: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
Request the values of all known configurable parameters from a device.
Parameters: |
|
---|---|
See: |
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: |
|
---|---|
See: |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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 |
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 |
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 |
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: |
|
---|---|
Returns: | True if the request was sent successfully. |
Return type: | bool |
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: |
|
---|
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: |
|
---|---|
Returns: | True if the message setting the value was sent to the device. |
Return type: | bool |
See: |
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: |
|
---|---|
See: |
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: |
|
---|---|
See: |
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: |
|
---|---|
See: | getNodeManufacturerName, getNodeProductName, setNodeProductName |
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: |
|
---|---|
See: |
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: |
|
---|---|
See: |
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: |
|
---|---|
See: |
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: |
|
---|---|
See: | getNodeProductName, getNodeManufacturerName, setNodeManufacturerName |
Set the frequency of polling (0=none, 1=every time through the set, 2-every other time, etc)
Parameters: |
|
---|---|
See: | getPollInterval, setPollInterval, enablePoll, isPolled, disablePoll, getPollIntensity |
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: |
|
---|---|
See: | getPollInterval, enablePoll, isPolled, setPollIntensity, disablePoll, getPollIntensity |
Sets a label for the particular scene.
Parameters: |
|
---|---|
See: | getNumScenes, getAllScenes, sceneExists, removeAllScenes, createScene, removeScene, activateScene, getSceneLabel, removeSceneValue, addSceneValue, setSceneValue, sceneGetValues |
Set a value to an existing scene’s ValueID.
Parameters: |
|
---|---|
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 |
Set a switch point in the schedule.
Parameters: |
|
---|---|
Returns: | True if the switch point is set. |
Return type: | bool |
See: | removeSwitchPoint, clearSwitchPoints, getSwitchPoint, getNumSwitchPoints |
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: |
|
---|---|
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 |
Sets a help string describing the value’s purpose and usage.
Parameters: |
|
---|---|
See: |
Sets the user-friendly label for the value
Parameters: |
|
---|---|
See: |
Sets the units that the value is measured in.
Parameters: |
|
---|---|
See: |
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 |
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 |
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 |
Test network.
Sends a series of messages to every node on the network for testing network reliability.
Parameters: |
|
---|---|
See: |
Test network node.
Sends a series of messages to a network node for testing network reliability.
Parameters: |
|
---|---|
See: |
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 |
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. |
---|
Bases: object
Manage options manager
Add an option.
Parameters: |
|
---|---|
Returns: | The result of the operation. |
Return type: | bool |
See: |
Add a boolean option.
Parameters: |
|
---|---|
Returns: | The result of the operation. |
Return type: | bool |
See: |
Add an integer option.
Parameters: |
|
---|---|
Returns: | The result of the operation. |
Return type: | bool |
See: |
Add a string option.
Parameters: |
|
---|---|
Returns: | The result of the operation. |
Return type: | bool |
See: |
Test whether the options have been locked.
Returns: | true if the options have been locked. |
---|---|
Return type: | boolean |
See: | lock |
Create an option object used to start the manager
Parameters: |
|
---|---|
See: |
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 |
Retrieve the config path. This directory hold the xml files.
Returns: | A string containing the library config path or None. |
---|---|
Return type: | str |
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 |
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 |
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 |
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 |
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
Retrieve the config path. This directory hold the xml files.
Returns: | A string containing the library config path or None. |
---|---|
Return type: | str |