Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blocks:app-note:netio [2024-03-20 07:19] mattias [Configure the MQTT driver in Blocks] |
blocks:app-note:netio [2024-04-09 17:08] (current) mattias [Prepare the device] |
||
---|---|---|---|
Line 6: | Line 6: | ||
====Prepare the device==== | ====Prepare the device==== | ||
- | First of all make yourself familiar with MQTT, we hava a [[blocks: | + | First of all make yourself familiar with MQTT, we have a [[blocks: |
Please refer to the vendor documentation on how to access the setup of the device. | Please refer to the vendor documentation on how to access the setup of the device. | ||
Line 95: | Line 95: | ||
====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 |
+ | This application note use the generic // | ||
+ | |||
+ | ===Add the device=== | ||
+ | Add a new mqtt device from Manage/ | ||
+ | For the Netio example configurations in this app note the Topic Base is // | ||
- | We add the mqtt device from Manage/ | ||
- | In blocks there is a similar concept to setup the configurableMQTT driver. | ||
In the drivers custom options we can specify the blocks property names and the MQTT topics we need to subscribe to using JSON. The following example is for 2 socket PowerCABLE configured as in the examples above. | In the drivers custom options we can specify the blocks property names and the MQTT topics we need to subscribe to using JSON. The following example is for 2 socket PowerCABLE configured as in the examples above. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Example driver configuration for a two socket device: | ||
+ | |||
+ | < | ||
{ | { | ||
" | " | ||
Line 117: | Line 126: | ||
} | } | ||
] | ] | ||
+ | |||
+ | </ | ||
Where: | Where: |