Introduction
Milesight gateway is able to work as a BACnet server to set up communication between LoRaWAN devices and BMS systems or BACnet devices, which can quickly and easily integrate LoRaWAN devices to Building Management System.
Requirement
- Milesight Gateway: UG65/UG67(v60.0.0.45 and later), UG56 (v56.0.0.5 and later)
- Any LoRaWAN sensor
- Modbus Client tool: take Yabe as example
Configuration
1. Go to Network Server > Payload Codec to ensure the codec library version is 1.3.5 and later if you would like to add Milesight devices to gateway.
If the codec list does not include your devices, please custom the codec referring to article How to Use Payload Codec on Milesight Gateway. If you require to receive device data, ensure your custom codec has both Decoder and Object Mapping Function; if you require to send downlink commands to devices, ensure your custom codec has both Encoder and Object Mapping Function.
2. Connect LoRaWAN node to Milesight gateway referring to article How to Connect LoRaWAN Nodes to Milesight Gateway. Note that ensure the correct payload codec is selected correctly.
3. Go to Protocol Integration > BACnet Server > Server to enable BACnet server and configure the settings. Note that the Device ID should be changed to an unique value to avoid conflict with other BACnet server devices, or the BACnet client may not find this device.
4. Go to Protocol Integration > BACnet Server > BACnet Object page, click Add Object to select the objects to add to this gateway. The object names and types can be changed as required.
Click Save to save the settings.
5. After adding, you can check if object values are updated regularly.
Note: some objects will not update values since they are just used for sending downlink commands.
Read Data
1. Go to Network Server > Packets to check if there is uplink packet and click Details to check if the decoder works. If works, the JSON item will show the decoded result.
2. Open Yabe BACnet client tool, click Add device to scan the devices, then you can find the BACnet server device according to the Device ID and check the object list.
3. Click the object to check all the properties of this object.
BACnet Alarm
Milesight gateways support to send alarms to BACnet client when the values reach the limit values or changes.
1. Click Add NC Object to add a Notification-Class type object to determine the recipients of the alarms.
- Object Name: customize a unique object name
- The Object Instance: customize a unique instance
- To-Offnormal/Fault/Normal Priority: set the priority number for recipients to sort the notifications. 0 is the most important, 255 is the least important
- Ack required: specify if this event requires the recipient to send Ack message back to gateway
- Recipient list: add the recipients to to receive event notifications. One object supports to add 10 recipients at most
- Device ID: the target recipient device ID
- Valid Days&From time to time: valid days and time to send notifications
- Process Identifier: the identifier to indicate what process the alarm is intended for. For example, maybe process identifier 1 means maintenance alarms, 2 means critical alarms and 3 means life safety alarms, etc.
- Issue Notifications Type: select the notification type as confirmed or unconfirmed
- Transitions: select the reported event types
2. Click Edit icon to configure the alarm settings of the desired object.
Example 1: temperature data
- COV: when the change of analog type object value exceeds the COV Increment, the gateway will send notification to BACnet client actively. This should ensure the BACnet client supports COV feature.
- Event Detection: when the value reaches the high limit or low limit, the gateway will send notification to BACnet client actively. Take below as example, when the temperature is higher than 30°C or lower than 15°C for 30s, the gateway will send To Offnormal event notification; when the temperature turns back to 29°C(high limit - deadhand) or 16°C (low limit + deadhand) for 30s, the gateway will send To Normal event notification. This should ensure the BACnet client supports BACnet alarm feature. (Note: Yabe does not support this feature.)
Example 2: tamper status
- • Event Detection: when the value reaches the alarm value, the gateway will send notification to BACnet client actively. Take below as example, when the tamper status is Active (uninstalled) for 30s, the gateway will send To Offnormal event notification; when the tamper status turns back to Inactive (install) for 30s, the gateway will send To Normal event notification. This should ensure the BACnet client supports BACnet alarm feature. (Note: Yabe does not support this feature.)
Write Data
1. Ensure the correct payload codec is selected correctly and the fPort is configured correctly when adding this device. The default fPort is 85 for Milesight devices.
2. Go to Network Server > Packets to send downlink commands to devices, and check if any response from device.
3. Open Yabe BACnet client tool, click Add device to scan the devices, then you can find the BACnet server device according to the Device ID and check the object list.
4. Click the object to check the properties of this object, then modify the Present Value to send downlink commands. Take UC300 encoder as example, when gpio_output_1 value is changed to 1, the gateway will send DO1 open command.
Note: supported values can be found on the Object Mapping Function.
5. After sending, go to Network Server > Packets to check if there is downlink command sent and the response.
Note: when you modify the value of this kind of object, it is necessary to change the values of related objects together within 60s. Otherwise, the write operation will be failed.
-END-