Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blocks:app-note:netio [2024-03-20 07:33]
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:server:advanced_server_configuration:mqtt|short article]] explaining the principles and describes how to enable a broker on the Blocks server.+First of all make yourself familiar with MQTT, we have a [[blocks:server:advanced_server_configuration:mqtt|short article]] explaining the principles and describes how to enable a broker on the Blocks server.
  
 Please refer to the vendor documentation on how to access the setup of the device.  After successfully logged on we must enable and configure the MQTT-flex api.  This is done by editing the JSON description as seen here. Please refer to the vendor documentation on how to access the setup of the device.  After successfully logged on we must enable and configure the MQTT-flex api.  This is done by editing the JSON description as seen here.
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 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.