Changes for page BACnet
Last modified by Kilight Cao on 2025/06/03 14:23
From version 32.1
edited by Kilight Cao
on 2025/06/03 14:14
on 2025/06/03 14:14
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 9 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Kilight1 +XWiki.Xiaoling - Content
-
... ... @@ -18,135 +18,193 @@ 18 18 === 1.1.2 List supported products and requirements === 19 19 20 20 21 -Gateway model: LPS8v2,LG01v2,MS20 ,MS48-LR21 +Gateway model: LPS8v2,LG01v2,MS20 22 22 23 23 24 -= 2.BridgeLoRaWANnetworktoBACnetnetwork=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 - LPS8v2includesalocal ChirpStack Server. This example shows how to configureSN50V3_LB to use with BACnet.This example assumes users already have:33 +[[image:image-20230401114036-1.png]] 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. 33 33 34 - Belowarethe steps toconfigurelps8v2BACnet.36 +== 1.3 Configure BACnet == 35 35 36 36 37 - ==2.1 Registergateway==39 +After BACnet is installed, run commands to modify BACnet configurations 38 38 41 +(% style="color:red" %)**Note: device_port and bacnet_ip_port are not set to the same** 39 39 40 -For information on how to register a gateway connection to chirpstack, please refer to the link: 43 +(% class="box infomessage" %) 44 +((( 45 +**nano /etc/config/bacnet** 46 +))) 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]]**48 +**Examples:** 43 43 50 +(% class="box infomessage" %) 51 +((( 52 +config settings 'general' 53 + option bacnet_ip '10.130.2.80' #The IP address of the BACnetIP network, here basically the same IP as the bbmd address below 54 + 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 55 + option bbmd_address '10.130.2.80' #bbmd is the BACnet registration server. Only one bbmd server is required in the same ip network 56 + option bbmd_port '47808' #In general, 47808 is used as the default port 57 + 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 58 +))) 44 44 45 -== 2.2 Register Node == 60 +(% class="box infomessage" %) 61 +((( 62 +config settings 'bacdev_1' 63 + option device_name 'LHT65N-1' #The identification name of the bacnet device 64 + option device_id '10001' #The unique identification code in the same network segment of BACnet,Scope is(1 - 4194302) 65 + option device_port '47912' #The IP port occupied by Bacnet when it starts, Scope is (1024 - 65535) 66 +))) 46 46 47 -For information on how to register a Node connection to chirpstack, please refer to the link: 68 +(% class="box infomessage" %) 69 +((( 70 +config settings 'bacdev_2' 71 + option device_name 'LHT65N-2' 72 + option device_id '10002' 73 + option device_port '47913' 74 +))) 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]]** 50 50 77 +== 1.4 Run BACnet == 51 51 52 -== 2.3 Configure BACnet == 53 53 54 -After co mpletingthestepsof registeringthegatewayandnodesasmentionedabove,startconfiguringBACnet80 +After the configuration is complete, run the following command to start BACnet, The following are two ways to run BACnet: 55 55 56 - Video on the configurationofBACnet:82 +(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): 57 57 84 +(% class="box infomessage" %) 85 +((( 86 +**bacserver -c -s** 87 +))) 58 58 59 -=== Step 1. Enable BACnet === 60 60 61 - First,Uesrsneed toclick "**BACnet~-~->BACnetServer**"in thepage90 +(2) Without /etc/config/bacnet, and to run the registration server on the current machine, start it with the following command: 62 62 63 -1.(% style="color:blue" %)**Enable BACnet**(%%):enable/ disable the BACnet mode 92 +(% class="box infomessage" %) 93 +((( 94 +**bacserver -s -a 10.130.2.80 -p 47808 ** 95 +))) 64 64 65 - 2.(%style="color:blue"%)**Mode**(%%):Configure theUDPmode97 +This command simulates two devices, with device IDs 47910 and 47911 66 66 67 - 3.(% style="color:blue" %)**UDP Port**(%%):UDP/IP port numberforBACnet/IPcommunications.99 +Enter bacserver -h to output help 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. 101 +(% class="box infomessage" %) 102 +((( 103 +**bacserver -h ** 104 +))) 70 70 71 - 5.(% style="color:blue" %)**Device Name**(%%):Determined by themanufacturer, indicatingthedevice model.106 +[[image:image-20230401114458-2.png]] 72 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 74 75 - 7.(%style="color:blue"%)**BBMD IP Address**(%%):IPv4addressofBBMD or externaldeviceregistrar.109 +== 1.5 Read devices and modify devices == 76 76 77 -8.(% style="color:blue" %)**BBMD IP Port**(%%):UDP/IP port number for external device registration 78 78 79 - 9.(% style="color:blue"%)**BBMDSubnetMask**(%%):UDP/IP SubnetMask number for externaldevice registration112 +Enter baccli -h to output help 80 80 81 -10.(% style="color:blue" %)**BBMD TimeToLive**(%%):Number of seconds used in Foreign Device Registration. 114 +(% class="box infomessage" %) 115 +((( 116 +**baccli -h ** 117 +))) 82 82 83 - 11.(% style="color:blue" %)**Save&Apply**(%%):Clickafter the configuration is completed119 +[[image:image-20230401114641-3.png]] 84 84 85 -12.(% style="color:blue" %)**Refresh**(%%):Refresh the configuration 86 86 87 - [[image:image-20250603115501-1.png]]122 +**Examples:** 88 88 124 +**(1) List the current Bacnet devices:** 89 89 90 -After starting BACnet, use Yabe BACnet tool to check 126 +(% class="box infomessage" %) 127 +((( 128 +**baccli -l -a** 129 +))) 91 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 host131 +[[image:image-20230401114653-4.png]] 93 93 94 -[[image:image-20250603134617-2.png||height="795" width="1262"]] 95 95 96 - [[image:image-20250603134854-4.png||height="796"width="1262"]]134 +**(2) List device information based on device ID:** 97 97 136 +(% class="box infomessage" %) 137 +((( 138 +**baccli -l -i id** 139 +))) 98 98 99 - === Step 2. ConfigureBACnet Object ===141 +[[image:image-20230401114706-5.png]] 100 100 101 101 102 - Theuser returnsto the"**BACnet~-~->BACnet Object**"interfaceto generateobjectdata144 +**(3) List the device details by device ID:** 103 103 104 -(% style="color:blue" %)**Object Name**(%%):Show the name of the BACnet object already created. 146 +(% class="box infomessage" %) 147 +((( 148 +**baccli -l -v -i id** 149 +))) 105 105 106 -(% style="color:blue" %)**Object Type**(%%):Show the type of the BACnet object already created. 107 107 108 - (% style="color:blue" %)**Object Value**(%%):ShowtheObject value oftheBACnet object alreadycreated.152 +**(4) Modify the specified attribute value based on the device ID:** 109 109 110 -(% style="color:blue" %)**Object Units**(%%):Show the units of the BACnet object already created. 154 +(% class="box infomessage" %) 155 +((( 156 +**baccli -i id -p prop -w value** 157 +))) 111 111 112 - (% style="color:blue" %)**Object Description**(%%):Set the descriptionof the BACnet object.159 +[[image:image-20230401114720-6.png]] 113 113 114 -(% style="color:blue" %)**Last Seen**(%%):Show the latest update time of the current value of the BACnet object already created. 115 115 116 - [[image:image-20250603135033-5.png]]162 +**(5) Check the results using the BACnet tool** 117 117 164 +The user can check the data of the device by using the **[[yabe BACnet tool>>https://sourceforge.net/projects/yetanotherbacnetexplorer/]]** 118 118 119 - When the chirpstack built into thegateway can view the decoded data, click "**Create Objects**" in the "**BACnet~-~->BACnet Object**"page to check the sensor dataand additto the BACnet Object.166 +[[image:image-20230401114729-7.png||height="521" width="1077"]] 120 120 121 -[[image:image-20250603140126-6.png||height="656" width="1247"]] 122 122 169 +== 1.6 Example: How to transfer data to BACnet via LoRaWAN in LPS8v2 == 123 123 124 -For example, configure the BACnet sensor data as follows 125 125 126 - 1.(%style="color:blue"%)**CreateObjects**(%%):CreateObject172 +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: 127 127 128 - 2.(%style="color:blue"%)**LoRaDevice**(%%):SelectthesensordeviceDevEUI that needs to beadded174 +* LHT65N register on LPS8v2 Built-In TTN server already 129 129 130 - 3.(%style="color:blue"%)**Decodekey**(%%):Select therequiredsensor decodingdata176 +* The user is able to see the data on the built-in TTN server device page. 131 131 132 - 4.(%style="color:blue"%)**Object Name**(%%):ConfigureobjectName178 +* The LPS8v2 already has BACnet installed 133 133 134 - 5.(% style="color:blue"%)**ObjectType**(%%):SelectObjectType180 +Below are the steps to plot the sensor data on LPS8v2 BACnet. 135 135 136 -6.(% style="color:blue" %)**Object Units**(%%):Select the Object unit 137 137 138 - 7.(% style="color:blue"%)**Object Descripyion**(%%):Setthe description of theBACnet object.183 +=== 1.6.1 Link BACnet to Local TTN === 139 139 140 -8.(% style="color:blue" %)**Create** 141 141 142 - [[image:image-20250603140746-8.png||height="577"width="1342"]]186 +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"]]** 143 143 144 - ===step3.CheckResult===188 +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]]** 145 145 146 -After completing all the above configurations, check the BACnet data 147 147 148 - [[image:image-20250603141358-9.png||height="846"width="1342"]]191 +After importing the Input Flow is complete, the user needs to edit the MQTT in the node 149 149 193 +Users can edit the MQTT node red color by referring to the following link: 150 150 195 +[[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]] 151 151 197 +[[image:image-20230401144951-10.png||height="814" width="1223"]] 198 + 199 + 200 +=== 1.6.2 Check result === 201 + 202 + 203 +[[image:image-20230401142357-8.png||height="677" width="1232"]] 204 + 205 + 206 +The BACnet tool displays the temperature, humidity and battery voltage of the LHT65N 207 + 208 +[[image:image-20230401144525-9.png||height="487" width="1237"]] 209 + 152 152
- 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