Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit 7ad743b

Browse files
committed
Merge with master
2 parents ae5e583 + 254a105 commit 7ad743b

70 files changed

Lines changed: 943 additions & 127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
This configuration section contains application settings, such as:
1+
- **Object Name** - the gateway object name in the BACnet network.
2+
- **Host** - the gateway host in the BACnet network. **Make sure you use the correct network address where your devices are located so that the gateway can find them.**
3+
- **Port** - the gateway port in the BACnet network.
4+
- **Network mask** - the gateway mask in the BACnet network.
5+
- **Object ID** - the gateway object identifier in the BACnet network.
6+
- **Vendor ID** - the gateway vendor identifier in the BACnet network.
27

3-
- **Object Name** - the gateway object name in the BACnet network;
4-
- **Host** - the gateway host in the BACnet network;
5-
- **Port** - the gateway port in the BACnet network;
6-
- **Network mask** - the gateway mask in the BACnet network;
7-
- **Object ID** - the gateway object identifier in the BACnet network;
8-
- **Vendor ID** - the gateway vendor identifier in the BACnet network;
9-
- **Advanced settings**:
10-
- **Max APDU Length** - maximal length of the APDU;
11-
- **Segmentation** - the type of segmentation:
12-
- **Both** - supports both sending and receiving segmented messages;
13-
- **Transmit** - supports only sending segmented messages;
14-
- **Receive** - supports only receiving segmented messages;
15-
- **None** - doesn't support segmented messages;
8+
{% capture difference %}
9+
All configuration parameters list, and their detailed description can be found in the
10+
[Advanced configuration](/docs/iot-gateway/config/bacnet/#advanced-configuration) section.
11+
{% endcapture %}
12+
{% include templates/info-banner.md content=difference %}
1613

1714
![image](https://img.thingsboard.io/gateway/bacnet-connector/bacnet-application-basic-1-ce.png)
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
To add a new device, click the "plus" icon:
1+
To add a new device, click the "**plus**" icon:
22

33
![image](https://img.thingsboard.io/gateway/bacnet-connector/bacnet-gateway-configuring-1-ce.png)
44

@@ -8,11 +8,28 @@ Provide the following fields in the opened model window:
88
- **Device name source** - the source of the device name, can be:
99
- **Constant** - the device name is static;
1010
- **Expression** - the device name is an expression;
11-
- **Device name value / expression** - the device name (you can find detail examples [here](/docs/iot-gateway/config/bacnet#examples-device-name-expression-and-device-profile-expression));
11+
- **Device name value / expression** - the device name (you can find detail examples [here](/docs/iot-gateway/config/bacnet/#usage-examples));
1212
- **Device profile source** - the source of the device profile, can be the same as the device name source;
13-
- **Device profile value / expression** - the device profile name (you can find detail examples [here](/docs/iot-gateway/config/bacnet#examples-device-name-expression-and-device-profile-expression));
13+
- **Device profile value / expression** - the device profile name (you can find detail examples [here](/docs/iot-gateway/config/bacnet/#usage-examples));
1414
- **Poll period** - the period of time when the connector will try to poll BACnet device;
1515
- **Advanced configuration settings**:
16-
- **Alternative responses addresses** - the alternative address for responses from the device (you can find detail examples [here](/docs/iot-gateway/config/bacnet#examples-alternative-responses-addresses)).
16+
- **Alternative responses addresses** - the alternative address for responses from the device (you can find detail examples [here](/docs/iot-gateway/config/bacnet/#usage-examples)).
17+
- **Report strategy** - strategy for sending data to ThingsBoard:
18+
- **Report period** - period for sending data to ThingsBoard in milliseconds;
19+
- **Type** - type of the report strategy:
20+
- **On report period** - sends data to ThingsBoard after the report period;
21+
- **On value change** - sends data to ThingsBoard when the value changes;
22+
- **On value change or report period** - sends data to ThingsBoard when the value changes or after the report period;
23+
- **On received** - sends data to ThingsBoard after receiving data from the device (default strategy).
24+
25+
{% capture difference %}
26+
All configuration parameters list, and their detailed description can be found in the
27+
[Advanced configuration](/docs/iot-gateway/config/bacnet/#devices) section.
28+
29+
More usage examples can be found in the [Example usage](/docs/iot-gateway/config/bacnet/#usage-examples) section.
30+
31+
Additional information about the report strategy can be found [here](/docs/iot-gateway/features-overview/report-strategy){:target="_blank"}.
32+
{% endcapture %}
33+
{% include templates/info-banner.md content=difference %}
1734

1835
![image](https://img.thingsboard.io/gateway/bacnet-connector/bacnet-gateway-configuring-2-ce.png)

_includes/templates/iot-gateway/bacnet-connector/device-rpc-basic-section.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
In order to add new RPC method, follow these steps:
1+
In order to add a new RPC method, follow these steps:
22

33
{% assign creatingRPC = '
44
===

_includes/templates/iot-gateway/bacnet-connector/device-time-series-and-attributes-basic-section.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,20 @@ To add new time series or attribute key, follow these steps:
2727

2828
{% include images-gallery.liquid showListImageTitles="true" imageCollection=creatingAttrAndTimeseries %}
2929

30+
{% capture difference %}
31+
All configuration parameters list, and their detailed description can be found in the
32+
[Advanced configuration](/docs/iot-gateway/config/bacnet/#device-attributes-and-time-series) section.
33+
34+
More usage examples can be found in the [Example usage](/docs/iot-gateway/config/bacnet/#usage-examples) section.
35+
{% endcapture %}
36+
{% include templates/info-banner.md content=difference %}
37+
3038
For each time series or attribute, you can enable specific report strategy. This strategy defines how often the
3139
data will be sent to the ThingsBoard server. The following strategies are available:
3240

3341
- **On report period** - sends data to ThingsBoard after the report period;
3442
- **On value change** - sends data to ThingsBoard when the value changes;
35-
- **On value change and report period** - sends data to ThingsBoard when the value changes or after the report period;
43+
- **On value change or report period** - sends data to ThingsBoard when the value changes or after the report period;
3644
- **On received** - sends data to ThingsBoard after receiving data from the device (default strategy).
3745

3846
![image](https://img.thingsboard.io/gateway/bacnet-connector/bacnet-gateway-configuring-10-ce.png)
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
Attribute updates allow you to update objects values on the BACnet device. You can add new attribute updates in the
2+
**Attribute updates**” section of the device configuration page.
3+
4+
As an example, we will use a BACnet controller to which a relay is connected. We also know that the relay has the
5+
following object ID: `Binary Input:1`. We added this Object ID as a telemetry parameter with the key `relay`. We used
6+
telemetry so that later it would be convenient for us to see if the value we changed using the attribute update
7+
has changed. You, also, can add this telemetry datapoint to the device configuration or use the reserved `get` method
8+
to check the value of the node.
9+
10+
Let’s add an attribute update to our configuration. For this purpose, follow these steps:
11+
12+
{% assign attributeUpdates = '
13+
===
14+
image: /images/gateway/bacnet-connector/examples/select-created-gateway.png,
15+
title: Go to "**Entities**" → "**Gateways**" in the left sidebar and select your gateway.
16+
===
17+
image: /images/gateway/bacnet-connector/examples/select-connector-configuration.png,
18+
title: Click on the "**Connectors configuration**" button on the right side menu.
19+
===
20+
image: /images/gateway/bacnet-connector/examples/select-device-configuration.png,
21+
title: Select the created BACnet connector and click on the "**Devices**" tab. Make sure you have configured and connected device (if you don’t know how to do it, see [Application settings](/docs/iot-gateway/config/bacnet/#application) and [Data mapping](/docs/iot-gateway/config/bacnet/#data-mapping) sections of this guide). Click on the “**Pencil**” icon on a device you want to configure attribute updates for.
22+
===
23+
image: /images/gateway/bacnet-connector/examples/connector-configuration-attribute-updates-1.png,
24+
title: Scroll down to the “**Attribute updates**” section and click on the “**Pencil**” icon to edit the attribute updates.
25+
===
26+
image: /images/gateway/bacnet-connector/examples/connector-configuration-attribute-updates-2.png,
27+
title: Click on the “**Add attribute update**” button. In our case, we will add `relay` attribute update, so the “**Key**” field, enter `relay`, select the “**Object ID**” as **Analog Input** and "**1**", "**Property ID**" as "**Present Value**".
28+
===
29+
image: /images/gateway/bacnet-connector/examples/connector-configuration-attribute-updates-3.png,
30+
title: Remember to save your changes by clicking the “**Apply**” button and click save connector configuration button.
31+
'
32+
%}
33+
34+
{% include images-gallery.liquid showListImageTitles="true" imageCollection=attributeUpdates %}
35+
36+
Now we can check if the attribute update works. Go to "**Entities**" → "**Devices**" → select a created
37+
device → "**Attributes**" tab → select "**Shared attributes**" → click on the "**+**" icon and add `relay` attribute
38+
with type "**Boolean**" set it to "**True**".
39+
40+
{% assign attributeUpdates2 = '
41+
===
42+
image: /images/gateway/bacnet-connector/examples/connector-configuration-attribute-updates-4.png,
43+
===
44+
image: /images/gateway/bacnet-connector/examples/connector-configuration-attribute-updates-5.png,
45+
'
46+
%}
47+
48+
{% include images-gallery.liquid showListImageTitles="false" imageCollection=attributeUpdates2 %}
49+
50+
Now, let’s check the value of the relay Object ID. In the selected device, go to the "**Last telemetry**" tab and
51+
check the value of the `relay` telemetry. It should be `true` since we set the shared attribute to `true`.
52+
53+
![image](/images/gateway/bacnet-connector/examples/connector-configuration-attribute-updates-6.png)
54+
55+
Try to change the value of the `relay` shared attribute to `false`. After a few seconds, you should see that the
56+
`relay` telemetry value has changed to `false`, which means that the attribute update worked correctly.
57+
58+
Full configuration for BACnet connector for the examples above will look like this
59+
(**make sure to use the right device host and port**):
60+
61+
```json
62+
{
63+
"application": {
64+
"objectName": "TB_gateway",
65+
"host": "YOUR_HOST",
66+
"port": 47808,
67+
"objectIdentifier": 599,
68+
"vendorIdentifier": 15,
69+
"maxApduLengthAccepted": 1476,
70+
"segmentationSupported": "segmentedBoth",
71+
"networkNumber": 3,
72+
"deviceDiscoveryTimeoutInSec": 5
73+
},
74+
"devices": [
75+
{
76+
"altResponsesAddresses": [],
77+
"host": "YOUR_DEVICE_HOST",
78+
"port": 47808,
79+
"networkMask": "",
80+
"deviceInfo": {
81+
"deviceNameExpression": "${objectName}",
82+
"deviceProfileExpression": "default",
83+
"deviceNameExpressionSource": "expression",
84+
"deviceProfileExpressionSource": "constant"
85+
},
86+
"pollPeriod": 10000,
87+
"timeseries": [
88+
{
89+
"key": "relay",
90+
"objectType": "binaryInput",
91+
"objectId": 1,
92+
"propertyId": "presentValue"
93+
}
94+
],
95+
"attributes": [],
96+
"attributeUpdates": [
97+
{
98+
"key": "relay",
99+
"objectType": "binaryInput",
100+
"objectId": 1,
101+
"propertyId": "presentValue"
102+
}
103+
],
104+
"serverSideRpc": []
105+
}
106+
]
107+
}
108+
```
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
Every telemetry and attribute parameter has `GET` and `SET` RPC methods out of the box, so you don’t need to configure
2+
them manually.
3+
4+
As an example, we will use a BACnet controller to which a relay is connected. We also know that the relay has the
5+
following object ID: `Binary Input:1`.
6+
7+
We will use this object ID to read the value of the relay using the `GET` RPC method and to set the value of the relay
8+
using the `SET` RPC method. The configuration for this telemetry will look like this:
9+
10+
```json
11+
{
12+
"key": "relay",
13+
"objectType": "binaryInput",
14+
"objectId": 1,
15+
"propertyId": "presentValue"
16+
}
17+
```
18+
19+
Let’s check the value of the relay using the reserved `GET` method. To get the current value of the relay, run the query
20+
in the RPC debug terminal:
21+
22+
```bash
23+
get objectType=binaryInput;objectId=1;propertyId=presentValue;
24+
```
25+
26+
Response:
27+
28+
```json
29+
{"result": {"value": "inactive"}}
30+
```
31+
32+
![image](/images/gateway/bacnet-connector/examples/reserved-rpc-result-1.png)
33+
34+
So, the `GET` method returns the current value of the relay, and we can see that the relay is off.
35+
36+
{% capture difference %}
37+
The RPC Debug Terminal is used only for example purpose, so you can use any other widget that supports RPC calls.
38+
{% endcapture %}
39+
{% include templates/info-banner.md content=difference %}
40+
41+
To set the value of the relay and turn it on, run the query:
42+
43+
```bash
44+
set objectType=binaryInput;objectId=1;propertyId=presentValue;value=1;
45+
```
46+
47+
Response:
48+
49+
```json
50+
{"result": {"value": 1}}
51+
```
52+
53+
And as you can see, from the screenshot below, the relay telemetry value has changed to `1`:
54+
55+
![image](/images/gateway/bacnet-connector/examples/reserved-rpc-result-2.png)
56+
57+
Also, let’s check the value of the relay telemetry again:
58+
59+
```bash
60+
get objectType=binaryInput;objectId=1;propertyId=presentValue;
61+
```
62+
63+
Response:
64+
65+
```json
66+
{"result": {"value": "active"}}
67+
```
68+
69+
![image](/images/gateway/bacnet-connector/examples/reserved-rpc-result-3.png)
70+
71+
Full configuration for BACnet connector for the examples above will look like this
72+
(**make sure to use the right device host and port**):
73+
74+
```json
75+
{
76+
"application": {
77+
"objectName": "TB_gateway",
78+
"host": "YOUR_HOST",
79+
"port": 47808,
80+
"objectIdentifier": 599,
81+
"vendorIdentifier": 15,
82+
"maxApduLengthAccepted": 1476,
83+
"segmentationSupported": "segmentedBoth",
84+
"deviceDiscoveryTimeoutInSec": 5
85+
},
86+
"devices": [
87+
{
88+
"altResponsesAddresses": [],
89+
"host": "YOUR_DEVICE_HOST",
90+
"port": 47808,
91+
"deviceInfo": {
92+
"deviceNameExpression": "${objectName}",
93+
"deviceProfileExpression": "default",
94+
"deviceNameExpressionSource": "expression",
95+
"deviceProfileExpressionSource": "constant"
96+
},
97+
"pollPeriod": 10000,
98+
"timeseries": [
99+
{
100+
"key": "relay",
101+
"objectType": "binaryInput",
102+
"objectId": 1,
103+
"propertyId": "presentValue"
104+
}
105+
],
106+
"attributes": [],
107+
"attributeUpdates": [],
108+
"serverSideRpc": []
109+
}
110+
]
111+
}
112+
```

0 commit comments

Comments
 (0)