GenericOnOffClient
class GenericOnOffClient
Generic OnOff Client for controlling binary-state mesh devices.
The Generic OnOff model is one of the most common SIG models. It allows getting and setting a boolean state on a remote device.
Usage
val onOff = GenericOnOffClient(network, myAppKey)
val status = onOff.get(lightNode.unicastAddress)
onOff.set(lightNode.unicastAddress, true)Content copied to clipboard
Functions
Link copied to clipboard
Get the current on/off state of a node.
Link copied to clipboard
Observe status changes from an element.
Link copied to clipboard
suspend fun set(elementAddress: MeshAddress.UnicastAddress, state: Boolean, transitionTime: TransitionTime? = null): GenericOnOffStatus
Set the on/off state of a node (acknowledged).
Link copied to clipboard
Set the on/off state of a node (unacknowledged -- fire and forget).