Skip to content

Commit b4033cd

Browse files
authored
Updated documentation for MQTT connector (#2371)
* update mqtt documentation to the security subsection * update includes pages * add new screenshots for mqtt connector * rename mqtt version compatibility section, add screenshot for generating clientID * update worker settings for mqtt documentation. * rewrite mqtt documentation for security subsection. * add new screenshots for mqtt security subsection documentation * delete outdated screenshots/md files for mqtt security documentation section * correct errors inside mqtt documentation, retake some screenshots * fix small mistyping in mqtt documentation * write initial data mapping section inside mqtt connector * add screenshots for data mapping section * completed the data conversion subsection for the mqtt connector documentation * add screenshots for usage examples and data conversion subsection * finish data mapping section with usage examples * add screenshots for appropriate sections * delete outdated screenshots and .md files * Write connect request section for mqtt documentation * add empty .md files for futher request mapping section * add empty .md files for futher request mapping section * delete old connect request section files * Rewrite disconnect request for mqtt connector * Add screenshots for disconnect request subsection * Delete old screenshots * write documentation for attribute request subsection * add screenshots for attribute requests subsection * implement subsection for attribute updates subsection * add screenshots for attribute updates * Delete outdated mqtt attribute updates part * implement basic rpc subsection * implement subsection for configurable RPC methods to device * add screenshots for configurable RPC section * implement documentation section for reserved rpc * add screenshots for reserved rpc * remove outdated screenshots * rewrite iot gateway features mqtt rpc get/set * correct errors in the mqtt documentation * Apply requested improvements to MQTT documentation * Add improvements to MQTT documentation * fix errors in the mqtt documentation * retake screenshots, add note for usage examples. * change screenshots for mqtt rpc's.
1 parent 04314df commit b4033cd

File tree

341 files changed

+2452
-1329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+2452
-1329
lines changed

_includes/templates/iot-gateway/get-set-connector-rpc/mqtt.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ With the GET method you can subscribe to MQTT topic and receive message from it.
55
```bash
66
get requestTopicExpression=<requestTopicExpression>;responseTopicExpression=<responseTopicExpression>;value=<value>;
77
```
8+
{: .copy-code}
89

910
Where:
1011
- `<requestTopicExpression>` - the topic to publish the request;
@@ -18,54 +19,52 @@ To read the value of the room light level, run this query:
1819
```bash
1920
get requestTopicExpression=data/get_light_level;responseTopicExpression=data/response;value=${params};
2021
```
22+
{: .copy-code}
2123

22-
**Response:**
23-
24-
```json
25-
{"result": {"success":true}}
26-
```
24+
Also, let's take a look at the data received from the MQTT topic **"data/response"**:
2725

2826
{:refdef: style="text-align: left;"}
2927
![image](/images/gateway/get-set-connector-rpc/mqtt-get-set-rpc-1.png)
3028
{: refdef}
3129

32-
Also, let's take a look at the data received from the MQTT topic **"data/response"**:
33-
34-
{:refdef: style="text-align: left;"}
35-
![image](/images/gateway/get-set-connector-rpc/mqtt-get-set-rpc-3.jpeg)
36-
{: refdef}
3730

3831
### SET method
3932

4033
With the SET method you can publish a message to MQTT topic.
4134

4235
```bash
43-
set requestTopicExpression=data/get_light_level;value=${params};
36+
set requestTopicExpression=data/set_light_level;value=${params};
4437
```
38+
{: .copy-code}
4539

4640
Where:
4741
- `<requestTopicExpression>` - the topic to publish request;
4842
- `<value>` - the value to send.
4943

5044
For example, in our case, we know that we can set the value of the room light level to the MQTT topic
51-
**"data/light_level"**. To set the value of the room light level, run the following query:
45+
**"sata/light_level"**. To set the value of the room light level, run the following query:
5246

5347
```bash
5448
set requestTopicExpression=data/set_light_level;value=80;
5549
```
50+
{: .copy-code}
5651

57-
**Response:**
58-
59-
```json
60-
{"result": {"success":true}}
61-
```
52+
On the screenshot below, you can see that we have successfully sent the SET request to the MQTT topic **"data/set_light_level"**:
6253

6354
{:refdef: style="text-align: left;"}
6455
![image](/images/gateway/get-set-connector-rpc/mqtt-get-set-rpc-2.png)
6556
{: refdef}
6657

67-
Also, let's take a look at the result in the **"data/light_level"** MQTT topic:
58+
Also, let's take a look at the result after SET method in the **"data/light_level"** MQTT topic by sending Two way GET RPC request.
59+
To read the value of the room light level to make sure the room light level is really updated, run this query:
60+
61+
```bash
62+
get requestTopicExpression=data/get_light_level;responseTopicExpression=data/response;value=${params};
63+
```
64+
{: .copy-code}
65+
66+
On the screenshot below, you can see that the room light level value is updated to 80 after the SET request:
6867

6968
{:refdef: style="text-align: left;"}
70-
![image](/images/gateway/get-set-connector-rpc/mqtt-get-set-rpc-4.jpeg)
69+
![image](/images/gateway/get-set-connector-rpc/mqtt-get-set-rpc-3.png)
7170
{: refdef}

_includes/templates/iot-gateway/mqtt-connector/attribute-request-subsection-advanced.md

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
To adding new requests mapping, navigate to the "Requests mapping" tab and click the "plus" icon.
2-
In the open modal window, select the "Attribute request" type, set a topic filter. Fill in the fields of the "Input request parsing" and "Output request parsing" sections. Then, click "Add".
1+
In order to add new attribute request mapping, follow these steps:
32

4-
![image](/images/gateway/mqtt-connector/attribute-request-1-ce.png)
3+
{% assign AttributesRequest = '
4+
===
5+
image: /images/gateway/mqtt-connector/mqtt-gateway-configuring-11-ce.png,
6+
title: Click the "**Add mapping**" under "**Requests mapping**" section to add new attribute request mapping.
7+
===
8+
image: /images/gateway/mqtt-connector/mqtt-attribute-requests-1.png,
9+
title: Select "**Attribute request**" in the **Request type** field, enter the "**Topic filter**"
10+
===
11+
image: /images/gateway/mqtt-connector/mqtt-attribute-requests-2.png,
12+
title: Configure the **Device name expression**, **Response topic expression**, and **Attribute name expression** fields.
13+
Select the source type for each field (`Message`, `Topic`, or `Constant`) and enter the corresponding values.
14+
You can also set the **Retain** option to determine whether the attribute response message should be retained by the MQTT broker.
15+
'
16+
%}
17+
18+
{% include images-gallery.liquid showListImageTitles="true" imageCollection=AttributesRequest %}

_includes/templates/iot-gateway/mqtt-connector/attribute-updates-subsection-advanced.md

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
To adding new requests mapping, navigate to the "Requests mapping" tab and click the "plus" icon.
2-
In the open modal window, select the "Attribute update" type, and set a device name filter, attribute filter, response value expression, and response topic expression. Then, click “Add”.
1+
In order to add new attribute update mapping, follow these steps:
32

4-
![image](/images/gateway/mqtt-connector/attribute-updates-example-basic-1-ce.png)
3+
{% assign AttributesUpdate = '
4+
===
5+
image: /images/gateway/mqtt-connector/mqtt-gateway-configuring-11-ce.png,
6+
title: Click the "**Add mapping**" under "**Requests mapping**" section to add new attribute request mapping.
7+
===
8+
image: /images/gateway/mqtt-connector/mqtt-attribute-updates-1.png,
9+
title: Select "**Attribute update**" in the **Request type** field, enter the "**Device name filter**"
10+
===
11+
image: /images/gateway/mqtt-connector/mqtt-attribute-updates-2.png,
12+
title: Configure the **Attribute filter**, **Response value expression**, and **Response topic expression** fields.
13+
You can also set the **Retain** option to determine whether the attribute response message should be retained by the MQTT broker.
14+
'
15+
%}
16+
17+
{% include images-gallery.liquid showListImageTitles="true" imageCollection=AttributesUpdate %}

_includes/templates/iot-gateway/mqtt-connector/connect-request-subsection-advanced.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

_includes/templates/iot-gateway/mqtt-connector/connect-request-subsection-basic.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

_includes/templates/iot-gateway/mqtt-connector/connection-to-broker-advanced-section.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

_includes/templates/iot-gateway/mqtt-connector/connection-to-broker-basic-section.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

_includes/templates/iot-gateway/mqtt-connector/data-conversion-bytes-config.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)