MindConnect nodes¶
The "mindconnect" nodes can write the values of the datapoint, send a command to MindConnect MQTT device and check the status of the sent command. For more information about MindConnect Elements, refer to Connectivity.
Note
Ensure your MindConnect device is successfully onboarded before using these nodes.
The "mindconnect" nodes and their respective functions are described in the following sections:
Write mindconnect node¶
The "write mindconnect" node allows you to write a plain value to a datapoint of the onboarded MindConnect device.
Using write mindconnect node¶
To execute the example flow using the write mindconnect node, follow these steps:
-
From the node palette, drag and drop the "inject" node from the input palette and "write mindconnect" node from the mindconnect palette to the working area. Connect the nodes in a flow as shown below:
-
Double click on "inject" node to edit the properties. For more information, refer to Editing nodes.
- Enter the "Name" as "127".
-
Double click on "write mindconnect" node to edit the properties and select the device, datasources and datapoints to update the value.
- Enter the "Name".
- To select the device, click .
-
Save and execute the flow.
The datapoint value is updated successfully.
Command mindconnect node¶
The "command mindconnect" node allows you to send a command to a MindConnect MQTT device.
Using command mindconnect node¶
To execute the example flow using the command mindconnect node, follow these steps:
-
From the node palette, drag and drop the "inject" node from the input palette, "function" node from the function palette, "command mindconnect" node from the mindconnect palette and "debug" node from the output palette to the working area. Connect the nodes in a flow as shown below:
-
Double click on "inject" node to edit the properties. For more information, refer to Editing nodes.
-
Double click on "function" node to edit the properties and enter the values.
- Code:
msg.payload = {"testprop5": "first"}; return msg;
- Code:
-
Double click on "command mindconnect" node to edit the properties.
- Enter the "Name".
- To select the MQTT Id, click .
- Click "Done".
-
Save and execute the flow.
You can view the results in the message payload. The command is successfully executed for the selected device.
Command mindconnect status node¶
The "command mindconnect status" node allows you to get the status of a commanding job (MindConnect MQTT device).
using command mindconnect status node¶
To execute the example flow using command mindconnect node, follow these steps:
-
From the node palette, drag and drop the "inject" node from input palette, "command mindconnect status" node from mindconnect palette and "debug" node from output palette to the working area. Connect the nodes in a flow as shown below:
-
Double click on "inject" node to edit the properties. For more information, refer to Editing nodes.
-
Double click on "command mindconnect status" node to edit the properties.
- Enter the "Name".
- Enter the "JobID".
- Click "Done".
-
Save and execute the flow.
You can view the results in the message payload. The status of the command is displayed successfully.