Leaf
API implementation of Leaf, used in home automation above Rainfall protocol. A sensor, or a controller or an actuator are implemented using leaf to send data from sensor, actuator listen command from controller and send external command from actuator to controller.
Documentation
For documentation on how to use the API, refer to this
Examples
Creates a UDP driver on port 4567 and uses it to construct a Leaf. Handshake with central controller is automatic.
var Udp = ;var Leaf = ;Udp;
On the callback, use leaf to send a data to central controller. Data is a object with id and value.
leaf;
Also, use leaf to listen commands from central controller.
leaf;