Changes for page BACnet

Last modified by Kilight Cao on 2025/06/03 14:23

From version 33.1
edited by Kilight Cao
on 2025/06/03 14:15
Change comment: There is no comment for this version
To version 6.1
edited by Kilight Cao
on 2023/04/01 11:46
Change comment: Uploaded new attachment "image-20230401114653-4.png", version {1}

Summary

Details

Page properties
Content
... ... @@ -1,152 +1,91 @@
1 -**Table of Contents:**
1 +== 2.7 How to install BACnet ==
2 2  
3 -{{toc/}}
3 +wget [[http:~~/~~/dragino.vicp.io:6080/bacnet/dragino-bacnet-apps-hp0c-2023-03-01.deb>>url:http://dragino.vicp.io:6080/bacnet/dragino-bacnet-apps-hp0c-2023-03-01.deb]]
4 +dpkg -i dragino-bacnet-apps-hp0c-2023-03-01.deb
4 4  
6 +[[image:image-20230327152105-1.png||height="163" width="933"]]
5 5  
6 -= 1. BACnet =
8 +=== 2.7.1 Configure BACnet ===
7 7  
8 -== 1.1  Introduction ==
10 +After BACnet is installed, run commands to modify BACnet configurations
9 9  
10 -=== 1.1.1 What is BACnet ===
12 +**Note: device_port and bacnet_ip_port are not set to the same**
11 11  
14 +nano /etc/config/bacnet
12 12  
13 -BACnet, short for Building Automation and Control networks.
16 +**Examples:**
14 14  
15 -The BACnet communication protocol defines a number of services for communication between devices, and services can be divided into five categories: services related to device object management including Who-Is, I-Am, Who-Has, and other services, services related to object access including reading attributes, writing attributes and other services, and services related to alarms and events include acknowledgment alarms, change of state reports, etc. In addition, there are services related to file reading and writing and virtual terminals.
18 +config settings 'general'
19 + option bacnet_ip '10.130.2.80'  #The IP address of the BACnetIP network, here basically the same IP as the bbmd address below
20 + option bacnet_ip_port '47808'  #As with bbmd_port, the purpose of this is to register a Bacnet Server application as a bbmd registration server
21 + option bbmd_address '10.130.2.80'  #bbmd is the BACnet registration server. Only one bbmd server is required in the same ip network
22 + option bbmd_port '47808'  #In general, 47808 is used as the default port
23 + option bacnet_dev_count '2'  #Here is the number of BACnet devices that need to be simulated, if the number is 2, then the following settings must have 2, which are bacdev_1, bacdev_2
16 16  
25 +config settings 'bacdev_1'
26 + option device_name 'LHT65N-1'  #The identification name of the bacnet device
27 + option device_id '10001'  #The unique identification code in the same network segment of BACnet,Scope is(1 - 4194302)
28 + option device_port '47912'  #The IP port occupied by Bacnet when it starts, Scope is (1024 - 65535)
17 17  
18 -=== 1.1.2 List supported products and requirements ===
30 +config settings 'bacdev_2'
31 + option device_name 'LHT65N-2'
32 + option device_id '10002'
33 + option device_port '47913'  
19 19  
35 +=== 2.7.2 Run BACnet ===
20 20  
21 -Gateway model: LPS8v2,LG01v2,MS20,MS48-LR
37 +After the configuration is complete, run the following command to start BACnet, The following are two ways to run BACnet:
22 22  
39 +(1) With /etc/config/bacnet configuration, and to run the registration server on the current machine, start it with the following command (configure the /etc/config/bacnet file correctly):
23 23  
24 -= 2. Bridge LoRaWAN network to BACnet network =
41 +bacserver -c -s
25 25  
43 +(2) Without /etc/config/bacnet, and to run the registration server on the current machine, start it with the following command:
26 26  
27 -By following the steps below in the configuration example, Users can convert the uplink data of the lorawan sensor to BACnet data
45 +bacserver -s -a 10.130.2.80 -p 47808
28 28  
29 -LPS8v2 includes a local ChirpStack Server. This example shows how to configure SN50V3_LB to use with BACnet. This example assumes users already have:
47 +This command simulates two devices, with device IDs 47910 and 47911
30 30  
31 -* SN50V3_LB register on LPS8v2 Built-In ChirpStack server already
32 -* The user is able to see the data on the built-in ChirpStack server device page.
49 +Enter bacserver -h to output help
33 33  
34 -Below are the steps to configure lps8v2 BACnet.
51 +bacserver -h
35 35  
53 +[[image:image-20230327154700-3.png]]
36 36  
37 -== 2.1 Register gateway ==
55 +=== 2.7.3 Read devices and modify devices ===
38 38  
57 +Enter baccli -h to output help
39 39  
40 -For information on how to register a gateway connection to chirpstack, please refer to the link:
59 +baccli -h
41 41  
42 -**[[https:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20ChirpStack/#H4.A0SemtechUDPforChirpStackv4>>https://wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20ChirpStack/#H4.A0SemtechUDPforChirpStackv4]]**
61 +[[image:image-20230327165836-1.png]]
43 43  
63 +**Examples:**
44 44  
45 -== 2.2 Register Node ==
65 +(1) List the current Bacnet devices:
46 46  
47 -For information on how to register a Node connection to chirpstack, please refer to the link:
67 +baccli -l -a
48 48  
49 -**[[https:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20ChirpStack/#H2.A0Nodeusageintroduction>>https://wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20ChirpStack/#H2.A0Nodeusageintroduction]]**
69 +[[image:image-20230327174537-3.png]]
50 50  
71 +(2) List device information based on device ID:
51 51  
52 -== 2.3 Configure BACnet ==
73 +baccli -l -i id
53 53  
54 -After completing the steps of registering the gateway and nodes as mentioned above, start configuring BACnet
75 +[[image:image-20230327174556-4.png]]
55 55  
56 -Video on the configuration of BACnet:
77 +(3) List the device details by device ID:
57 57  
79 +baccli -l -v -i id
58 58  
59 -=== Step 1. Enable BACnet ===
81 +(4) Modify the specified attribute value based on the device ID:
60 60  
61 -First, Uesrs need to click "**BACnet~-~->BACnet Server**" in the page
83 +baccli -i id -p prop -w value
62 62  
63 -1.(% style="color:blue" %)**Enable BACnet**(%%):enable/ disable the BACnet mode
85 +[[image:image-20230327174853-5.png]]
64 64  
65 -2.(% style="color:blue" %)**Mode**(%%):Configure the UDP mode
87 +The user can check the data of the device by using the **[[yabe BACnet tool>>https://sourceforge.net/projects/yetanotherbacnetexplorer/]]**
66 66  
67 -3.(% style="color:blue" %)**UDP Port**(%%):UDP/IP port number for BACnet/IP communications.
89 +[[image:image-20230327171824-2.png]]
68 68  
69 -4.(% style="color:blue" %)**Device ID**(%%):This is the unique BACnet device identifier. The user has to be careful to avoid conflicts, by choosing an identifier, that is not currently used on the network.
70 -
71 -5.(% style="color:blue" %)**Device Name**(%%):Determined by the manufacturer, indicating the device model.
72 -
73 -6.(% style="color:blue" %)**Enable BBMD**(%%):BBMD is a "BACnet/IP Broadcast Management Device" and is used to distribute BACnet broadcast messages throughout a BACnet/IP network consisting of interconnected TCP/IP sub-networks. A BBMD forwards BACnet/IP broadcast messages sent by devices connected to its subnet to peer BBMDs. Upon arrival at a destination BBMD, the message is then re-broadcast on that subnet. BACnet/IP broadcast messages are also sent to registered BACnet/IP Foreign Devices.
74 -
75 -7.(% style="color:blue" %)**BBMD IP Address**(%%):IPv4 address of BBMD or external device registrar.
76 -
77 -8.(% style="color:blue" %)**BBMD IP Port**(%%):UDP/IP port number for external device registration
78 -
79 -9.(% style="color:blue" %)**BBMD Subnet Mask**(%%):UDP/IP Subnet Mask number for external device registration
80 -
81 -10.(% style="color:blue" %)**BBMD TimeToLive**(%%):Number of seconds used in Foreign Device Registration.
82 -
83 -11.(% style="color:blue" %)**Save&Apply**(%%):Click after the configuration is completed
84 -
85 -12.(% style="color:blue" %)**Refresh**(%%):Refresh the configuration
86 -
87 -[[image:image-20250603115501-1.png]]
88 -
89 -
90 -After starting BACnet, use Yabe BACnet tool to check
91 -
92 -Click the "[[image:image-20250603134823-3.png]]" to configure the connection to BACnet. Note that the Port needs to match the previous step, and the local endpoint is the address of the local host
93 -
94 -[[image:image-20250603134617-2.png||height="795" width="1262"]]
95 -
96 -[[image:image-20250603134854-4.png||height="796" width="1262"]]
97 -
98 -
99 -=== Step 2. Configure BACnet Object ===
100 -
101 -
102 -The user returns to the "**BACnet~-~->BACnet Object**" interface to generate object data
103 -
104 -(% style="color:blue" %)**Object Name**(%%):Show the name of the BACnet object already created.
105 -
106 -(% style="color:blue" %)**Object Type**(%%):Show the type of the BACnet object already created.
107 -
108 -(% style="color:blue" %)**Object Value**(%%):Show the Object value of the BACnet object already created.
109 -
110 -(% style="color:blue" %)**Object Units**(%%):Show the units of the BACnet object already created.
111 -
112 -(% style="color:blue" %)**Object Description**(%%):Set the description of the BACnet object.
113 -
114 -(% style="color:blue" %)**Last Seen**(%%):Show the latest update time of the current value of the BACnet object already created.
115 -
116 -[[image:image-20250603135033-5.png]]
117 -
118 -
119 -When the chirpstack built into the gateway can view the decoded data, click "**Create Objects**" in the "**BACnet~-~->BACnet Object**" page to check the sensor data and add it to the BACnet Object.
120 -
121 -[[image:image-20250603140126-6.png||height="656" width="1247"]]
122 -
123 -
124 -For example, configure the BACnet sensor data as follows
125 -
126 -1.(% style="color:blue" %)**Create Objects**(%%):Create Object
127 -
128 -2.(% style="color:blue" %)**LoRa Device**(%%):Select the sensor device DevEUI that needs to be added
129 -
130 -3.(% style="color:blue" %)**Decode key**(%%):Select the required sensor decoding data
131 -
132 -4.(% style="color:blue" %)**Object Name**(%%):Configure object Name
133 -
134 -5.(% style="color:blue" %)**Object Type**(%%):Select Object Type
135 -
136 -6.(% style="color:blue" %)**Object Units**(%%):Select the Object unit
137 -
138 -7.(% style="color:blue" %)**Object Descripyion**(%%):Set the description of the BACnet object.
139 -
140 -8.(% style="color:blue" %)**Create**
141 -
142 -[[image:image-20250603140746-8.png||height="577" width="1342"]]
143 -
144 -=== step 3. Check Result ===
145 -
146 -After completing all the above configurations, check the BACnet data
147 -
148 -[[image:image-20250603141358-9.png||height="846" width="1342"]]
149 -
150 -
151 -
152 152  
LHT65N_TTN_to_BACnet.json
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -8.2 KB
Content
... ... @@ -1,334 +1,0 @@
1 -[
2 - {
3 - "id": "b356382079d5c6a0",
4 - "type": "tab",
5 - "label": "TTN to BACnet",
6 - "disabled": false,
7 - "info": "",
8 - "env": []
9 - },
10 - {
11 - "id": "f66b1b60040f4067",
12 - "type": "template",
13 - "z": "b356382079d5c6a0",
14 - "name": "LHT65N-1 10001 battery",
15 - "field": "payload",
16 - "fieldType": "msg",
17 - "format": "handlebars",
18 - "syntax": "mustache",
19 - "template": "baccli -i 10001 -p battery -w {{payload}}\n",
20 - "output": "str",
21 - "x": 590,
22 - "y": 100,
23 - "wires": [
24 - [
25 - "d9290c0c62e0f7c0",
26 - "cc39d099b49cf9fe"
27 - ]
28 - ]
29 - },
30 - {
31 - "id": "d9290c0c62e0f7c0",
32 - "type": "exec",
33 - "z": "b356382079d5c6a0",
34 - "command": "",
35 - "addpay": "payload",
36 - "append": "",
37 - "useSpawn": "false",
38 - "timer": "",
39 - "winHide": false,
40 - "oldrc": false,
41 - "name": "EXEC",
42 - "x": 1050,
43 - "y": 220,
44 - "wires": [
45 - [
46 - "af8dbd68b05f6313"
47 - ],
48 - [
49 - "af8dbd68b05f6313"
50 - ],
51 - []
52 - ]
53 - },
54 - {
55 - "id": "cc39d099b49cf9fe",
56 - "type": "debug",
57 - "z": "b356382079d5c6a0",
58 - "name": "Full Script",
59 - "active": true,
60 - "tosidebar": true,
61 - "console": false,
62 - "tostatus": false,
63 - "complete": "payload",
64 - "targetType": "msg",
65 - "statusVal": "",
66 - "statusType": "auto",
67 - "x": 1040,
68 - "y": 100,
69 - "wires": []
70 - },
71 - {
72 - "id": "af8dbd68b05f6313",
73 - "type": "debug",
74 - "z": "b356382079d5c6a0",
75 - "name": "output",
76 - "active": true,
77 - "tosidebar": true,
78 - "console": false,
79 - "tostatus": false,
80 - "complete": "payload",
81 - "targetType": "msg",
82 - "statusVal": "",
83 - "statusType": "auto",
84 - "x": 1210,
85 - "y": 220,
86 - "wires": []
87 - },
88 - {
89 - "id": "866c4581bd0de190",
90 - "type": "mqtt in",
91 - "z": "b356382079d5c6a0",
92 - "name": "LHT65N-1",
93 - "topic": "v3/5000000@ttn/devices/eui-d0a7a83cc714b96f/up",
94 - "qos": "0",
95 - "datatype": "auto-detect",
96 - "broker": "d1413e55f801d787",
97 - "nl": false,
98 - "rap": true,
99 - "rh": 0,
100 - "inputs": 0,
101 - "x": 120,
102 - "y": 140,
103 - "wires": [
104 - [
105 - "09bb2ca9b68d9137",
106 - "3b08d85a66d0c58a"
107 - ]
108 - ]
109 - },
110 - {
111 - "id": "09bb2ca9b68d9137",
112 - "type": "function",
113 - "z": "b356382079d5c6a0",
114 - "name": "function 3",
115 - "func": "var data = msg.payload\nvar bat = data[\"uplink_message\"][\"decoded_payload\"][\"BatV\"]\nvar tem = data[\"uplink_message\"][\"decoded_payload\"][\"TempC_DS\"]\nvar tem2 = data[\"uplink_message\"][\"decoded_payload\"][\"TempC_SHT\"]\nvar hum = data[\"uplink_message\"][\"decoded_payload\"][\"Hum_SHT\"]\nvar data2 = {payload: bat},data3={payload:tem},data4={payload:tem2},data5={payload:hum}\n//return data2\nreturn[data2,data3,data4,data5]",
116 - "outputs": 4,
117 - "noerr": 0,
118 - "initialize": "",
119 - "finalize": "",
120 - "libs": [],
121 - "x": 340,
122 - "y": 200,
123 - "wires": [
124 - [
125 - "f66b1b60040f4067",
126 - "0cf8a6fc743b8619"
127 - ],
128 - [
129 - "2f48e806d3e4bd5e",
130 - "0cf8a6fc743b8619"
131 - ],
132 - [
133 - "0cf8a6fc743b8619",
134 - "15c7503d379cb571"
135 - ],
136 - [
137 - "700c1799a8cd28a1",
138 - "0cf8a6fc743b8619"
139 - ]
140 - ]
141 - },
142 - {
143 - "id": "0cf8a6fc743b8619",
144 - "type": "debug",
145 - "z": "b356382079d5c6a0",
146 - "name": "debug 5",
147 - "active": true,
148 - "tosidebar": true,
149 - "console": false,
150 - "tostatus": false,
151 - "complete": "payload",
152 - "targetType": "msg",
153 - "statusVal": "",
154 - "statusType": "auto",
155 - "x": 340,
156 - "y": 80,
157 - "wires": []
158 - },
159 - {
160 - "id": "3b08d85a66d0c58a",
161 - "type": "debug",
162 - "z": "b356382079d5c6a0",
163 - "name": "debug 6",
164 - "active": true,
165 - "tosidebar": true,
166 - "console": false,
167 - "tostatus": false,
168 - "complete": "false",
169 - "statusVal": "",
170 - "statusType": "auto",
171 - "x": 160,
172 - "y": 240,
173 - "wires": []
174 - },
175 - {
176 - "id": "2f48e806d3e4bd5e",
177 - "type": "template",
178 - "z": "b356382079d5c6a0",
179 - "name": "LHT65N-1 10001 temp1",
180 - "field": "payload",
181 - "fieldType": "msg",
182 - "format": "handlebars",
183 - "syntax": "mustache",
184 - "template": "baccli -i 10001 -p temp1 -w {{payload}}\n",
185 - "output": "str",
186 - "x": 590,
187 - "y": 160,
188 - "wires": [
189 - [
190 - "046eca291b77ebd3"
191 - ]
192 - ]
193 - },
194 - {
195 - "id": "15c7503d379cb571",
196 - "type": "template",
197 - "z": "b356382079d5c6a0",
198 - "name": "LHT65N-1 10001 temp2",
199 - "field": "payload",
200 - "fieldType": "msg",
201 - "format": "handlebars",
202 - "syntax": "mustache",
203 - "template": "baccli -i 10001 -p temp2 -w {{payload}}",
204 - "output": "str",
205 - "x": 590,
206 - "y": 220,
207 - "wires": [
208 - [
209 - "56c2605dd962c0d4"
210 - ]
211 - ]
212 - },
213 - {
214 - "id": "56c2605dd962c0d4",
215 - "type": "delay",
216 - "z": "b356382079d5c6a0",
217 - "name": "",
218 - "pauseType": "delay",
219 - "timeout": "4",
220 - "timeoutUnits": "seconds",
221 - "rate": "1",
222 - "nbRateUnits": "1",
223 - "rateUnits": "second",
224 - "randomFirst": "1",
225 - "randomLast": "5",
226 - "randomUnits": "seconds",
227 - "drop": false,
228 - "allowrate": false,
229 - "outputs": 1,
230 - "x": 800,
231 - "y": 220,
232 - "wires": [
233 - [
234 - "d9290c0c62e0f7c0"
235 - ]
236 - ]
237 - },
238 - {
239 - "id": "046eca291b77ebd3",
240 - "type": "delay",
241 - "z": "b356382079d5c6a0",
242 - "name": "",
243 - "pauseType": "delay",
244 - "timeout": "2",
245 - "timeoutUnits": "seconds",
246 - "rate": "1",
247 - "nbRateUnits": "1",
248 - "rateUnits": "second",
249 - "randomFirst": "1",
250 - "randomLast": "5",
251 - "randomUnits": "seconds",
252 - "drop": false,
253 - "allowrate": false,
254 - "outputs": 1,
255 - "x": 800,
256 - "y": 160,
257 - "wires": [
258 - [
259 - "d9290c0c62e0f7c0"
260 - ]
261 - ]
262 - },
263 - {
264 - "id": "700c1799a8cd28a1",
265 - "type": "template",
266 - "z": "b356382079d5c6a0",
267 - "name": "LHT65N-1 10001 humidity",
268 - "field": "payload",
269 - "fieldType": "msg",
270 - "format": "handlebars",
271 - "syntax": "mustache",
272 - "template": "baccli -i 10001 -p humidity -w {{payload}}",
273 - "output": "str",
274 - "x": 590,
275 - "y": 280,
276 - "wires": [
277 - [
278 - "9a8f158109d93abb"
279 - ]
280 - ]
281 - },
282 - {
283 - "id": "9a8f158109d93abb",
284 - "type": "delay",
285 - "z": "b356382079d5c6a0",
286 - "name": "",
287 - "pauseType": "delay",
288 - "timeout": "6",
289 - "timeoutUnits": "seconds",
290 - "rate": "1",
291 - "nbRateUnits": "1",
292 - "rateUnits": "second",
293 - "randomFirst": "1",
294 - "randomLast": "5",
295 - "randomUnits": "seconds",
296 - "drop": false,
297 - "allowrate": false,
298 - "outputs": 1,
299 - "x": 800,
300 - "y": 280,
301 - "wires": [
302 - [
303 - "d9290c0c62e0f7c0"
304 - ]
305 - ]
306 - },
307 - {
308 - "id": "d1413e55f801d787",
309 - "type": "mqtt-broker",
310 - "name": "",
311 - "broker": "eu1.cloud.thethings.network",
312 - "port": "1883",
313 - "clientid": "",
314 - "autoConnect": true,
315 - "usetls": false,
316 - "protocolVersion": "4",
317 - "keepalive": "60",
318 - "cleansession": true,
319 - "birthTopic": "",
320 - "birthQos": "0",
321 - "birthPayload": "",
322 - "birthMsg": {},
323 - "closeTopic": "",
324 - "closeQos": "0",
325 - "closePayload": "",
326 - "closeMsg": {},
327 - "willTopic": "",
328 - "willQos": "0",
329 - "willPayload": "",
330 - "willMsg": {},
331 - "userProps": "",
332 - "sessionExpiry": ""
333 - }
334 -]
image-20230401114706-5.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -11.2 KB
Content
image-20230401114720-6.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -13.5 KB
Content
image-20230401114729-7.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -46.1 KB
Content
image-20230401142357-8.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -134.1 KB
Content
image-20230401144525-9.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -47.4 KB
Content
image-20230401144951-10.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -78.2 KB
Content
image-20250603115501-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -67.0 KB
Content
image-20250603134617-2.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -70.4 KB
Content
image-20250603134823-3.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -656 bytes
Content
image-20250603134854-4.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -77.7 KB
Content
image-20250603135033-5.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -85.2 KB
Content
image-20250603140126-6.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -110.7 KB
Content
image-20250603140340-7.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -104.6 KB
Content
image-20250603140746-8.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -119.5 KB
Content
image-20250603141358-9.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -69.2 KB
Content