Changes for page BACnet

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

From version 22.1
edited by Kilight Cao
on 2025/06/03 11:55
Change comment: Uploaded new attachment "image-20250603115501-1.png", version {1}
To version 19.1
edited by Kilight Cao
on 2023/04/01 16:24
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -18,46 +18,177 @@
18 18  === 1.1.2 List supported products and requirements ===
19 19  
20 20  
21 -Gateway model: LPS8v2,LG01v2,MS20,MS48-LR
21 +Gateway model: LPS8v2,LG01v2,MS20
22 22  
23 23  
24 -= 2. Bridge LoRaWAN network to BACnet network =
24 +== 1.2 Download and Install the BACnet ==
25 25  
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
27 +(% class="box infomessage" %)
28 +(((
29 +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]]
30 +dpkg -i dragino-bacnet-apps-hp0c-2023-03-01.deb
31 +)))
28 28  
29 -LPS8v2 includes a local ChirpStack Server. This example shows how to configure LHT65N to use with BACnet. This example assumes users already have:
33 +[[image:image-20230401114036-1.png]]
30 30  
31 -* LHT65N 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.
33 33  
34 -Below are the steps to configure lps8v2 BACnet.
36 +== 1.3 Configure BACnet ==
35 35  
38 +After BACnet is installed, run commands to modify BACnet configurations
36 36  
37 -== 2.1 Register gateway ==
40 +**Note: device_port and bacnet_ip_port are not set to the same**
38 38  
42 +(% class="box infomessage" %)
43 +(((
44 +nano /etc/config/bacnet
45 +)))
39 39  
40 -For information on how to register a gateway connection to chirpstack, please refer to the link:
47 +**Examples:**
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]]**
49 +(% class="box infomessage" %)
50 +(((
51 +config settings 'general'
52 + option bacnet_ip '10.130.2.80'  #The IP address of the BACnetIP network, here basically the same IP as the bbmd address below
53 + 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
54 + option bbmd_address '10.130.2.80'  #bbmd is the BACnet registration server. Only one bbmd server is required in the same ip network
55 + option bbmd_port '47808'  #In general, 47808 is used as the default port
56 + 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
57 +)))
43 43  
59 +(% class="box infomessage" %)
60 +(((
61 +config settings 'bacdev_1'
62 + option device_name 'LHT65N-1'  #The identification name of the bacnet device
63 + option device_id '10001'  #The unique identification code in the same network segment of BACnet,Scope is(1 - 4194302)
64 + option device_port '47912'  #The IP port occupied by Bacnet when it starts, Scope is (1024 - 65535)
65 +)))
44 44  
45 -== 2.2  Register Node ==
67 +(% class="box infomessage" %)
68 +(((
69 +config settings 'bacdev_2'
70 + option device_name 'LHT65N-2'
71 + option device_id '10002'
72 + option device_port '47913'  
73 +)))
46 46  
47 -For information on how to register a Node connection to chirpstack, please refer to the link:
75 +== 1.4 Run BACnet ==
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]]**
77 +After the configuration is complete, run the following command to start BACnet, The following are two ways to run BACnet:
50 50  
79 +(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):
51 51  
52 -== 2.3 Configure BACnet ==
81 +(% class="box infomessage" %)
82 +(((
83 +bacserver -c -s
84 +)))
53 53  
54 -After completing the steps of registering the gateway and nodes as mentioned above, start configuring BACnet
86 +(2) Without /etc/config/bacnet, and to run the registration server on the current machine, start it with the following command:
55 55  
56 -Video on the configuration of BACnet:
88 +(% class="box infomessage" %)
89 +(((
90 +bacserver -s -a 10.130.2.80 -p 47808
91 +)))
57 57  
93 +This command simulates two devices, with device IDs 47910 and 47911
58 58  
59 -=== Step 1. Enable BACnet ===
95 +Enter bacserver -h to output help
60 60  
97 +(% class="box infomessage" %)
98 +(((
99 +bacserver -h
100 +)))
61 61  
102 +[[image:image-20230401114458-2.png]]
62 62  
63 -
104 +== 1.5 Read devices and modify devices ==
105 +
106 +Enter baccli -h to output help
107 +
108 +(% class="box infomessage" %)
109 +(((
110 +baccli -h
111 +)))
112 +
113 +[[image:image-20230401114641-3.png]]
114 +
115 +
116 +**Examples:**
117 +
118 +(1) List the current Bacnet devices:
119 +
120 +(% class="box infomessage" %)
121 +(((
122 +baccli -l -a
123 +)))
124 +
125 +[[image:image-20230401114653-4.png]]
126 +
127 +
128 +(2) List device information based on device ID:
129 +
130 +(% class="box infomessage" %)
131 +(((
132 +baccli -l -i id
133 +)))
134 +
135 +[[image:image-20230401114706-5.png]]
136 +
137 +(3) List the device details by device ID:
138 +
139 +(% class="box infomessage" %)
140 +(((
141 +baccli -l -v -i id
142 +)))
143 +
144 +(4) Modify the specified attribute value based on the device ID:
145 +
146 +(% class="box infomessage" %)
147 +(((
148 +baccli -i id -p prop -w value
149 +)))
150 +
151 +[[image:image-20230401114720-6.png]]
152 +
153 +
154 +(5)Check the results using the BACnet tool
155 +
156 +The user can check the data of the device by using the **[[yabe BACnet tool>>https://sourceforge.net/projects/yetanotherbacnetexplorer/]]**
157 +
158 +[[image:image-20230401114729-7.png||height="521" width="1077"]]
159 +
160 +
161 +== 1.6 Example: How to transfer data to BACnet via LoRaWAN in LPS8v2 ==
162 +
163 +LPS8v2 includes a local TTN Server and Node-Red. This example shows how to configure LHT65N to use with the BACnet. This example assumes users already have:
164 +
165 +* LHT65N register on LPS8v2 Built-In TTN server already
166 +* The user is able to see the data on the built-in TTN server device page.
167 +* The LPS8v2 already has BACnet installed
168 +
169 +Below are the steps to plot the sensor data on LPS8v2 BACnet.
170 +
171 +
172 +=== 1.6.1 Link BACnet to Local TTN ===
173 +
174 +Users can download the Node-Red decoder from this link and import it into the Node-Red platform: **[[attach:LHT65N_TTN_to_BACnet.json||target="_blank"]]**
175 +
176 +For more information on importing Input Flow, check out this link:**[[Import Input Flow for Dragino Sensors>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Node-RED/#H3.A0ImportInputFlowforDraginoSensors]]**
177 +
178 +
179 +After importing the Input Flow is complete, the user needs to edit the MQTT in the node
180 +
181 +Users can edit the MQTT node red color by referring to the following link:
182 +
183 +[[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20TTN/#H6.3A0Example:UseLocalServerTTNandNode-RedinLPS8v2>>http://wiki.dragino.com/xwiki/bin/view/Main/Notes%20for%20TTN/#H6.3A0Example:UseLocalServerTTNandNode-RedinLPS8v2]]
184 +
185 +[[image:image-20230401144951-10.png||height="814" width="1223"]]
186 +
187 +=== 1.6.2 Check result. ===
188 +
189 +[[image:image-20230401142357-8.png||height="677" width="1232"]]
190 +
191 +
192 +The BACnet tool displays the temperature, humidity and battery voltage of the LHT65N
193 +
194 +[[image:image-20230401144525-9.png||height="487" width="1237"]]
image-20250603115501-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Kilight
Size
... ... @@ -1,1 +1,0 @@
1 -67.0 KB
Content