Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
|
Next revision
Both sides next revision
|
blocks:app-note:netio [2024-03-20 07:33] mattias [Configure the MQTT driver in Blocks] |
blocks:app-note:netio [2024-03-20 07:37] mattias [Configure the MQTT driver in Blocks] |
====Configure the MQTT driver in Blocks==== | ====Configure the MQTT driver in Blocks==== |
| |
Before adding devices we must have a broker configured in the blocks server configuration. | Before adding devices we must have a broker running (somewhere) and configured in the blocks server configuration. Please read [[blocks:server:advanced_server_configuration:mqtt|the MWTT documentation]] to get started. |
[[blocks:server:advanced_server_configuration:mqtt|Advanced Server Configuration]] | This application note use the generic //configurableMQTT// driver in Blocks, is has a very similar way of configuring as the netio devices. The driver is a bit "nerdy" but is also very flexible and more or less any MQTT device can be configured. It is also possible to write mqtt drivers that is bospoke for a certain device. |
We use the generic //configurableMQTT// driver in Blocks, is has a very similar way of configuring as the netio devices. The driver is a bit "nerdy" but is also very flexible and more or less any MQTT device can be configured. | |
| |
| ===Add the device=== |
Add a new mqtt device from Manage/Network Devices. Give the device a unique and meaningful name and set the //Topic Base//, this is the common part of the mqtt topic. The topic base will be concatenated with the subTopic from the configuration below to form the full topic path. | Add a new mqtt device from Manage/Network Devices. Give the device a unique and meaningful name and set the //Topic Base//, this is the common part of the mqtt topic. The topic base will be concatenated with the subTopic from the configuration below to form the full topic path. |
For the Netio example configurations in this app note the Topic Base is //netios/PowerBOX-B7// where PowerBox-B7 comes from the device name inserted by the device configuration. This comes from //netios/${DEVICE_NAME}/// found in the devices mqtt configuration. | For the Netio example configurations in this app note the Topic Base is //netios/PowerBOX-B7// where PowerBox-B7 comes from the device name inserted by the device configuration. This comes from //netios/${DEVICE_NAME}/// found in the devices mqtt configuration. |