Node documentation

The node.

This file is part of python-openzwave project http://code.google.com/p/python-openzwave.
platform:Unix, Windows, MacOS X
sinopsis:openzwave API

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 openzwave.node.ZWaveNode(node_id, network)

Represents a single Node within the Z-Wave Network.

add_value(value_id)

Add a value to the node

Parameters:
  • value_id (int) – The id of the value to add
  • command_class (str) – The command_class of the value
Return type:

bool

basic

The basic type of the node.

Return type:int
capabilities

The capabilities of the node.

Return type:set()
change_value(value_id)

Change a value of the node. Not implemented

Parameters:value_id (int) – The id of the value to change
command_classes

The commandClasses of the node.

Return type:set()
command_classes_as_string

Return the command classes of the node as string.

Return type:set()
generic

The generic type of the node.

Return type:int
get_command_class_as_string(class_id)

Return the command class representation as string.

Parameters:class_id (hexadecimal code) – the COMMAND_CLASS to get string representation
Return type:str
get_command_class_genres()

Return the list of genres of command classes

Return type:set()
get_values(class_id='All', genre='All', type='All', readonly='All', writeonly='All')

Retrieve the set of values. You can optionnaly filter for a command class, a genre and/or a type. You can also filter readonly and writeonly params.

This method always filter the values. If you wan’t to get all the node’s values, use self.values instead.

Parameters:
  • class_id (hexadecimal code or string) – the COMMAND_CLASS to get values
  • genre (‘All’ or PyGenres) – the genre of value
  • type (‘All’ or PyValueTypes) – the type of value
  • readonly (‘All’ or True or False) – Is this value readonly
  • writeonly (‘All’ or True or False) – Is this value writeonly
Return type:

set() of Values

get_values_by_command_classes(genre='All', type='All', readonly='All', writeonly='All')

Retrieve values in a dict() of dicts(). The dict is indexed on the COMMAND_CLASS. This allows to browse values grouped by the COMMAND_CLASS.You can optionnaly filter for a command class, a genre and/or a type. You can also filter readonly and writeonly params.

This method always filter the values. If you wan’t to get all the node’s values, use the property self.values instead.

Parameters:
  • genre (‘All’ or PyGenres) – the genre of value
  • type (‘All’ or PyValueTypes) – the type of value
  • readonly (‘All’ or True or False) – Is this value readonly
  • writeonly (‘All’ or True or False) – Is this value writeonly
Return type:

dict(command_class : dict(valueids))

get_values_for_command_class(class_id)

Retrieve the set of values for a command class. Deprecated For backward compatibility only. Use get_values instead

Parameters:class_id (hexadecimal code or string) – the COMMAND_CLASS to get values
Return type:set() of classId
groups

Get the 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.

Return type:dict()
has_command_class(class_id)

Check that this node use this commandClass.

Parameters:classId (hexadecimal code) – the COMMAND_CLASS to check
Return type:bool
is_beaming_device

Is this node a beaming device.

Return type:bool
is_frequent_listening_device

Is this node a frequent listening device.

Return type:bool
is_listening_device

Is this node a listening device.

Return type:bool
is_locked

Is this node locked.

Return type:bool
is_routing_device

Is this node a routing device.

Return type:bool
is_security_device

Is this node a security device.

Return type:bool
is_sleeping

Is this node sleeping.

Return type:bool
location

The location of the node.

Return type:str
manufacturer_id

The manufacturer id of the node.

Return type:str
manufacturer_name

The manufacturer name of the node.

Return type:str
max_baud_rate

Get the maximum baud rate of a node

name

The name of the node.

Return type:str
neighbors

The neighbors of the node.

Return type:set()
node_id

The id of the node.

Return type:int
num_groups

Gets the number of association groups reported by this node.

Return type:int
product_id

The product Id of the node.

Return type:str
product_name

The product name of the node.

Return type:str
product_type

The product type of the node.

Return type:str
refresh_info()

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.

Return type:bool
refresh_value(value_id)

Refresh a value of the node. Not implemented

Parameters:value_id (int) – The id of the value to change
remove_value(value_id)

Change a value of the node. Todo

Parameters:value_id (int) – The id of the value to change
Returns:The result of the operation
Return type:bool
request_all_config_params()

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

request_config_param(param)

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:param – The param of the node.
security

The security type of the node.

Returns:The security type of the node
Return type:int
set_config_param(param, value)

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:
  • param – The param of the node.
  • value – The value of the param.
Returns:

Return type:

bool

set_field(field, value)

A helper to set a writable field : name, location, product_name, ...

Parameters:
  • field (str) – The field to set : name, location, product_name, manufacturer_name
  • value (str) – The value to set
Return type:

bool

specific

The specific type of the node.

Returns:The specific type of the node
Return type:int
test(count=1)

Send a number of test messages to every node and record results.

Parameters:count (int) – The number of test messages to send.
version

The version of the node.

Returns:The version of the node
Return type:int

Previous topic

Option documentation

Next topic

Command documentation

This Page