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-02-26 07:44] mattias [Prepare the device] |
blocks:app-note:netio [2024-04-09 17:08] (current) mattias [Prepare the device] |
||
---|---|---|---|
Line 1: | Line 1: | ||
=====Control Netio Power Distribution Units using MQTT===== | =====Control Netio Power Distribution Units using MQTT===== | ||
- | This application note explains the steps involved in configuring the device and how to setup the device in Blocks using the Configurable MQTT driver. | + | This application note explains the steps involved in configuring the device and how to set up the device in Blocks using the Configurable MQTT driver. |
+ | |||
+ | :!: NOTE: If you don't already have an MQTT broker as part of your system, the [[blocks: | ||
====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: |
- | https:// | + | |
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 55: | Line 57: | ||
====Device Control (Subscriptions)==== | ====Device Control (Subscriptions)==== | ||
- | We must also enable subscriptions to topict | + | We must also enable subscriptions to the topics |
For each output/ | For each output/ | ||
< | < | ||
Line 93: | Line 95: | ||
====Configure the MQTT driver in Blocks==== | ====Configure the MQTT driver in Blocks==== | ||
- | In blocks | + | Before adding devices we must have a broker running (somewhere) and configured in the blocks |
+ | 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 // | ||
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 112: | Line 126: | ||
} | } | ||
] | ] | ||
+ | |||
+ | </ | ||
Where: | Where: | ||
Line 126: | Line 142: | ||
=====Example configurations for NETIO devices===== | =====Example configurations for NETIO devices===== | ||
+ | The following examples can be used to configure the device and Blocks for MQTT. Both ends use JSON notation to specify the configuration. Both Netio and Blocks can be configured to match any existing system, hence configurable. In the case of NETIO we do not have to adapt to anything existing but we must setup some topics to use for communication. The examples do in a sense specify create the API. | ||
====NETIO PowerCable 2XX==== | ====NETIO PowerCable 2XX==== | ||
===Netio MQTT flex api config=== | ===Netio MQTT flex api config=== |