Object documentation¶
The low level object. Implements cache mechanism.
- This file is part of python-openzwave project https://github.com/OpenZWave/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.object.
ZWaveObject
(object_id, network=None, use_cache=True)¶ Represents a Zwave object. Values, nodes, ... can be changer by other managers on the network.
-
cache_property
(prop)¶ Add this property to the cache manager.
Parameters: prop (lambda) – The property to cache
-
home_id
¶ The home_id of the node.
Return type: int
-
is_outdated
(prop)¶ Check if property information is outdated.
Parameters: prop (lambda) – The property to check Return type: bool
-
kvals
¶ The keyvals store in db for this object.
Return type: {}
-
last_update
¶ The last update date of the device.
Return type: time
-
network
¶ The network of the node.
Return type: ZWaveNetwork
-
object_id
¶ The id of the object. object_id could be None, when creating a scene for example.
Return type: int
-
outdate
(prop)¶ Says that the property information is outdated.
Parameters: prop (lambda) – The property to outdate
-
outdated
¶ Are the information of this object outdated.
How to manage the cache ?
2 ways of doing it : - refresh information when setting the property - refresh information when getting getting property. Maybe whe could implement the 2 methods.
Return type: int
-
update
(prop)¶ Says that the property are updated.
Parameters: prop (lambda) – The property to update
-
use_cache
¶ Should this object use cache from property
Return type: bool
-
-
class
openzwave.object.
ZWaveNodeInterface
¶ Represents an interface of a node. An interface can manage specific commandClasses (ie a switch, a dimmer, a thermostat, ...). Don’t know what to do with it now but sure it must exist
-
exception
openzwave.object.
ZWaveException
(value)¶ Exception class for OpenZWave
-
exception
openzwave.object.
ZWaveTypeException
(value)¶ Exception class for OpenZWave
-
exception
openzwave.object.
ZWaveCacheException
(value)¶ Exception class for OpenZWave
-
exception
openzwave.object.
ZWaveCommandClassException
(value)¶ Exception class for OpenZWave