zwave
#
- class platypush.backend.zwave.ZwaveBackend(device: str, config_path: str | None = None, user_path: str | None = None, ready_timeout: float = 10.0, *args, **kwargs)[source]#
Bases:
Backend
Start and manage a Z-Wave network.
If you are using a USB adapter and want a consistent naming for the device paths, you can use udev.
# Get the vendorID and productID of your device through lsusb. # Then add a udev rule for it to link it e.g. to /dev/zwave. cat <<EOF > /etc/udev/rules.d/92-zwave.rules SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="zwave" EOF # Restart the udev service systemctl restart systemd-udevd.service
Note
This backend is deprecated, since the underlying
python-openzwave
is quite buggy and largely unmaintained.Use the zwave.mqtt backend instead (
platypush.backend.zwave.mqtt.ZwaveMqttBackend
).Triggers:
platypush.message.event.zwave.ZwaveNetworkReadyEvent
when the network is up and running.platypush.message.event.zwave.ZwaveNetworkStoppedEvent
when the network goes down.platypush.message.event.zwave.ZwaveNetworkResetEvent
when the network is reset.platypush.message.event.zwave.ZwaveNetworkErrorEvent
when an error occurs on the network.platypush.message.event.zwave.ZwaveNodeQueryCompletedEvent
when all the nodes on the network have been queried.platypush.message.event.zwave.ZwaveNodeEvent
when a node attribute changes.platypush.message.event.zwave.ZwaveNodeAddedEvent
when a node is added to the network.platypush.message.event.zwave.ZwaveNodeRemovedEvent
when a node is removed from the network.platypush.message.event.zwave.ZwaveNodeRenamedEvent
when a node is renamed.platypush.message.event.zwave.ZwaveNodeReadyEvent
when a node is ready.platypush.message.event.zwave.ZwaveNodeGroupEvent
when a node is associated/de-associated to a group.platypush.message.event.zwave.ZwaveNodeSceneEvent
when a scene is set on a node.platypush.message.event.zwave.ZwaveNodePollingEnabledEvent
when the polling is successfully turned on a node.platypush.message.event.zwave.ZwaveNodePollingDisabledEvent
when the polling is successfully turned off a node.platypush.message.event.zwave.ZwaveButtonCreatedEvent
when a button is added to the network.platypush.message.event.zwave.ZwaveButtonRemovedEvent
when a button is removed from the network.platypush.message.event.zwave.ZwaveButtonOnEvent
when a button is pressed.platypush.message.event.zwave.ZwaveButtonOffEvent
when a button is released.platypush.message.event.zwave.ZwaveValueAddedEvent
when a value is added to a node on the network.platypush.message.event.zwave.ZwaveValueChangedEvent
when the value of a node on the network changes.platypush.message.event.zwave.ZwaveValueRefreshedEvent
when the value of a node on the network is refreshed.platypush.message.event.zwave.ZwaveValueRemovedEvent
when the value of a node on the network is removed.platypush.message.event.zwave.ZwaveCommandEvent
when a command is received on the network.platypush.message.event.zwave.ZwaveCommandWaitingEvent
when a command is waiting for a message to complete.
Requires:
python-openzwave (
pip install python-openzwave
)
- __init__(device: str, config_path: str | None = None, user_path: str | None = None, ready_timeout: float = 10.0, *args, **kwargs)[source]#
- Parameters:
device – Path to the Z-Wave adapter (e.g. /dev/ttyUSB0 or /dev/ttyACM0).
config_path – Z-Wave configuration path (default:
<OPENZWAVE_PATH>/ozw_config
).user_path – Z-Wave user path where runtime and configuration files will be stored (default:
<PLATYPUSH_WORKDIR>/zwave
).ready_timeout – Network ready timeout in seconds (default: 60).