Skip to content

Commit 7a0f489

Browse files
committed
Merge branch 'staging/4.2' into release/4.2
2 parents 434ba5b + 42fa432 commit 7a0f489

File tree

342 files changed

+2462
-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.

342 files changed

+2462
-1329
lines changed

_data/hardware-partners.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,16 @@
206206
site:
207207
href: https://www.milesight.com/
208208
links:
209+
general-guides:
210+
0:
211+
label: ThingsBoard Platform-Milesight Integration via TTI
212+
href: https://support.milesight-iot.com/support/solutions/articles/73000658954-thingsboard-platform-milesight-integration-via-tti
213+
1:
214+
label: ThingsBoard Platform-Milesight Integration via HTTP
215+
href: https://support.milesight-iot.com/support/solutions/articles/73000658955-thingsboard-platform-milesight-integration-via-http
216+
2:
217+
label: ThingsBoard Platform-Milesight Integration via MQTT
218+
href: https://support.milesight-iot.com/support/solutions/articles/73000658957-thingsboard-platform-milesight-integration-via-mqtt
209219
sensor-guides:
210220
0:
211221
label: AM308 Lorawan 9-IN-1 IAQ Sensor

_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](https://img.thingsboard.io/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](https://img.thingsboard.io/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](https://img.thingsboard.io/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](https://img.thingsboard.io/gateway/get-set-connector-rpc/mqtt-get-set-rpc-4.jpeg)
69+
![image](https://img.thingsboard.io/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](https://img.thingsboard.io/gateway/mqtt-connector/attribute-request-1-ce.png)
3+
{% assign AttributesRequest = '
4+
===
5+
image: https://img.thingsboard.io/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: https://img.thingsboard.io/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: https://img.thingsboard.io/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](https://img.thingsboard.io/gateway/mqtt-connector/attribute-updates-example-basic-1-ce.png)
3+
{% assign AttributesUpdate = '
4+
===
5+
image: https://img.thingsboard.io/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: https://img.thingsboard.io/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: https://img.thingsboard.io/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.

0 commit comments

Comments
 (0)