Welcome to pyzwave’s documentation!¶
Quickstart¶
To setup pyzwave you need three things. The application, an adapter and a storage module.
from pyzwave.application import Application
from pyzwave.zipgateway import ZIPGateway
from pyzwave.persistantstorage import YamlStorage
PSK = "123456789012345678901234567890AA"
adapter = ZIPGateway("192.168.0.169", psk=bytes.fromhex(PSK))
await adapter.connect()
storage = YamlStorage("/tmp/")
app = Application(adapter, storage)
await app.startup()
Composing and sending messages¶
To compose messages this is done in object oriented way. Example for requesting a sensor value from a node supporting sensor multilevel
from pyzwave.commandclass import SensorMultilevel
node = app.nodes["5:0"]
message = SensorMultilevel.Get(
sensorType=SensorMultilevel.SensorType.TEMPERATURE,
scale=0
)
report = await node.sendAndReceive(message, SensorMultilevel.Report)
print(report.debugString())
Node inclusion¶
To include a node start inclusion mode in the controller with
Adapter.addNode()
.
Status about the inclusion are sent as
NetworkManagementInclusion.NodeAddStatus
messages
zipgateway send back secure inclusion callback using messages
NetworkManagementInclusion.NodeAddKeysReport
and
NetworkManagementInclusion.NodeAddDSKReport
Non secure inclusion¶
To force the node to be included non secure respond to
NodeAddKeysReport
with
a NodeAddKeysSet
message with
the attributes set to:
grantCSA = False
accept = False
grantedKeys = 0
await adapter.addNodeKeysSet(False, False, 0)
S0 inclusion¶
To force S0 inclusion respond to NodeAddKeysReport
with the key set to
SECURITY_0_NETWORK_KEY
:
await adapter.addNodeKeysSet(False, True, NetworkManagementInclusion.Keys.SECURITY_0_NETWORK_KEY)
S2 inclusion¶
To continue with S2 bootstrapping respond the requested keys from the node to the controller:
async def messageReceived(self, _sender, message: Message):
if isinstance(message, NodeAddKeysReport):
await adapter.addNodeKeysSet(False, True, message.requestedKeys)
Depending on the security class requested the user may or may not complete the input
of the DSK (device specific key). The controller uses the
NetworkManagementInclusion.NodeAddDSKReport
message for this. Example:
async def messageReceived(self, _sender, message: Message):
if isinstance(message, NodeAddDSKReport):
if message.inputDSKLength == 0:
# Unauthenticated S2. No input from the user needed.
# User may confirm the dsk in message.dsk is the same
# as the label in the including node
if await confirmDSK(message.dsk):
await adapter.addNodeDSKSet(True, 0, b'')
else:
await adapter.addNodeDSKSet(False, 0, b'')
else:
# Let the user enter the missing section from the dsk
# to finish S2 bootstrapping
userInput = await requestUserInput(message)
await adapter.addNodeDSKSet(True, message.inputDSKLength, userInput)
Sleeping nodes (battery operated)¶
To talk with battery operated nodes the messages must be queued until the node is awake.
The node will use the WAKE_UP command class to notify when the node is awake. Zipgateway contains a mailbox proxy to help with queuing the messages. Using this is optional and the queueing can be implemented by the end application instead.
Mailbox service¶
To use the mailbox proxy in Zipgateway the application must have a
MailboxService
configured.
The ip address and port should be the same as the ZipGateway
is configured to listen on.
import ipaddress
from pyzwave.mailbox import MailboxService
mailbox = MailboxService(adapter)
await mailbox.initialize(ipaddress.IPv6Address("::ffff:c0a8:31"), 4123)
Sending messages¶
When a MailboxService
has been configured the
Adapter.send()
method will block until the node
either wakes up or is considered dead.
This can be a long time (week or even months). Please make sure the code can handle this.
pyzwave package¶
Subpackages¶
pyzwave.commandclass package¶
Submodules¶
-
class
pyzwave.commandclass.ApplicationStatus.
ApplicationBusy
(status, waitTime)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_APPLICATION_STATUS APPLICATION_BUSY
-
NAME
= 'APPLICATION_BUSY'¶
-
attributes
= (('status', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('waitTime', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.Association.
Association
(groupings)¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class COMMAND_CLASS_ASSOCIATION
-
NAME
= 'ASSOCIATION'¶
-
attributes
= (('groupings', <class 'pyzwave.commandclass.Association.Groupings'>),)¶
-
async
interview
()¶ Interview this command class. Must be implemented by subclasses. The version has already been interviewed when this method is called.
Return True if the interview was completed successfully and False or raise an exception if the interview did not complete.
-
async
interviewGrouping
(groupingIdentifier)¶ Interview an association group
-
async
setupLifeLine
(groupingIdentifier=1)¶ Setup the lifeline association group
-
-
class
pyzwave.commandclass.Association.
Get
(groupingIdentifier)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION ASSOCIATION_GET
-
NAME
= 'GET'¶
-
attributes
= (('groupingIdentifier', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Association.
Group
(maxNodes, nodes)¶ Bases:
pyzwave.commandclass.CommandClass.DictAttribute
Attribute for information regarding one association group
-
attributes
= (('maxNodes', <class 'pyzwave.types.uint8_t'>), ('nodes', <class 'pyzwave.commandclass.Association.Nodes'>))¶
-
-
class
pyzwave.commandclass.Association.
Groupings
¶ Bases:
dict
Helper class for storing associations
-
setNumGroups
(number: int)¶ Set the number of groups this node has
-
-
class
pyzwave.commandclass.Association.
GroupingsGet
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION ASSOCIATION_GROUPINGS_GET
-
NAME
= 'GROUPINGS_GET'¶
-
-
class
pyzwave.commandclass.Association.
GroupingsReport
(supportedGroupings)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION ASSOCIATION_GROUPINGS_REPORT
-
NAME
= 'GROUPINGS_REPORT'¶
-
attributes
= (('supportedGroupings', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Association.
Nodes
¶ Bases:
list
Nodes in association reports. Handle both normal and multi channel
-
contains
(nodeId, endpoint=0) → bool¶ Returns if node is in this collection
-
default
= []¶
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize nodes from association report.
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialise nodes
-
-
class
pyzwave.commandclass.Association.
Report
(groupingIdentifier, maxNodesSupported, reportsToFollow, nodes)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION ASSOCIATION_GROUPINGS_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('groupingIdentifier', <class 'pyzwave.types.uint8_t'>), ('maxNodesSupported', <class 'pyzwave.types.uint8_t'>), ('reportsToFollow', <class 'pyzwave.types.uint8_t'>), ('nodes', <class 'pyzwave.commandclass.Association.Nodes'>))¶
-
-
class
pyzwave.commandclass.Association.
Set
(groupingIdentifier, nodes)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION ASSOCIATION_SET
-
NAME
= 'SET'¶
-
attributes
= (('groupingIdentifier', <class 'pyzwave.types.uint8_t'>), ('nodes', <class 'pyzwave.commandclass.Association.Nodes'>))¶
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
AssociationGrpInfo
(groupings)¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class COMMAND_CLASS_ASSOCIATION_GRP_INFO
-
NAME
= 'ASSOCIATION_GRP_INFO'¶
-
attributes
= (('groupings', <class 'pyzwave.commandclass.AssociationGrpInfo.Groupings'>),)¶
-
async
interview
()¶ Interview this command class. Must be implemented by subclasses. The version has already been interviewed when this method is called.
Return True if the interview was completed successfully and False or raise an exception if the interview did not complete.
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
Group
(name, profile, commands)¶ Bases:
pyzwave.commandclass.CommandClass.DictAttribute
Attribute for an association group
-
attributes
= (('name', <class 'str'>), ('profile', <class 'pyzwave.types.uint16_t'>), ('commands', <class 'list'>))¶
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
GroupCommandListGet
(allowCache, -, groupingIdentifier)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION_GRP_INFO ASSOCIATION_GROUP_COMMAND_LIST_GET
-
NAME
= 'GROUP_COMMAND_LIST_GET'¶
-
attributes
= (('allowCache', <class 'pyzwave.types.flag_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('groupingIdentifier', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
GroupCommandListReport
(groupingIdentifier, commandClass)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION_GRP_INFO ASSOCIATION_GROUP_COMMAND_LIST_REPORT
-
NAME
= 'GROUP_COMMAND_LIST_REPORT'¶
-
attributes
= (('groupingIdentifier', <class 'pyzwave.types.uint8_t'>), ('commandClass', <class 'list'>))¶
-
static
parse_commandClass
(stream: pyzwave.types.BitStreamReader)¶ Parse attribute commandClass
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
GroupInfoGet
(refreshCache, listMode, -, groupingIdentifier)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_VERSION ASSOCIATION_GROUP_INFO_GET
-
NAME
= 'GROUP_INFO_GET'¶
-
attributes
= (('refreshCache', <class 'pyzwave.types.flag_t'>), ('listMode', <class 'pyzwave.types.flag_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('groupingIdentifier', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
GroupInfoGroupType
(groupingIdentifier, mode, profile, -, eventCode)¶ Bases:
pyzwave.commandclass.CommandClass.DictAttribute
The type for the group property in the GroupInfoReport
-
attributes
= (('groupingIdentifier', <class 'pyzwave.types.uint8_t'>), ('mode', <class 'pyzwave.types.uint8_t'>), ('profile', <class 'pyzwave.types.uint16_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('eventCode', <class 'pyzwave.types.uint16_t'>))¶
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
GroupInfoReport
(listMode, dynamicInfo, groupCount, groups)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION_GRP_INFO ASSOCIATION_GROUP_INFO_REPORT
-
NAME
= 'GROUP_INFO_REPORT'¶
-
attributes
= (('listMode', <class 'pyzwave.types.flag_t'>), ('dynamicInfo', <class 'pyzwave.types.flag_t'>), ('groupCount', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('groups', <class 'list'>))¶
-
parse_groups
(stream: pyzwave.types.BitStreamReader)¶ Parse groups
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
GroupNameGet
(groupingIdentifier)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION_GRP_INFO ASSOCIATION_GROUP_NAME_GET
-
NAME
= 'GROUP_NAME_GET'¶
-
attributes
= (('groupingIdentifier', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
GroupNameReport
(groupingIdentifier, name)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ASSOCIATION_GRP_INFO ASSOCIATION_GROUP_NAME_REPORT
-
NAME
= 'GROUP_NAME_REPORT'¶
-
attributes
= (('groupingIdentifier', <class 'pyzwave.types.uint8_t'>), ('name', <class 'pyzwave.types.str_t'>))¶
-
-
class
pyzwave.commandclass.AssociationGrpInfo.
Groupings
¶ Bases:
dict
Helper class for storing association groups
-
class
pyzwave.commandclass.Basic.
Basic
¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class COMMAND_CLASS_BASIC
-
NAME
= 'BASIC'¶
-
-
class
pyzwave.commandclass.Basic.
Get
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_BASIC BASIC_GET
-
NAME
= 'GET'¶
-
-
class
pyzwave.commandclass.Basic.
Report
(value)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_BASIC BASIC_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('value', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Basic.
Set
(value)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_BASIC BASIC_SET
-
NAME
= 'SET'¶
-
attributes
= (('value', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Battery.
Basic
¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class COMMAND_CLASS_BATTERY
-
NAME
= 'BATTERY'¶
-
-
class
pyzwave.commandclass.Battery.
Get
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_BATTERY BATTERY_GET
-
NAME
= 'GET'¶
-
-
class
pyzwave.commandclass.Battery.
Report
(batteryLevel)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_BATTERY BATTERY_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('batteryLevel', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.CommandClass.
Attribute
¶ Bases:
object
An attribute
-
class
pyzwave.commandclass.CommandClass.
CommandClass
¶ Bases:
pyzwave.util.AttributesMixin
,pyzwave.util.Listenable
Base class for a command class
-
NAME
= 'UNKNOWN'¶
-
async
handleMessage
(message: pyzwave.message.Message, flags) → bool¶ Handle and incomming message specific to this command class
-
property
id
¶ Return the command class id
-
async
interview
() → bool¶ Interview this command class. Must be implemented by subclasses. The version has already been interviewed when this method is called.
Return True if the interview was completed successfully and False or raise an exception if the interview did not complete.
-
property
interviewed
¶ Return is this command class has been fully interviewed or not
-
static
load
(cmdClass: int, securityS0: bool, node)¶ Load and create a new command class instance from the given command class id
-
property
name
¶ Return the name of the command class
-
property
node
¶ Returns the node this command class belongs to
-
async
requestVersion
() → int¶ Request the version of this command class
-
property
securityS0
¶ Returns if security class S0 is required to access this command class
-
async
send
(cmd: pyzwave.message.Message, timeout: int = 3) → bool¶ Send a message to the node. This is a convenience wrapper around Node.send.
-
async
sendAndReceive
(cmd: pyzwave.message.Message, waitFor: pyzwave.message.Message, timeout: int = 3, **kwargs) → pyzwave.message.Message¶ Send a message and wait for the response. This is a convenience wrapper around Node.sendAndReceive
-
property
version
¶ Returns the command class version implemented by the node
-
-
class
pyzwave.commandclass.CommandClass.
DictAttribute
¶ Bases:
pyzwave.commandclass.CommandClass.Attribute
,pyzwave.util.AttributesMixin
A dict attribute
-
class
pyzwave.commandclass.CommandClass.
UnknownCommandClass
¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Wrapper class for wrapping unknown command classes.
-
property
id
¶ Return the command class id
-
property
name
¶ Return the name of the command class
-
property
-
pyzwave.commandclass.CommandClass.
VarDictAttribute
(KeyType, ValueType)¶ Helper class to store variable attributes as a dictionary. All values must be of the same type
-
pyzwave.commandclass.CommandClass.
interviewDecorator
(interview)¶ Decorator to make sure the command class is ready for interview
-
class
pyzwave.commandclass.Configuration.
BulkGet
(parameterOffset, numberOfParameters)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_CONFIGURATION CONFIGURATION_BULK_GET_V2
-
NAME
= 'BULK_GET'¶
-
attributes
= (('parameterOffset', <class 'pyzwave.types.uint16_t'>), ('numberOfParameters', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.Configuration.
BulkReport
(parameterOffset, numberOfParameters, reportsToFollow, default, handshake, -, size, parameter)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_CONFIGURATION CONFIGURATION_BULK_REPORT_V2
-
NAME
= 'BULK_REPORT'¶
-
attributes
= (('parameterOffset', <class 'pyzwave.types.uint16_t'>), ('numberOfParameters', <class 'pyzwave.types.uint8_t'>), ('reportsToFollow', <class 'pyzwave.types.uint8_t'>), ('default', <class 'pyzwave.types.flag_t'>), ('handshake', <class 'pyzwave.types.flag_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('size', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('parameter', <class 'pyzwave.types.bytes_t'>))¶
-
-
class
pyzwave.commandclass.Configuration.
Configuration
(parameters)¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class COMMAND_CLASS_CONFIGURATION
-
NAME
= 'CONFIGURATION'¶
-
attributes
= (('parameters', <class 'pyzwave.commandclass.CommandClass.VarDictAttribute.<locals>.VarDictAttributeType'>),)¶
-
async
get
(number: int, cached: bool = True) → int¶ Request configuration value from node. Return the cached value if it is already known.
-
async
set
(parameterNumber: int, size: pyzwave.commandclass.Configuration.Size, value: int) → bool¶ Set a configuration value in the node
-
-
class
pyzwave.commandclass.Configuration.
ConfigurationValue
(value, size)¶ Bases:
pyzwave.commandclass.CommandClass.DictAttribute
Helper class for holding one configuration value
-
attributes
= (('value', <class 'int'>), ('size', <class 'int'>))¶
-
-
class
pyzwave.commandclass.Configuration.
Get
(parameterNumber)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_CONFIGURATION CONFIGURATION_GET
-
NAME
= 'GET'¶
-
attributes
= (('parameterNumber', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Configuration.
Report
(parameterNumber, -, size, value)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_CONFIGURATION CONFIGURATION_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('parameterNumber', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('size', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('value', <class 'int'>))¶
-
parse_value
(stream: pyzwave.types.BitStreamReader)¶ Decode the value from the report
-
-
class
pyzwave.commandclass.Configuration.
Set
(parameterNumber, default, -, size, value)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_CONFIGURATION CONFIGURATION_SET
-
NAME
= 'SET'¶
-
attributes
= (('parameterNumber', <class 'pyzwave.types.uint8_t'>), ('default', <class 'pyzwave.types.flag_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('size', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('value', <class 'int'>))¶
-
compose_value
(stream: pyzwave.types.BitStreamWriter)¶ Write the value to the bitstream. The value is variable size
-
-
class
pyzwave.commandclass.Indicator.
Basic
¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class COMMAND_CLASS_INDICATOR
-
NAME
= 'INDICATOR'¶
-
-
class
pyzwave.commandclass.Indicator.
Get
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_INDICATOR INDICATOR_GET
-
NAME
= 'GET'¶
-
-
class
pyzwave.commandclass.Indicator.
Report
(value)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_INDICATOR INDICATOR_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('value', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Indicator.
Set
(value)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_INDICATOR INDICATOR_SET
-
NAME
= 'SET'¶
-
attributes
= (('value', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Mailbox.
ConfigurationGet
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MAILBOX MAILBOX_CONFIGURATION_GET
-
NAME
= 'CONFIGURATION_GET'¶
-
-
class
pyzwave.commandclass.Mailbox.
ConfigurationReport
(-, supportedModes, mode, mailboxCapacity, forwardingDestinationIPv6Address, udpPortNumber)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MAILBOX MAILBOX_CONFIGURATION_REPORT
-
NAME
= 'CONFIGURATION_REPORT'¶
-
attributes
= (('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('supportedModes', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('mode', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('mailboxCapacity', <class 'pyzwave.types.uint16_t'>), ('forwardingDestinationIPv6Address', <class 'pyzwave.types.IPv6'>), ('udpPortNumber', <class 'pyzwave.types.uint16_t'>))¶
-
-
class
pyzwave.commandclass.Mailbox.
ConfigurationSet
(-, mode, forwardingDestinationIPv6Address, udpPortNumber)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MAILBOX MAILBOX_CONFIGURATION_SET
-
NAME
= 'CONFIGURATION_SET'¶
-
attributes
= (('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('mode', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('forwardingDestinationIPv6Address', <class 'pyzwave.types.IPv6'>), ('udpPortNumber', <class 'pyzwave.types.uint16_t'>))¶
-
-
class
pyzwave.commandclass.Mailbox.
Mailbox
¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class MAILBOX
-
NAME
= 'MAILBOX'¶
-
-
class
pyzwave.commandclass.Mailbox.
Mode
¶ Bases:
enum.IntFlag
Mailbox mode enum
-
DISABLE_MAILBOX
= 0¶
-
ENABLE_MAILBOX_PROXY_FORWARDING
= 2¶
-
ENABLE_MAILBOX_SERVICE
= 1¶
-
-
class
pyzwave.commandclass.Mailbox.
NodeFailing
(queueHandle)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MAILBOX MAILBOX_NODE_FAILING
-
NAME
= 'NODE_FAILING'¶
-
attributes
= (('queueHandle', <class 'pyzwave.types.uint8_t'>),)¶
-
static
parse_queueHandle
(stream: pyzwave.types.BitStreamReader)¶ Parse queueHandle from raw bitstream
-
-
class
pyzwave.commandclass.Mailbox.
Queue
(-, last, operation, queueHandle, mailboxEntry)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MAILBOX MAILBOX_QUEUE
-
NAME
= 'QUEUE'¶
-
class
Operation
¶ Bases:
enum.IntEnum
Mailbox Queue Operation enum
-
ACK
= 4¶
-
NACK
= 5¶
-
PING
= 3¶
-
POP
= 1¶
-
PUSH
= 0¶
-
QUEUE_FULL
= 6¶
-
WAITING
= 2¶
-
-
attributes
= (('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('last', <class 'pyzwave.types.flag_t'>), ('operation', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('queueHandle', <class 'pyzwave.types.uint8_t'>), ('mailboxEntry', <class 'pyzwave.types.bytes_t'>))¶
-
-
class
pyzwave.commandclass.Mailbox.
QueueFlush
(queueHandle)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MAILBOX MAILBOX_QUEUE_FLUSH
-
NAME
= 'QUEUE_FLUSH'¶
-
attributes
= (('queueHandle', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Mailbox.
WakeupNotification
(queueHandle)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MAILBOX MAILBOX_WAKEUP_NOTIFICATION
-
NAME
= 'WAKEUP_NOTIFICATION'¶
-
attributes
= (('queueHandle', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.ManufacturerSpecific.
Get
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MANUFACTURER_SPECIFIC MANUFACTURER_SPECIFIC_GET
-
NAME
= 'GET'¶
-
-
class
pyzwave.commandclass.ManufacturerSpecific.
ManufacturerSpecific
(manufacturerID, productTypeID, productID)¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class MANUFACTURER_SPECIFIC
-
NAME
= 'MANUFACTURER_SPECIFIC'¶
-
attributes
= (('manufacturerID', <class 'pyzwave.types.uint16_t'>), ('productTypeID', <class 'pyzwave.types.uint16_t'>), ('productID', <class 'pyzwave.types.uint16_t'>))¶
-
async
interview
()¶ Interview this command class. Must be implemented by subclasses. The version has already been interviewed when this method is called.
Return True if the interview was completed successfully and False or raise an exception if the interview did not complete.
-
-
class
pyzwave.commandclass.ManufacturerSpecific.
Report
(manufacturerID, productTypeID, productID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_MANUFACTURER_SPECIFIC MANUFACTURER_SPECIFIC_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('manufacturerID', <class 'pyzwave.types.uint16_t'>), ('productTypeID', <class 'pyzwave.types.uint16_t'>), ('productID', <class 'pyzwave.types.uint16_t'>))¶
-
-
class
pyzwave.commandclass.Meter.
ElectricMeterScale
¶ Bases:
enum.IntEnum
Enum for the scales for electric meter
-
A
= 5¶
-
KVAH
= 1¶
-
KWH
= 0¶
-
MST
= 7¶
-
POWER_FACTOR
= 6¶
-
PULSE_COUNT
= 3¶
-
V
= 4¶
-
W
= 2¶
-
-
class
pyzwave.commandclass.Meter.
Get
(rateType, scale, -, scale2)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_METER METER_GET
-
NAME
= 'GET'¶
-
attributes
= (('rateType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('scale', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('scale2', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.Meter.
Meter
¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class METER
-
NAME
= 'METER'¶
-
-
class
pyzwave.commandclass.Meter.
MeterType
¶ Bases:
enum.IntEnum
Enum for Meter types
-
COOLING_METER
= 5¶
-
ELECTRIC_METER
= 1¶
-
GAS_METER
= 2¶
-
HEATING_METER
= 4¶
-
WATER_METER
= 3¶
-
-
class
pyzwave.commandclass.Meter.
RateType
¶ Bases:
enum.IntEnum
Enum for rate types
-
BOTH_IMPORT_AND_EXPORT
= 3¶
-
EXPORT
= 2¶
-
IMPORT
= 1¶
-
UNSPECIFIED
= 0¶
-
-
class
pyzwave.commandclass.Meter.
Report
(scale2, rateType, meterType, meterValue, deltaTime)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_METER METER_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('scale2', <class 'pyzwave.types.flag_t'>), ('rateType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('meterType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('meterValue', <class 'pyzwave.types.float_t'>), ('deltaTime', <class 'pyzwave.types.uint16_t'>))¶
-
property
scale
¶ Return the scale for this value
-
-
class
pyzwave.commandclass.Meter.
Reset
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_METER METER_RESET
-
NAME
= 'RESET'¶
-
-
class
pyzwave.commandclass.Meter.
SupportedGet
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_METER METER_SUPPORTED_GET
-
NAME
= 'SUPPORTED_GET'¶
-
-
class
pyzwave.commandclass.Meter.
SupportedReport
(meterReset, rateType, meterType, moreScaleTypes, scaleSupported, nbrScaleSupportedBytesToFollow, scaleSupportedByteN)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_METER METER_SUPPORTED_REPORT
-
NAME
= 'SUPPORTED_REPORT'¶
-
attributes
= (('meterReset', <class 'pyzwave.types.flag_t'>), ('rateType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('meterType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('moreScaleTypes', <class 'pyzwave.types.flag_t'>), ('scaleSupported', <class 'pyzwave.types.uint7_t'>), ('nbrScaleSupportedBytesToFollow', <class 'pyzwave.types.uint8_t'>), ('scaleSupportedByteN', <class 'pyzwave.types.bytes_t'>))¶
-
-
class
pyzwave.commandclass.MultiChannelAssociation.
MultiChannelGet
(groupingIdentifier)¶ Bases:
pyzwave.commandclass.Association.Get
Command Class message COMMAND_CLASS_MULTICHANNEL_ASSOCIATION MULTI_CHANNEL_ASSOCIATION_GET
-
NAME
= 'MULTICHANNEL_GET'¶
-
-
class
pyzwave.commandclass.MultiChannelAssociation.
MultiChannelReport
(groupingIdentifier, maxNodesSupported, reportsToFollow, nodes)¶ Bases:
pyzwave.commandclass.Association.Report
Command Class message COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION_V2 MULTI_CHANNEL_ASSOCIATION_REPORT_V2
-
NAME
= 'MULTICHANNEL_REPORT'¶
-
-
class
pyzwave.commandclass.MultiChannelAssociation.
MultiChannelSet
(groupingIdentifier, nodes)¶ Bases:
pyzwave.commandclass.Association.Set
Command Class message COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION_V2 MULTI_CHANNEL_ASSOCIATION_SET_V2
-
NAME
= 'MULTICHANNEL_SET'¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
FailedNodeRemove
(seqNo, nodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION FAILED_NODE_REMOVE
-
NAME
= 'FAILED_NODE_REMOVE'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
FailedNodeRemoveStatus
(seqNo, status, nodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION FAILED_NODE_REMOVE_STATUS
-
NAME
= 'FAILED_NODE_REMOVE_STATUS'¶
-
class
Status
¶ Bases:
enum.IntEnum
Failed node remove status
-
DONE
= 1¶
-
NOT_FOUND
= 0¶
-
REMOVE_FAIL
= 2¶
-
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
FailedNodeReplace
(seqNo, nodeID, txOptions, mode)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION FAILED_NODE_REPLACE
-
NAME
= 'FAILED_NODE_REPLACE'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>), ('txOptions', <class 'pyzwave.types.uint8_t'>), ('mode', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
FailedNodeReplaceStatus
(seqNo, status, nodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION FAILED_NODE_REPLACE_STATUS
-
NAME
= 'FAILED_NODE_REPLACE_STATUS'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
IncludedNIFReport
(seqNo, dsk)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION INCLUDED_NIF_REPORT
-
NAME
= 'INCLUDED_NIF_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('dsk', <class 'pyzwave.types.dsk_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
Keys
¶ Bases:
enum.IntFlag
Keys flags for S2 bootstrapping
-
ACCESS_CONTROL_SECURITY_CLASS
= 4¶
-
AUTHENTICATED_SECURITY_CLASS
= 2¶
-
SECURITY_0_NETWORK_KEY
= 128¶
-
UNAUTHENTICATED_SECURITY_CLASS
= 1¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeAdd
(seqNo, -, mode, txOptions)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_ADD
-
NAME
= 'NODE_ADD'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('mode', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('txOptions', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeAddDSKReport
(seqNo, -, inputDSKLength, dsk)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_ADD_DSK_REPORT
-
NAME
= 'NODE_ADD_DSK_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('inputDSKLength', <class 'pyzwave.types.uint4_t'>), ('dsk', <class 'pyzwave.types.dsk_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeAddDSKSet
(seqNo, accept, -, inputDSKLength, dsk)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_ADD_DSK_SET
-
NAME
= 'NODE_ADD_DSK_SET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('accept', <class 'pyzwave.types.flag_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('inputDSKLength', <class 'pyzwave.types.uint4_t'>), ('dsk', <class 'pyzwave.types.dsk_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeAddKeysReport
(seqNo, -, requestCSA, requestedKeys)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_ADD_KEYS_REPORT
-
NAME
= 'NODE_ADD_KEYS_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('requestCSA', <class 'pyzwave.types.flag_t'>), ('requestedKeys', <class 'pyzwave.types.enum_t.<locals>.enum_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeAddKeysSet
(seqNo, -, grantCSA, accept, grantedKeys)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_ADD_KEYS_SET
-
NAME
= 'NODE_ADD_KEYS_SET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('grantCSA', <class 'pyzwave.types.flag_t'>), ('accept', <class 'pyzwave.types.flag_t'>), ('grantedKeys', <class 'pyzwave.types.enum_t.<locals>.enum_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeAddStatus
(seqNo, status, -, newNodeID, nodeInfoLength, listening, zwaveProtocolSpecific, optFunc, zwaveProtocolSpecific, basicDeviceClass, genericDeviceClass, specificDeviceClass, commandClass)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_ADD_STATUS
-
NAME
= 'NODE_ADD_STATUS'¶
-
class
Status
¶ Bases:
enum.IntEnum
Add node status
-
ADD_SLAVE
= 3¶
-
DONE
= 6¶
-
FAILED
= 7¶
-
NODE_FOUND
= 2¶
-
PROTOCOL_DONE
= 5¶
-
SECURITY_FAILED
= 9¶
-
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('newNodeID', <class 'pyzwave.types.uint8_t'>), ('nodeInfoLength', <class 'pyzwave.types.uint8_t'>), ('listening', <class 'pyzwave.types.flag_t'>), ('zwaveProtocolSpecific', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('optFunc', <class 'pyzwave.types.flag_t'>), ('zwaveProtocolSpecific', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('basicDeviceClass', <class 'pyzwave.types.uint8_t'>), ('genericDeviceClass', <class 'pyzwave.types.uint8_t'>), ('specificDeviceClass', <class 'pyzwave.types.uint8_t'>), ('commandClass', <class 'list'>))¶
-
parse_commandClass
(stream: pyzwave.types.BitStreamReader)¶ Parse the length prefixed command
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeNeightborUpdateRequest
(seqNo, nodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_NEIGHBOR_UPDATE_REQUEST
-
NAME
= 'NODE_NEIGHBOR_UPDATE_REQUEST'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeNeightborUpdateStatus
(seqNo, status)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_NEIGHBOR_UPDATE_STATUS
-
NAME
= 'NODE_NEIGHBOR_UPDATE_STATUS'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeRemove
(seqNo, -, mode)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_REMOVE
-
NAME
= 'NODE_REMOVE'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('mode', <class 'pyzwave.types.enum_t.<locals>.enum_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
NodeRemoveStatus
(seqNo, status, nodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION NODE_REMOVE_STATUS
-
NAME
= 'NODE_REMOVE_STATUS'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
ReturnRouteAssign
(seqNo, sourceNodeID, destinationNodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION RETURN_ROUTE_ASSIGN
-
NAME
= 'RETURN_ROUTE_ASSIGN'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('sourceNodeID', <class 'pyzwave.types.uint8_t'>), ('destinationNodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
ReturnRouteAssignComplete
(seqNo, status)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION RETURN_ROUTE_ASSIGN_COMPLETE
-
NAME
= 'RETURN_ROUTE_ASSIGN_COMPLETE'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
ReturnRouteDelete
(seqNo, nodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION RETURN_ROUTE_DELETE
-
NAME
= 'RETURN_ROUTE_DELETE'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
ReturnRouteDeleteComplete
(seqNo, status)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION RETURN_ROUTE_DELETE_COMPLETE
-
NAME
= 'RETURN_ROUTE_DELETE_COMPLETE'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementInclusion.
SmartStartJoinStartedReport
(seqNo, dsk)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION SMART_START_JOIN_STARTED_REPORT
-
NAME
= 'SMART_START_JOIN_STARTED_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('dsk', <class 'pyzwave.types.dsk_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
FailedNodeListGet
(seqNo)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY COMMAND_FAILED_NODE_LIST_GET
-
NAME
= 'COMMAND_FAILED_NODE_LIST_GET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
FailedNodeListReport
(seqNo, failedNodeList)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY COMMAND_FAILED_NODE_LIST_REPORT
-
NAME
= 'COMMAND_FAILED_NODE_LIST_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('failedNodeList', <class 'pyzwave.commandclass.NetworkManagementProxy.NodeList'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
MultiChannelCapabilityGet
(seqNo, nodeID, -, endPoint)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY NM_MULTI_CHANNEL_CAPABILITY_GET
-
NAME
= 'NM_MULTI_CHANNEL_CAPABILITY_GET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('endPoint', <class 'pyzwave.types.uint7_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
MultiChannelCapabilityReport
(seqNo, nodeID, commandClassLength, -, endPoint, genericDeviceClass, specificDeviceClass, commandClass)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY NM_MULTI_CHANNEL_CAPABILITY_REPORT
-
NAME
= 'NM_MULTI_CHANNEL_CAPABILITY_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>), ('commandClassLength', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('endPoint', <class 'pyzwave.types.uint7_t'>), ('genericDeviceClass', <class 'pyzwave.types.uint8_t'>), ('specificDeviceClass', <class 'pyzwave.types.uint8_t'>), ('commandClass', <class 'pyzwave.types.bytes_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
MultiChannelEndPointGet
(seqNo, nodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY NM_MULTI_CHANNEL_END_POINT_GET
-
NAME
= 'NM_MULTI_CHANNEL_END_POINT_GET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
MultiChannelEndPointReport
(seqNo, nodeID, -, -, individualEndPoints, -, aggregatedEndPoints)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY NM_MULTI_CHANNEL_END_POINT_REPORT
-
NAME
= 'NM_MULTI_CHANNEL_END_POINT_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('individualEndPoints', <class 'pyzwave.types.uint7_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('aggregatedEndPoints', <class 'pyzwave.types.uint7_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
NodeInfoCachedGet
(seqNo, -, maxAge, nodeID)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY NODE_INFO_CACHED_GET
-
NAME
= 'NODE_INFO_CACHED_GET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('maxAge', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('nodeID', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
NodeInfoCachedReport
(seqNo, status, age, listening, zwaveProtocolSpecific, optFunc, zwaveProtocolSpecific, -, basicDeviceClass, genericDeviceClass, specificDeviceClass, commandClass)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY NODE_INFO_CACHED_REPORT
-
NAME
= 'NODE_INFO_CACHED_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('age', <class 'pyzwave.types.uint4_t'>), ('listening', <class 'pyzwave.types.flag_t'>), ('zwaveProtocolSpecific', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('optFunc', <class 'pyzwave.types.flag_t'>), ('zwaveProtocolSpecific', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('basicDeviceClass', <class 'pyzwave.types.uint8_t'>), ('genericDeviceClass', <class 'pyzwave.types.uint8_t'>), ('specificDeviceClass', <class 'pyzwave.types.uint8_t'>), ('commandClass', <class 'pyzwave.types.bytes_t'>))¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
NodeList
¶ Bases:
set
Deserializer for nodelist returned in NODE_LIST_REPORT
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize nodes from stream
-
classmethod
-
class
pyzwave.commandclass.NetworkManagementProxy.
NodeListGet
(seqNo)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY NODE_LIST_GET
-
NAME
= 'NODE_LIST_GET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.NetworkManagementProxy.
NodeListReport
(seqNo, status, nodeListControllerId, nodes)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NETWORK_MANAGEMENT_PROXY NODE_LIST_REPORT
-
NAME
= 'NODE_LIST_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('status', <class 'pyzwave.types.uint8_t'>), ('nodeListControllerId', <class 'pyzwave.types.uint8_t'>), ('nodes', <class 'pyzwave.commandclass.NetworkManagementProxy.NodeList'>))¶
-
-
class
pyzwave.commandclass.NodeProvisioning.
ListIterationGet
(seqNo, remainingCounter)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NODE_PROVISIONING COMMAND_NODE_PROVISIONING_LIST_ITERATION_GET
-
NAME
= 'LIST_ITERATION_GET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('remainingCounter', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.NodeProvisioning.
ListIterationReport
(seqNo, remainingCount, -, dskLengthN, dsk, metaDataExtension)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NODE_PROVISIONING COMMAND_NODE_PROVISIONING_LIST_ITERATION_REPORT
-
NAME
= 'LIST_ITERATION_REPORT'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('remainingCount', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('dskLengthN', <class 'pyzwave.types.uint5_t'>), ('dsk', <class 'pyzwave.types.dsk_t'>), ('metaDataExtension', <class 'pyzwave.commandclass.NodeProvisioning.MetadataExtension'>))¶
-
parse_dsk
(stream: pyzwave.types.BitStreamReader)¶ Parse attribute dsk
-
-
class
pyzwave.commandclass.NodeProvisioning.
MetadataExtension
¶ Bases:
pyzwave.commandclass.CommandClass.VarDictAttributeType
Metadata extension type
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize metadata extension
-
classmethod
-
class
pyzwave.commandclass.NodeProvisioning.
MetadataExtensionType
¶ Bases:
enum.IntEnum
Metadata extension type enum
-
ADVANCED_JOINING
= 53¶
-
BOOTSTRAPPING_MODE
= 54¶
-
LOCATION
= 51¶
-
MAX_INCLUSION_REQUEST_INTERVAL
= 2¶
-
NAME
= 50¶
-
NETWORK_STATUS
= 55¶
-
PRODUCT_ID
= 1¶
-
PRODUCT_TYPE
= 0¶
-
SMART_START_INCLUSION_SETTING
= 52¶
-
UUID16
= 3¶
-
-
class
pyzwave.commandclass.NodeProvisioning.
Set
(seqNo, dsk, metaDataExtension)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_NODE_PROVISIONING NODE_PROVISIONING_SET
-
NAME
= 'NODE_PROVISIONING_SET'¶
-
attributes
= (('seqNo', <class 'pyzwave.types.uint8_t'>), ('dsk', <class 'pyzwave.types.dsk_t'>), ('metaDataExtension', <class 'pyzwave.types.bytes_t'>))¶
-
-
class
pyzwave.commandclass.SensorMultilevel.
Get
(sensorType, -, scale, -)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SENSOR_MULTILEVEL SENSOR_MULTILEVEL_GET
-
NAME
= 'GET'¶
-
attributes
= (('sensorType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('scale', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>))¶
-
-
class
pyzwave.commandclass.SensorMultilevel.
Report
(sensorType, sensorValue)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SENSOR_MULTILEVEL SENSOR_MULTILEVEL_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('sensorType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('sensorValue', <class 'pyzwave.types.float_t'>))¶
-
-
class
pyzwave.commandclass.SensorMultilevel.
SensorMultilevel
(supportedTypes)¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class SENSOR_MULTILEVEL
-
NAME
= 'SENSOR_MULTILEVEL'¶
-
attributes
= (('supportedTypes', <class 'pyzwave.commandclass.CommandClass.VarDictAttribute.<locals>.VarDictAttributeType'>),)¶
-
async
interview
()¶ Interview this command class. Must be implemented by subclasses. The version has already been interviewed when this method is called.
Return True if the interview was completed successfully and False or raise an exception if the interview did not complete.
-
-
class
pyzwave.commandclass.SensorMultilevel.
SensorSupported
¶ Bases:
set
Deserializer for sensor types returned in SUPPORTED_SENSOR_REPORT
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize types from stream
-
classmethod
-
class
pyzwave.commandclass.SensorMultilevel.
SensorType
¶ Bases:
enum.IntEnum
Enum for sensor types
-
BAROMETRIC_PRESSURE
= 9¶
-
CO
= 40¶
-
CO2
= 17¶
-
DEW_POINT
= 11¶
-
GENERAL_PURPOSE
= 2¶
-
HUMIDITY
= 5¶
-
LOUDNESS
= 30¶
-
LUMINANCE
= 3¶
-
MOISTURE
= 31¶
-
PM25
= 35¶
-
POWER
= 4¶
-
RAIN_RATE
= 12¶
-
TEMPERATURE
= 1¶
-
UV
= 27¶
-
VELOCITY
= 6¶
-
VOLTAGE
= 15¶
-
VOLUME
= 19¶
-
WEIGHT
= 14¶
-
-
class
pyzwave.commandclass.SensorMultilevel.
SupportedGetScale
(sensorType)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SENSOR_MULTILEVEL SENSOR_MULTILEVEL_SUPPORTED_GET_SCALE
-
NAME
= 'SUPPORTED_GET_SCALE'¶
-
attributes
= (('sensorType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>),)¶
-
-
class
pyzwave.commandclass.SensorMultilevel.
SupportedGetSensor
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SENSOR_MULTILEVEL SENSOR_MULTILEVEL_SUPPORTED_GET_SENSOR_V5
-
NAME
= 'SUPPORTED_GET_SENSOR'¶
-
-
class
pyzwave.commandclass.SensorMultilevel.
SupportedScaleReport
(sensorType, -, scaleBitMask)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SENSOR_MULTILEVEL SENSOR_MULTILEVEL_SUPPORTED_SCALE_REPORT
-
NAME
= 'SUPPORTED_SCALE_REPORT'¶
-
attributes
= (('sensorType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('scaleBitMask', <class 'pyzwave.types.bits_t.<locals>.bits_t'>))¶
-
-
class
pyzwave.commandclass.SensorMultilevel.
SupportedSensorReport
(bitMask)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SENSOR_MULTILEVEL SENSOR_MULTILEVEL_SUPPORTED_SENSOR_REPORT_V5
-
NAME
= 'SUPPORTED_SENSOR_REPORT'¶
-
attributes
= (('bitMask', <class 'pyzwave.commandclass.SensorMultilevel.SensorSupported'>),)¶
-
-
class
pyzwave.commandclass.Supervision.
Get
(statusUpdates, -, sessionID, command)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SUPERVISION SUPERVISION_GET
-
NAME
= 'SUPERVISION_GET'¶
-
attributes
= (('statusUpdates', <class 'pyzwave.types.flag_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('sessionID', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('command', <class 'pyzwave.message.Message'>))¶
-
static
parse_command
(stream: pyzwave.types.BitStreamReader)¶ Parse the length prefixed command
-
-
class
pyzwave.commandclass.Supervision.
Report
(moreStatusUpdates, wakeUpRequest, sessionID, status, duration)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SUPERVISION SUPERVISION_REPORT
-
NAME
= 'SUPERVISION_REPORT'¶
-
attributes
= (('moreStatusUpdates', <class 'pyzwave.types.flag_t'>), ('wakeUpRequest', <class 'pyzwave.types.flag_t'>), ('sessionID', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('status', <class 'pyzwave.types.uint8_t'>), ('duration', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.SwitchBinary.
Get
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SWITCH_BINARY SWITCH_BINARY_GET
-
NAME
= 'GET'¶
-
-
class
pyzwave.commandclass.SwitchBinary.
Report
(value)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SWITCH_BINARY SWITCH_BINARY_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('value', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.SwitchBinary.
Set
(value)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_SWITCH_BINARY SWITCH_BINARY_SET
-
NAME
= 'SET'¶
-
attributes
= (('value', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Version.
Version
(zwaveLibraryType, zwaveProtocolVersion, zwaveProtocolSubVersion, applicationVersion, applicationSubVersion)¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class COMMAND_CLASS_VERSION
-
NAME
= 'VERSION'¶
-
attributes
= (('zwaveLibraryType', <class 'pyzwave.types.uint8_t'>), ('zwaveProtocolVersion', <class 'pyzwave.types.uint8_t'>), ('zwaveProtocolSubVersion', <class 'pyzwave.types.uint8_t'>), ('applicationVersion', <class 'pyzwave.types.uint8_t'>), ('applicationSubVersion', <class 'pyzwave.types.uint8_t'>))¶
-
async
interview
()¶ Interview this command class. Must be implemented by subclasses. The version has already been interviewed when this method is called.
Return True if the interview was completed successfully and False or raise an exception if the interview did not complete.
-
-
class
pyzwave.commandclass.Version.
VersionCommandClassGet
(requestedCommandClass)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_VERSION VERSION_COMMAND_CLASS_GET
-
NAME
= 'VERSION_COMMAND_CLASS_GET'¶
-
attributes
= (('requestedCommandClass', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.Version.
VersionCommandClassReport
(requestedCommandClass, commandClassVersion)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_VERSION VERSION_COMMAND_CLASS_REPORT
-
NAME
= 'VERSION_COMMAND_CLASS_REPORT'¶
-
attributes
= (('requestedCommandClass', <class 'pyzwave.types.uint8_t'>), ('commandClassVersion', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.Version.
VersionGet
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_VERSION VERSION_GET
-
NAME
= 'VERSION_GET'¶
-
-
class
pyzwave.commandclass.Version.
VersionReport
(zwaveLibraryType, zwaveProtocolVersion, zwaveProtocolSubVersion, applicationVersion, applicationSubVersion)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_VERSION VERSION_REPORT
-
NAME
= 'VERSION_REPORT'¶
-
attributes
= (('zwaveLibraryType', <class 'pyzwave.types.uint8_t'>), ('zwaveProtocolVersion', <class 'pyzwave.types.uint8_t'>), ('zwaveProtocolSubVersion', <class 'pyzwave.types.uint8_t'>), ('applicationVersion', <class 'pyzwave.types.uint8_t'>), ('applicationSubVersion', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.Zip.
HeaderExtension
¶ Bases:
pyzwave.commandclass.CommandClass.VarDictAttributeType
Decoder type for header extensions in Command Class message ZIP_PACKET
-
default
= {}¶
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize header extension from stream
-
property
expectedDelay
¶ Returns the expected delay for sleeping nodes
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize header extension into stream
-
-
class
pyzwave.commandclass.Zip.
IMEAckChannel
¶ Bases:
pyzwave.commandclass.Zip.IMEValue
,pyzwave.types.uint8_t
Ack channel
-
class
pyzwave.commandclass.Zip.
IMELastWorkingRoute
(repeater1, repeater2, repeater3, repeater4, speed)¶ Bases:
pyzwave.commandclass.Zip.IMEValue
,pyzwave.util.AttributesMixin
Last working route
-
class
Speed
¶ Bases:
enum.IntEnum
Communication speed
-
SPEED_100_KBIT_S
= 3¶
-
SPEED_40_KBIT_S
= 2¶
-
SPEED_9_6_KBIT_S
= 1¶
-
-
attributes
= (('repeater1', <class 'pyzwave.types.uint8_t'>), ('repeater2', <class 'pyzwave.types.uint8_t'>), ('repeater3', <class 'pyzwave.types.uint8_t'>), ('repeater4', <class 'pyzwave.types.uint8_t'>), ('speed', <class 'pyzwave.types.enum_t.<locals>.enum_t'>))¶
-
classmethod
load
(value)¶ Load IME value
-
class
-
class
pyzwave.commandclass.Zip.
IMERouteChanged
¶ Bases:
pyzwave.commandclass.Zip.IMEValue
,pyzwave.types.uint8_t
Route changed
-
class
pyzwave.commandclass.Zip.
IMETransmissionTime
¶ Bases:
pyzwave.commandclass.Zip.IMEValue
,pyzwave.types.uint16_t
Transmission time
-
class
pyzwave.commandclass.Zip.
IMETransmitChannel
¶ Bases:
pyzwave.commandclass.Zip.IMEValue
,pyzwave.types.uint8_t
Transmit channel
-
class
pyzwave.commandclass.Zip.
IMEType
¶ Bases:
enum.IntEnum
IME Type
-
ACK_CHANNEL
= 4¶
-
LAST_FAILED_LINK
= 8¶
-
LAST_WORKING_ROUTE
= 2¶
-
ROUTE_CHANGED
= 0¶
-
ROUTING_ATTEMPTS
= 7¶
-
ROUTING_SCHEME
= 6¶
-
RSSI
= 3¶
-
TRANSMISION_TIME
= 1¶
-
TRANSMIT_CHANNEL
= 5¶
-
-
class
pyzwave.commandclass.Zip.
IMEUnknownValue
¶ Bases:
pyzwave.commandclass.Zip.IMEValue
,pyzwave.types.bytes_t
Type not yet implemented
-
class
pyzwave.commandclass.Zip.
IMEValue
¶ Bases:
object
Default base type for IME values
-
classmethod
load
(value)¶ Load IME value
-
classmethod
-
class
pyzwave.commandclass.Zip.
ZIPPacketOption
(critical, optionType, optionData)¶ Bases:
pyzwave.util.AttributesMixin
ZIP Packet option
-
attributes
= (('critical', <class 'pyzwave.types.flag_t'>), ('optionType', <class 'pyzwave.types.enum_t.<locals>.enum_t'>), ('optionData', <class 'pyzwave.commandclass.Zip.ZIPPacketOptionData'>))¶
-
parse_optionData
(stream: pyzwave.types.BitStreamReader)¶ Parse attribute optionData
-
-
class
pyzwave.commandclass.Zip.
ZIPPacketOptionData
¶ Bases:
object
ZIP Packet Option Data
-
class
pyzwave.commandclass.Zip.
ZIPPacketOptionEncapsulationFormatInfo
(security2SecurityClass, -, crc16)¶ Bases:
pyzwave.commandclass.Zip.ZIPPacketOptionData
,pyzwave.util.AttributesMixin
Zip packet option encapsulation format info
-
attributes
= (('security2SecurityClass', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('crc16', <class 'pyzwave.types.flag_t'>))¶
-
-
class
pyzwave.commandclass.Zip.
ZIPPacketOptionExpectedDelay
¶ Bases:
pyzwave.commandclass.Zip.ZIPPacketOptionData
,pyzwave.types.int24_t
Zip Packet option expexted delay
-
class
pyzwave.commandclass.Zip.
ZIPPacketOptionMaintenanceReport
¶ Bases:
pyzwave.commandclass.Zip.ZIPPacketOptionData
,pyzwave.commandclass.CommandClass.VarDictAttributeType
Maintenance report
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize ZIP Maintenance Report
-
classmethod
-
class
pyzwave.commandclass.Zip.
ZIPPacketOptionType
¶ Bases:
enum.IntEnum
ZIP Packet option type
-
ENCAPSULATION_FORMAT_INFORMATION
= 4¶
-
EXPECTED_DELAY
= 1¶
-
MAINTENANCE_GET
= 2¶
-
MAINTENANCE_REPORT
= 3¶
-
ZWAVE_MULTICAST_ADDRESSING
= 5¶
-
-
class
pyzwave.commandclass.Zip.
ZipKeepAlive
(ackRequest, ackResponse, _)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ZIP COMMAND_ZIP_KEEP_ALIVE
-
NAME
= 'ZIP_KEEP_ALIVE'¶
-
attributes
= (('ackRequest', <class 'pyzwave.types.flag_t'>), ('ackResponse', <class 'pyzwave.types.flag_t'>), ('_', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>))¶
-
-
class
pyzwave.commandclass.Zip.
ZipPacket
(ackRequest, ackResponse, nackResponse, nackWaiting, nackQueueFull, nackOptionError, _, headerExtIncluded, zwCmdIncluded, moreInformation, secureOrigin, _, seqNo, -, sourceEP, -, destEP, headerExtension, command)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ZIP COMMAND_ZIP_PACKET
-
NAME
= 'ZIP_PACKET'¶
-
attributes
= (('ackRequest', <class 'pyzwave.types.flag_t'>), ('ackResponse', <class 'pyzwave.types.flag_t'>), ('nackResponse', <class 'pyzwave.types.flag_t'>), ('nackWaiting', <class 'pyzwave.types.flag_t'>), ('nackQueueFull', <class 'pyzwave.types.flag_t'>), ('nackOptionError', <class 'pyzwave.types.flag_t'>), ('_', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('headerExtIncluded', <class 'pyzwave.types.flag_t'>), ('zwCmdIncluded', <class 'pyzwave.types.flag_t'>), ('moreInformation', <class 'pyzwave.types.flag_t'>), ('secureOrigin', <class 'pyzwave.types.flag_t'>), ('_', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('seqNo', <class 'pyzwave.types.uint8_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('sourceEP', <class 'pyzwave.types.uint7_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('destEP', <class 'pyzwave.types.uint7_t'>), ('headerExtension', <class 'pyzwave.commandclass.Zip.HeaderExtension'>), ('command', <class 'pyzwave.message.Message'>))¶
-
parse_headerExtension
(stream: pyzwave.types.BitStreamReader)¶ Parse header extension if supplied
-
response
(success: bool, nackWaiting: bool = False, nackQueueFull: bool = False, nackOptionError: bool = False) → pyzwave.message.Message¶ Generate an ackResponse for this messsage. Use if ackRequest is set
-
-
class
pyzwave.commandclass.ZipGateway.
ApplicationNodeInfoSet
(commandClasses)¶ Bases:
pyzwave.message.Message
Command Class Message COMMAND_CLASS_ZIP_GATEWAY COMMAND_APPLICATION_NODE_INFO_SET
-
NAME
= 'COMMAND_APPLICATION_NODE_INFO_SET'¶
-
attributes
= (('commandClasses', <class 'pyzwave.types.bytes_t'>),)¶
-
-
class
pyzwave.commandclass.ZipGateway.
GatewayModeGet
¶ Bases:
pyzwave.message.Message
Command Class Message COMMAND_CLASS_ZIP_GATEWAY GATEWAY_MODE_GET
-
NAME
= 'GATEWAY_MODE_GET'¶
-
-
class
pyzwave.commandclass.ZipGateway.
GatewayModeReport
(mode)¶ Bases:
pyzwave.message.Message
Command Class Message COMMAND_CLASS_ZIP_GATEWAY GATEWAY_MODE_REPORT
-
NAME
= 'GATEWAY_MODE_REPORT'¶
-
attributes
= (('mode', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.ZipGateway.
GatewayModeSet
(mode)¶ Bases:
pyzwave.message.Message
Command Class Message COMMAND_CLASS_ZIP_GATEWAY GATEWAY_MODE_SET
-
NAME
= 'GATEWAY_MODE_SET'¶
-
attributes
= (('mode', <class 'pyzwave.types.uint8_t'>),)¶
-
-
class
pyzwave.commandclass.ZipGateway.
GatewayPeerSet
(peerProfile, ipv6, port, -, peerNameLength)¶ Bases:
pyzwave.message.Message
Command Class Message COMMAND_CLASS_ZIP_GATEWAY GATEWAY_PEER_SET
-
NAME
= 'GATEWAY_PEER_SET'¶
-
attributes
= (('peerProfile', <class 'pyzwave.types.uint8_t'>), ('ipv6', <class 'pyzwave.types.IPv6'>), ('port', <class 'pyzwave.types.uint16_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('peerNameLength', <class 'pyzwave.types.bits_t.<locals>.bits_t'>))¶
-
-
class
pyzwave.commandclass.ZipGateway.
UnsolicitedDestinationSet
(unsolicitedIPv6Destination, port)¶ Bases:
pyzwave.message.Message
Command Class Message COMMAND_CLASS_ZIP_GATEWAY UNSOLICITED_DESTINATION_SET
-
NAME
= 'UNSOLICITED_DESTINATION_SET'¶
-
attributes
= (('unsolicitedIPv6Destination', <class 'pyzwave.types.IPv6'>), ('port', <class 'pyzwave.types.uint16_t'>))¶
-
-
class
pyzwave.commandclass.ZipND.
ZipInvNodeSolicitation
(-, local, -, nodeId)¶ Bases:
pyzwave.message.Message
Command Class Message COMMAND_CLASS_ZIP_ND ZIP_INV_NODE_SOLICITATION
-
NAME
= 'ZIP_INV_NODE_SOLICITATION'¶
-
attributes
= (('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('local', <class 'pyzwave.types.flag_t'>), ('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('nodeId', <class 'pyzwave.types.uint8_t'>))¶
-
-
class
pyzwave.commandclass.ZipND.
ZipNodeAdvertisement
(-, local, validity, nodeId, ipv6, homeId)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ZIP_ND ZIP_NODE_ADVERTISEMENT
-
NAME
= 'ZIP_NODE_ADVERTISEMENT'¶
-
attributes
= (('-', <class 'pyzwave.types.reserved_t.<locals>.reserved_t'>), ('local', <class 'pyzwave.types.flag_t'>), ('validity', <class 'pyzwave.types.bits_t.<locals>.bits_t'>), ('nodeId', <class 'pyzwave.types.uint8_t'>), ('ipv6', <class 'pyzwave.types.IPv6'>), ('homeId', <class 'pyzwave.types.HomeID'>))¶
-
-
class
pyzwave.commandclass.ZwavePlusInfo.
Get
¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ZWAVEPLUS_INFO ZWAVEPLUS_INFO_GET
-
NAME
= 'GET'¶
-
-
class
pyzwave.commandclass.ZwavePlusInfo.
Report
(zwavePlusVersion, roleType, nodeType, installerIconType, userIconType)¶ Bases:
pyzwave.message.Message
Command Class message COMMAND_CLASS_ZWAVEPLUS_INFO ZWAVEPLUS_INFO_REPORT
-
NAME
= 'REPORT'¶
-
attributes
= (('zwavePlusVersion', <class 'pyzwave.types.uint8_t'>), ('roleType', <class 'pyzwave.types.uint8_t'>), ('nodeType', <class 'pyzwave.types.uint8_t'>), ('installerIconType', <class 'pyzwave.types.uint16_t'>), ('userIconType', <class 'pyzwave.types.uint16_t'>))¶
-
-
class
pyzwave.commandclass.ZwavePlusInfo.
ZwavePlusInfo
(zwavePlusVersion, roleType, nodeType, installerIconType, userIconType)¶ Bases:
pyzwave.commandclass.CommandClass.CommandClass
Command Class COMMAND_CLASS_ZWAVEPLUS_INFO
-
NAME
= 'ZWAVEPLUS_INFO'¶
-
attributes
= (('zwavePlusVersion', <class 'pyzwave.types.uint8_t'>), ('roleType', <class 'pyzwave.types.uint8_t'>), ('nodeType', <class 'pyzwave.types.uint8_t'>), ('installerIconType', <class 'pyzwave.types.uint16_t'>), ('userIconType', <class 'pyzwave.types.uint16_t'>))¶
-
async
interview
()¶ Interview this command class. Must be implemented by subclasses. The version has already been interviewed when this method is called.
Return True if the interview was completed successfully and False or raise an exception if the interview did not complete.
-
Module contents¶
-
class
pyzwave.commandclass.
CommandClassCollection
¶ Bases:
dict
Decorator for registering a CommandClass to the system
-
class
pyzwave.commandclass.
CommandClassMessageCollection
¶ Bases:
dict
Decorator for registering a CommandClass message to the system
-
class
pyzwave.commandclass.
ZWaveMessageHandler
(message)¶ Bases:
object
Decorator for functions handeling command class messages
-
pyzwave.commandclass.
registerCmdClass
(cmdClass, name)¶ Function for registering the name of a command class to make output prettier
Submodules¶
pyzwave.adapter module¶
-
class
pyzwave.adapter.
Ack
¶ Bases:
object
Class for holding session informaion
-
queued
(expectedDelay: int)¶ Call this function when the message cannot be delivered right now
-
received
()¶ Call this function when this ack has been received
-
async
wait
(timeout)¶ Wait until the node ack the message
-
-
class
pyzwave.adapter.
Adapter
¶ Bases:
pyzwave.util.Listenable
,pyzwave.util.MessageWaiter
Abstract class for implementing communication with a Z-Wave chip
-
ackReceived
(zipPkt: pyzwave.commandclass.Zip.ZipPacket)¶ Call this method when an ack message has been received
-
abstract async
addNode
(txOptions: pyzwave.adapter.TxOptions) → bool¶ Start inclusion mode in the controller
-
abstract async
addNodeDSKSet
(accept: bool, inputDSKLength: int, dsk: pyzwave.types.dsk_t) → bool¶ This command is used to indicate the S2 bootstrapping controller if the DSK is accepted and report the user input when needed.
-
abstract async
addNodeKeysSet
(grantCSA: bool, accept: bool, grantedKeys: pyzwave.commandclass.NetworkManagementInclusion.Keys) → bool¶ This command is used to inform an S2 bootstrapping controller which keys must be granted to the node being bootstrapped.
-
abstract async
addNodeStop
() → bool¶ Stop inclusion mode in the controller
-
commandReceived
(cmd: pyzwave.message.Message)¶ Call this method when a command has been received
-
abstract async
connect
()¶ Connect the adapter. Must be implemented by subclass
-
abstract async
getFailedNodeList
() → list¶ Return a list of failing nodes
-
abstract async
getMultiChannelCapability
(nodeId: int, endpoint: int) → pyzwave.commandclass.NetworkManagementProxy.MultiChannelCapabilityReport¶ Return the multi channel capabilities for an endpoint in a node
-
abstract async
getMultiChannelEndPoints
(nodeId: int) → int¶ Return the number of multi channel end points implemented by a node
-
abstract async
getNodeInfo
(nodeId: int) → pyzwave.commandclass.NetworkManagementProxy.NodeInfoCachedReport¶ Return the node info from this node. Possibly cached
-
abstract async
getNodeList
() → set¶ Return a list of nodes included in the network
-
property
nodeId
¶ Return the node id of the controller
-
abstract async
removeFailedNode
(nodeId: int) → pyzwave.commandclass.NetworkManagementInclusion.FailedNodeRemoveStatus.Status¶ Remove a non-responding node
-
abstract async
removeNode
() → bool¶ Start exclusion mode in the controller
-
abstract async
removeNodeStop
() → bool¶ Stop exclusion mode in the controller
-
abstract async
send
(cmd: pyzwave.message.Message, sourceEP: int = 0, destEP: int = 0, timeout: int = 3) → bool¶ Send message to Z-Wave chip. Must be implemented in subclass.
Warning
This command will block until the message has been ACKed by the node.
When talking to battery operated (sleeping) nodes this command will block until the nodes wakes up or is considered dead. This can be a long time (week or even months). Please make sure the code can handle this.
-
async
sendAndReceive
(cmd: pyzwave.message.Message, waitFor: pyzwave.message.Message, timeout: int = 3, **kwargs) → pyzwave.message.Message¶ Send a message and wait for the response
-
async
sendToNode
(nodeId: int, cmd: pyzwave.message.Message, **kwargs) → bool¶ Send message to node. Must be implemented in subclass
-
abstract async
setNodeInfo
(generic, specific, cmdClasses)¶ Set the application NIF (Node Information Frame). This method should not be called directly. Use the corresponding function in Application instead.
-
async
waitForAck
(ackId: int, timeout: int = 3)¶ Async method for waiting for the adapter to receive a specific ack id
-
pyzwave.application module¶
-
class
pyzwave.application.
Application
(adapter: pyzwave.adapter.Adapter, storage: pyzwave.persistantstorage.PersistantStorage)¶ Bases:
pyzwave.util.Listenable
Base class for managing the Z-Wave system
-
async
loadEndPointNode
(node: pyzwave.node.Node, endpoint: int)¶ Load an endpoint for a node
-
async
loadNode
(nodeId: int) → list¶ Load a node
-
async
messageReceived
(_sender, rootNodeId: int, endPoint: int, message: pyzwave.message.Message, flags: pyzwave.commandclass.Zip.HeaderExtension)¶ Called when a message is received from a node
-
async
nodeListUpdated
(_sender)¶ Called when the node list has been updated
-
property
nodes
¶ All nodes in the network
-
async
onMessageReceived
(_speaker: Any, msg: pyzwave.message.Message) → bool¶ Listener method from the adapter for any unhandled messages
-
setNodeInfo
(generic, specific, cmdClasses)¶ Set the application NIF (Node Information Frame)
-
async
shutdown
()¶ Shut down the application gracefully
-
async
startup
()¶ Start and initialize the application and the adapter
-
async
pyzwave.connection module¶
-
class
pyzwave.connection.
Connection
¶ Bases:
object
Connection object to create a non encrypted connection using PSK
-
async
connect
(address, psk)¶ Connect to remote using psk
-
async
listen
(psk, port)¶ Start server socket
-
onMessage
(cbfn)¶ Set the callback function to use when data has arrived
-
async
run
(onConLost)¶
-
send
(msg) → bool¶ Send bytes to socket
-
sendTo
(msg, address) → bool¶ Send bytes to address
-
stop
()¶ Stop the thread
-
async
-
class
pyzwave.connection.
ZipClientProtocol
(onConLost, onMessage)¶ Bases:
object
Internal ZIP Client protocol implementation
-
connection_lost
(exc)¶ Called when connection is lost
-
connection_made
(transport)¶ Called when a new connection is made
-
datagram_received
(data, addr)¶ Called when a new udp packet has arrived
-
error_received
(exc)¶ Called when error happens
-
pyzwave.dtlsconnection module¶
-
class
pyzwave.dtlsconnection.
DTLSConnection
¶ Bases:
threading.Thread
Connection object to create a DTLS connection using PSK
-
clientCb
(_ssl, where, ret)¶
-
clientPskCb
(_ssl, _hint, identity, _maxIdenityLen, cpsk, _maxPskLen)¶ Callback function used by ssl to get the DTLS psk
-
async
connect
(address, psk)¶ Connect to remote using psk
-
createDtlsPskSock
()¶ Create a new socket and configure it for DTLS PSK
-
listen
(psk)¶ Start server socket
-
onMessage
(cbfn)¶ Set the callback function to use when data has arrived
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
send
(msg)¶ Send bytes to socket
-
serverPskCb
(_ssl, _identity, cpsk, _maxPskLen)¶ Callback function used by ssl to get the DTLS psk
-
stop
()¶ Stop the thread
-
pyzwave.mailbox module¶
-
class
pyzwave.mailbox.
MailboxService
(adapter)¶ Bases:
object
Mailbox for storing messages for sleeping nodes
-
async
initialize
(ipaddress: ipaddress.IPv6Address, port: int) → bool¶ Initialize the mailbox
-
async
messageReceived
(_sender, rootNodeId: int, _endPoint: int, message: pyzwave.message.Message, _flags: pyzwave.commandclass.Zip.HeaderExtension)¶ Handle incoming mailbox messages
-
async
-
class
pyzwave.mailbox.
QueueItem
(nodeId: int, handle: int, data: bytes, adapter)¶ Bases:
object
Class for holding one queue entry. It is also responsible for sending it’s heartbeats
-
property
checksum
¶ Return a checksum of the data
-
property
data
¶ The qctual queue data
-
start
()¶ Start the task for sending heartbeats to the mailbox proxy
-
stop
()¶ Stop sending heartbeats
-
property
pyzwave.message module¶
-
class
pyzwave.message.
Message
¶ Bases:
pyzwave.util.AttributesMixin
Base class for all Z-Wave messages. This class should not be initiated manually
-
NAME
= None¶
-
cmdClass
() → int¶ Return the command class id for this message
-
compose
() → bytes¶ Convert the message to a bytearray ready to be sent over the wire
-
classmethod
decode
(pkt: bytearray)¶ Decode a raw bytearray into a Message object
-
static
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize a bitstream into a Message object
-
classmethod
hid
()¶ Return the command class id and command id as a single word for easier lookup
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Write the message as binary into the bitstream. See compose()
-
-
class
pyzwave.message.
UnknownMessage
¶ Bases:
pyzwave.message.Message
Wrapper class for wrapping unknown messages. Using this class we still know which command class and command this message is (but we don’t know how to decode it)
-
hid
()¶ Return the command class id and command id as a single word for easier lookup
-
pyzwave.node module¶
-
class
pyzwave.node.
Node
(nodeId: int, adapter: pyzwave.adapter.Adapter, cmdClasses: list)¶ Bases:
pyzwave.util.Listenable
,pyzwave.util.MessageWaiter
Base class for a Z-Wave node
-
property
adapter
¶ The adapter
-
property
basicDeviceClass
¶ Return this nodes basic device class
-
commandClassUpdated
(_commandClass: pyzwave.commandclass.CommandClass.CommandClass)¶ Called by the command classes if their data is updated
-
property
endpoint
¶ Returns the endpoint if this is a subnode. 0 if it is the root node
-
property
flirs
¶ Returns if this node is a FLiRS node or not
-
property
genericDeviceClass
¶ Returns this nodes generic device class
-
async
handleMessage
(message: pyzwave.message.Message, flags)¶
-
async
interview
()¶ (Re)interview this node. It is recommended to apply the
storageLock()
before calling this function.
-
property
isFailed
¶ Returns is this node is considered failing or not
-
property
isZWavePlus
¶ Returns True if this is a Z-Wave Plus node
-
property
listening
¶ Returns True if this node is listening. False if it is a sleeping node
-
property
nodeId
¶ The node id in the format nodeid:channel
-
async
remove
() → bool¶ Remove this node from the network. This only works if the node is marked as failed in the Z-Wave chip
-
property
rootNodeId
¶ Return the root node id
-
async
send
(cmd: pyzwave.message.Message, timeout: int = 3) → bool¶ Send a message to this node
-
async
sendAndReceive
(cmd: pyzwave.message.Message, waitFor: pyzwave.message.Message, timeout: int = 3, **kwargs) → pyzwave.message.Message¶ Send a message and wait for the response
-
property
specificDeviceClass
¶ Returns this nodes specific device class
-
storageLock
()¶ Suppresses (temporarily) the signals to store settings persistant.
Some memories do not like to be written to often, such as flash memories found in embedded boards. If the application knows the node will be updated a lock can be added so it will only be written to disc once all operations has been finished. To use this lock use the with-statement:
with node.storageLock(): # Do operations with the node here. # Nothing will be stored to disk. node.interview() # The storage will happen here, only once
-
property
supported
¶ Return a dict of command classes this node supports
-
supports
(commandClass: int) → bool¶ Returns if this node supports a specific command class or not
-
property
-
class
pyzwave.node.
NodeEndPoint
(parent: pyzwave.node.Node, endpoint: int, adapter: pyzwave.adapter.Adapter, cmdClasses: list)¶ Bases:
pyzwave.node.Node
Base class for a sub node for nodes supporting command class multi channel
-
property
basicDeviceClass
¶ Return this nodes basic device class
-
property
flirs
¶ Returns if this node is a FLiRS node or not
-
property
isFailed
¶ Returns is this node is considered failing or not
-
property
listening
¶ Returns True if this node is listening. False if it is a sleeping node
-
property
parent
¶ Returns the parent node
-
property
-
class
pyzwave.node.
StorageStatus
¶ Bases:
enum.Enum
Storage status flag
-
CLEAN
= 1¶
-
LOCKED_CLEAN
= 2¶
-
LOCKED_DIRTY
= 3¶
-
-
pyzwave.node.
supervision
(func)¶ Decoratior for handling calls wrapped in supervision messages
pyzwave.persistantstorage module¶
-
class
pyzwave.persistantstorage.
PersistantStorage
¶ Bases:
object
Base class for implementing persistant storage for nodes
-
nodeAdded
(application, node: pyzwave.node.Node)¶ Called when a new node has been added and/or loaded
-
nodeUpdated
(node: pyzwave.node.Node)¶ Called then the settings for a node or one of it’s command classes has been updated
-
-
class
pyzwave.persistantstorage.
YamlStorage
(path)¶ Bases:
pyzwave.persistantstorage.PersistantStorage
Store persistant settings as yaml files
-
static
cmdClassRepresenter
(cmdClass: pyzwave.commandclass.CommandClass.CommandClass)¶ Wrapper method for converting to YAML format
-
nodeAdded
(application, node: pyzwave.node.Node)¶ Called when a new node has been added and/or loaded
-
nodeUpdated
(node: pyzwave.node.Node)¶ Called then the settings for a node or one of it’s command classes has been updated
-
property
path
¶ The path to store the yaml files
-
pathForNode
(nodeId: int) → pathlib.Path¶ Returns the path for settings for a node
-
static
pyzwave.types module¶
-
class
pyzwave.types.
BitStreamReader
(value)¶ Bases:
object
Class for parsing streams bitwise
-
advance
(length)¶ Advance the stream length bits
-
bit
(advance: bool = True) → int¶ Return the next bit in the stream
-
bits
(size: int = 8, advance=True) → int¶ Return size number of bits in the stream
-
byte
(advance: bool = True) → int¶ Return one byte from the stream
-
bytesLeft
() → int¶ Return the number of bytes remaining from the stream
-
peekByte
() → int¶ Return the next byte from the stream without advancing the stream
-
peekValue
(size: int) → bytes¶ Return the next value from the stream without advancing the stream
-
remaining
(advance: bool = True) → bytes¶ Return all the remaining bytes in the stream
-
value
(size: int, advance: bool = True) → bytes¶ Return the next size number of bytes from the stream
-
-
class
pyzwave.types.
BitStreamWriter
¶ Bases:
bytearray
Class for wringing a butearray bitwise
-
addBits
(value, size)¶ Add size number of bits to the stream
-
addBytes
(value, size, signed, endian='big')¶ Add size number of bytes to the stream
-
-
class
pyzwave.types.
BitsBase
(value: int)¶ Bases:
object
Base type for bit values
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize bits from stream
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize bits into stream
-
sizeBits
= 1¶
-
classmethod
-
class
pyzwave.types.
HomeID
¶ Bases:
pyzwave.types.uint32_t
Type for Z-Wave Home ID
-
class
pyzwave.types.
IPv6
(address)¶ Bases:
ipaddress.IPv6Address
Type for a IPv6 address
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize an IPv6 address
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize the IPv6 address
-
classmethod
-
pyzwave.types.
bits_t
(size)¶ Return the type for size number of bits
-
class
pyzwave.types.
bytes_t
¶ Bases:
bytes
Variable size bytes
-
default
= b''¶
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize bytes from stream
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize into stream
-
-
class
pyzwave.types.
dsk_t
(dsk=None)¶ Bases:
object
Type for a DSK key
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize 16 bytes DSK
-
static
deserializeN
(stream: pyzwave.types.BitStreamReader, length: int)¶ Deserialize variable length DSK
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize DSK
-
classmethod
-
pyzwave.types.
enum_t
(enumType, baseType)¶ Return a new enum type based on the specified type
-
class
pyzwave.types.
flag_t
(value: int)¶ Bases:
pyzwave.types.BitsBase
Type represeting one bit
-
class
pyzwave.types.
float_t
(_value=0, size=1, scale=0)¶ Bases:
float
Type for representing signed float values.
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize float value from stream
-
property
scale
¶ The scale this value represents
-
classmethod
-
class
pyzwave.types.
int24_t
¶ Bases:
pyzwave.types.int_t
Signed 24 bits value
-
size
= 3¶
-
-
class
pyzwave.types.
int_t
¶ Bases:
int
Base class for any int like type
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize unsigned value from stream
-
endian
= 'big'¶
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize into stream
-
signed
= True¶
-
size
= 0¶
-
classmethod
-
pyzwave.types.
reserved_t
(size)¶ Return the type for bits that are reserved and must not be used
-
class
pyzwave.types.
str_t
¶ Bases:
str
Unicode string
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize unicode string
-
classmethod
-
class
pyzwave.types.
uint16_t
¶ Bases:
pyzwave.types.uint_t
Unsigned word
-
size
= 2¶
-
-
class
pyzwave.types.
uint32_t
¶ Bases:
pyzwave.types.uint_t
Unsigned 32 bits value
-
size
= 4¶
-
-
class
pyzwave.types.
uint3_t
¶ Bases:
int
Type representing 3 bits value
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize bits from stream
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize bits into stream
-
classmethod
-
class
pyzwave.types.
uint4_t
¶ Bases:
int
Type representing 4 bits value
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize bits from stream
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize bits into stream
-
classmethod
-
class
pyzwave.types.
uint5_t
¶ Bases:
int
Type representing 5 bits value
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize bits from stream
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize bits into stream
-
classmethod
-
class
pyzwave.types.
uint7_t
¶ Bases:
int
Type representing 7 bits value
-
classmethod
deserialize
(stream: pyzwave.types.BitStreamReader)¶ Deserialize bits from stream
-
serialize
(stream: pyzwave.types.BitStreamWriter)¶ Serialize bits into stream
-
classmethod
-
class
pyzwave.types.
uint8_t
¶ Bases:
pyzwave.types.uint_t
Unsigned byte
-
size
= 1¶
-
-
class
pyzwave.types.
uint_t
¶ Bases:
pyzwave.types.int_t
Base class for any unsigned int like type
-
signed
= False¶
-
size
= 1¶
-
pyzwave.util module¶
-
class
pyzwave.util.
AttributesMixin
¶ Bases:
object
Inheritable class to implement defined attributes
-
attributeUpdated
(name, newValue, oldValue)¶ Called if an attribute value was updated
-
attributes
= ()¶
-
debugString
(indent=0)¶ Convert all attributes in this object to a human readable string used for debug output.
-
parseAttributes
(stream: pyzwave.types.BitStreamReader)¶ Populate the attributes from a raw bitstream.
-
-
class
pyzwave.util.
Listenable
¶ Bases:
object
Inheritable class to implement listaner interface between classes
-
addListener
(listener)¶ Add class as listener for messages
-
async
ask
(message, *args) → list¶ Send message to listeners and wait for the listeners to respond. This a shorthand for awaiting thre result from speak()
-
speak
(message, *args) → list¶ Send message to listeners. Returns a list of futures if the listeners are async. This can be used to allow waiting for all listeners to finish before continue.
-
-
class
pyzwave.util.
MessageWaiter
¶ Bases:
object
Inheritable class to implement listening for specific messages
-
addWaitingSession
(msgType)¶ Setup the session to wait for _before_ doing the wait. Do this to avoid a race condition where the message is received before we wait for it
-
messageReceived
(message) → bool¶ Called when a message is received directed to this node
-
async
waitForMessage
(msgType, timeout: int = 3, session=None)¶ Async method for waiting for a specific message to arrive from the node.
-
pyzwave.zipconnection module¶
-
class
pyzwave.zipconnection.
ZIPConnection
(address, psk)¶ Bases:
pyzwave.adapter.Adapter
Class for connecting to a zipgateway or zipnode
-
async
addNode
(txOptions: pyzwave.adapter.TxOptions) → bool¶ Start inclusion mode in the controller
-
async
addNodeDSKSet
(accept: bool, inputDSKLength: int, dsk: pyzwave.types.dsk_t) → bool¶ This command is used to indicate the S2 bootstrapping controller if the DSK is accepted and report the user input when needed.
-
async
addNodeKeysSet
(grantCSA: bool, accept: bool, grantedKeys: pyzwave.commandclass.NetworkManagementInclusion.Keys) → bool¶ This command is used to inform an S2 bootstrapping controller which keys must be granted to the node being bootstrapped.
-
async
addNodeStop
() → bool¶ Stop inclusion mode in the controller
-
async
connect
()¶ Connect the adapter. Must be implemented by subclass
-
async
getFailedNodeList
() → list¶ Return a list of failing nodes
-
async
getMultiChannelCapability
(nodeId: int, endpoint: int) → pyzwave.commandclass.NetworkManagementProxy.MultiChannelCapabilityReport¶ Return the multi channel capabilities for an endpoint in a node
-
async
getMultiChannelEndPoints
(nodeId: int) → int¶ Return the number of multi channel end points implemented by a node
-
async
getNodeInfo
(nodeId: int) → pyzwave.commandclass.NetworkManagementProxy.NodeInfoCachedReport¶ Return the node info from this node. Possibly cached
-
async
getNodeList
() → set¶ Return a list of nodes included in the network
-
keepAlive
()¶ Send a keepalive message
-
onPacket
(pkt)¶ Called when a packed has recevied from the connection
-
property
psk
¶ The psk used for the connection
-
async
removeFailedNode
(nodeId: int) → pyzwave.commandclass.NetworkManagementInclusion.FailedNodeRemoveStatus.Status¶ Remove a non-responding node
-
async
removeNode
() → bool¶ Start exclusion mode in the controller
-
async
removeNodeStop
() → bool¶ Stop exclusion mode in the controller
-
resetKeepAlive
()¶ Reset the keepalive timeout
-
async
send
(cmd, sourceEP=0, destEP=0, timeout=3) → bool¶ Send message to Z-Wave chip. Must be implemented in subclass.
Warning
This command will block until the message has been ACKed by the node.
When talking to battery operated (sleeping) nodes this command will block until the nodes wakes up or is considered dead. This can be a long time (week or even months). Please make sure the code can handle this.
-
async
setNodeInfo
(generic, specific, cmdClasses)¶ Set the application NIF (Node Information Frame). This method should not be called directly. Use the corresponding function in Application instead.
-
async
pyzwave.zipgateway module¶
-
class
pyzwave.zipgateway.
ZIPGateway
(address, psk)¶ Bases:
pyzwave.zipconnection.ZIPConnection
Class for communicating with a zipgateway
-
async
addNode
(txOptions: pyzwave.adapter.TxOptions) → bool¶ Start inclusion mode in the controller
-
async
addNodeDSKSet
(accept: bool, inputDSKLength: int, dsk: pyzwave.types.dsk_t) → bool¶ This command is used to indicate the S2 bootstrapping controller if the DSK is accepted and report the user input when needed.
-
async
addNodeKeysSet
(grantCSA: bool, accept: bool, grantedKeys: pyzwave.commandclass.NetworkManagementInclusion.Keys) → bool¶ This command is used to inform an S2 bootstrapping controller which keys must be granted to the node being bootstrapped.
-
async
addNodeStop
() → bool¶ Stop inclusion mode in the controller
-
async
connect
()¶ Connect the adapter. Must be implemented by subclass
-
async
connectToNode
(nodeId) → pyzwave.zipconnection.ZIPConnection¶ Returns a connection to the node
-
async
getFailedNodeList
() → list¶ Return a list of failing nodes
-
async
getMultiChannelCapability
(nodeId: int, endpoint: int) → pyzwave.commandclass.NetworkManagementProxy.MultiChannelCapabilityReport¶ Return the multi channel capabilities for an endpoint in a node
-
async
getMultiChannelEndPoints
(nodeId: int) → int¶ Return the number of multi channel end points implemented by a node
-
async
getNodeInfo
(nodeId: int) → pyzwave.commandclass.NetworkManagementProxy.NodeInfoCachedReport¶ Return the node info from this node. Possibly cached
-
async
getNodeList
() → set¶ Return a list of nodes included in the network
-
async
ipOfNode
(nodeId) → ipaddress.IPv6Address¶ Returns the IPv6 address of the node
-
onMessageReceived
(connection: pyzwave.zipconnection.ZIPConnection, message: pyzwave.message.Message)¶ Called when a message is received from any node connection. Not unsolicited.
-
onUnsolicitedMessage
(pkt, address)¶ Called when an unsolicited message is received. We do not know the node id the message is from. Only the ip address.
-
async
removeFailedNode
(nodeId: int) → pyzwave.commandclass.NetworkManagementInclusion.FailedNodeRemoveStatus.Status¶ Remove a non-responding node
-
async
removeNode
() → bool¶ Start exclusion mode in the controller
-
async
removeNodeStop
() → bool¶ Stop exclusion mode in the controller
-
async
sendToNode
(nodeId: int, cmd: pyzwave.message.Message, **kwargs) → bool¶ Send message to node. Must be implemented in subclass
-
async
setGatewayMode
(mode: int, timeout: int = 3) → bool¶ Set gateway to standalone or portal mode
-
async
setNodeInfo
(generic, specific, cmdClasses)¶ Set the application NIF (Node Information Frame). This method should not be called directly. Use the corresponding function in Application instead.
-
async
setupUnsolicitedConnection
()¶ Setup for listening for unsolicited connections. This function must not be called explicitly. It is called by the connect() method automatically
-
async