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

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