Wiki source code of BACnet

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

Hide last authors
Kilight Cao 10.1 1 **Table of Contents:**
Kilight Cao 2.1 2
Kilight Cao 10.1 3 {{toc/}}
4
5
6 = 1. BACnet =
7
8 == 1.1  Introduction ==
9
10 === 1.1.1 What is BACnet ===
11
12
13 BACnet, short for Building Automation and Control networks.
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.
16
17
18 === 1.1.2 List supported products and requirements ===
19
20
Kilight Cao 20.1 21 Gateway model: LPS8v2,LG01v2,MS20,MS48-LR
Kilight Cao 10.1 22
23
Kilight Cao 20.1 24 = 2. Bridge LoRaWAN network to BACnet network =
Kilight Cao 10.1 25
26
Kilight Cao 20.1 27 By following the steps below in the configuration example, Users can convert the uplink data of the lorawan sensor to BACnet data
Kilight Cao 2.1 28
Kilight Cao 32.1 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:
Kilight Cao 2.1 30
Kilight Cao 32.1 31 * SN50V3_LB register on LPS8v2 Built-In ChirpStack server already
Kilight Cao 20.1 32 * The user is able to see the data on the built-in ChirpStack server device page.
Kilight Cao 2.1 33
Kilight Cao 20.1 34 Below are the steps to configure lps8v2 BACnet.
Kilight Cao 10.1 35
Xiaoling 19.2 36
Kilight Cao 20.1 37 == 2.1 Register gateway ==
Kilight Cao 2.1 38
39
Kilight Cao 20.1 40 For information on how to register a gateway connection to chirpstack, please refer to the link:
Kilight Cao 2.1 41
Kilight Cao 20.1 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]]**
Kilight Cao 2.1 43
44
Kilight Cao 33.1 45 == 2.2 Register Node ==
Kilight Cao 2.1 46
Kilight Cao 20.1 47 For information on how to register a Node connection to chirpstack, please refer to the link:
Kilight Cao 2.1 48
Kilight Cao 20.1 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]]**
Xiaoling 19.2 50
Kilight Cao 2.1 51
Kilight Cao 20.1 52 == 2.3 Configure BACnet ==
Xiaoling 19.2 53
Kilight Cao 20.1 54 After completing the steps of registering the gateway and nodes as mentioned above, start configuring BACnet
Kilight Cao 2.1 55
Kilight Cao 35.1 56 Video on the configuration of BACnet: **[[Configure BACnet>>https://www.dropbox.com/scl/fo/ztlw35a9xbkomu71u31im/AFiUxd9aLHMBUDN-7294vpM/LoRaWAN%20Gateway/MS48-LR/Video?rlkey=ojjcsw927eaow01dgooldq3nu&subfolder_nav_tracking=1&dl=0]]**
Kilight Cao 2.1 57
58
Kilight Cao 21.1 59 === Step 1. Enable BACnet ===
Xiaoling 19.2 60
Kilight Cao 32.1 61 First, Uesrs need to click "**BACnet~-~->BACnet Server**" in the page
Kilight Cao 2.1 62
Kilight Cao 32.1 63 1.(% style="color:blue" %)**Enable BACnet**(%%):enable/ disable the BACnet mode
Kilight Cao 2.1 64
Kilight Cao 32.1 65 2.(% style="color:blue" %)**Mode**(%%):Configure the UDP mode
Kilight Cao 23.1 66
Kilight Cao 32.1 67 3.(% style="color:blue" %)**UDP Port**(%%):UDP/IP port number for BACnet/IP communications.
Kilight Cao 23.1 68
Kilight Cao 32.1 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.
Kilight Cao 23.1 70
Kilight Cao 32.1 71 5.(% style="color:blue" %)**Device Name**(%%):Determined by the manufacturer, indicating the device model.
Kilight Cao 23.1 72
Kilight Cao 32.1 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.
Kilight Cao 23.1 74
Kilight Cao 32.1 75 7.(% style="color:blue" %)**BBMD IP Address**(%%):IPv4 address of BBMD or external device registrar.
Kilight Cao 23.1 76
Kilight Cao 32.1 77 8.(% style="color:blue" %)**BBMD IP Port**(%%):UDP/IP port number for external device registration
Kilight Cao 23.1 78
Kilight Cao 32.1 79 9.(% style="color:blue" %)**BBMD Subnet Mask**(%%):UDP/IP Subnet Mask number for external device registration
Kilight Cao 23.1 80
Kilight Cao 32.1 81 10.(% style="color:blue" %)**BBMD TimeToLive**(%%):Number of seconds used in Foreign Device Registration.
Kilight Cao 23.1 82
Kilight Cao 32.1 83 11.(% style="color:blue" %)**Save&Apply**(%%):Click after the configuration is completed
Kilight Cao 23.1 84
Kilight Cao 32.1 85 12.(% style="color:blue" %)**Refresh**(%%):Refresh the configuration
Kilight Cao 23.1 86
87 [[image:image-20250603115501-1.png]]
88
89
Kilight Cao 32.1 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
Kilight Cao 23.1 99 === Step 2. Configure BACnet Object ===
100
101
Kilight Cao 32.1 102 The user returns to the "**BACnet~-~->BACnet Object**" interface to generate object data
Kilight Cao 23.1 103
Kilight Cao 32.1 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
Kilight Cao 35.1 116 [[image:image-20250603141757-10.png||height="283" width="1321"]]
Kilight Cao 32.1 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
Kilight Cao 23.1 144 === step 3. Check Result ===
145
Kilight Cao 32.1 146 After completing all the above configurations, check the BACnet data
Kilight Cao 23.1 147
Kilight Cao 32.1 148 [[image:image-20250603141358-9.png||height="846" width="1342"]]
149
150
151
Xiaoling 19.2 152