This notifies the caller about incoming Z-Bus communication as used in ZBus.receive
Anonymous callback:
zBus.receive((event) => {
console.log('Received', event.address, event.event, event.data);
});
Callback with a named function:
function forwardCommand(event) {
zBus.transmit([0, 1, 2, 3, 4, 5, 6, 7, 8], event.event);
}
zBus.receive(99, ['on', 'off'], forwardCommand);
Callback skipping the event
parameter:
zBus.receive(() => {
console.log('Something received');
});
The received DeviceEvent contains address, event, and optional data
Generated using TypeDoc
This notifies the caller about incoming Z-Bus communication as used in ZBus.receive
Example
Anonymous callback:
Callback with a named function:
Callback skipping the
event
parameter: