powersensor_local.listener

Classes

PowersensorListener([broadcast_address])

class powersensor_local.listener.PowersensorListener(broadcast_address='<broadcast>')[source]

Bases: DatagramProtocol

datagram_received(data, addr)[source]

Called when some datagram is received.

protocol_factory()[source]
async scan()[source]

Scans the local network for discoverable devices with a timeout. Returns the list of IP addresses of the discovered gateways (plugs).

async stop()[source]

Disconnects from all devices.

async subscribe(callback)[source]

Subscribes to updates from known devices.

async unsubscribe()[source]

Unsubscribes from all devices.