On MQTT Change
This block is triggered when the MQTT connection state changes.
Configuration
- Change Type: which change to react to.
- Connected: the device has connected to the broker.
- Disconnected: the device has lost its connection to the broker.
Connections
The block's output is executed when the selected change occurs. This connection doesn't transfer any data.
Use the Connected variant to publish an initial state once the broker is reachable, and the Disconnected variant to raise a local alarm or fall back to buffering readings.
Note
Add two blocks, one set to Connected and one to Disconnected, to handle both directions.
See also MQTT Publish, MQTT Subscribe