Welcome to pyzwave’s documentation!


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("", 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(
report = await node.sendAndReceive(message, SensorMultilevel.Report)