Package mq
Functions
mq:bind
Bind a function to MQTT topic(s).
Parameters
Name | Optional | Description |
Topic | No | Topic pattern to bind function to |
Function | No | Function to execute on new messages |
Example
mq:sub
Create a subscription to the MQTT Broker.
Parameters
Name | Optional | Description |
Topic | No | Topic pattern for subscription on MQTT |
QoS | No | QoS of the subscription |
Example
mq:pub
Parameters
Name | Optional | Description |
Topic | No | Topic to send message to |
Payload | no | Data to send |
Retain | Yes | Set to true to retain messages on the broker (should be avoided). Defaults to false |
QoS | Yes | QoS level for message. Defaults to 0 |
Example