A building management system (BMS) often expects to see one BACnet device per technical room, while the room actually contains several controllers from different vendors, some of them on MS/TP or on a separate network. The Weble IoT Universal Gateway can act as a BACnet proxy: it reads the objects of the field controllers, republishes them as objects of its own BACnet device, and forwards their alarms to the BMS.
This article walks through the four steps of such a project: copying the points, keeping them fresh, forwarding the alarms, and passing the acknowledgments back. It relies on the reference sections of the BACnet driver page, in particular 4. Events & Alarms, which it links instead of repeating.
Everything happens inside one BACnet gateway:
%bac:local, and the copies that the BMS reads;Before starting, the controllers must already be visible in the Clients tab with their objects (discovery, manual insertion or EDE import: see Getting started on the BACnet page).
Choose a range of free instance numbers on the local device for each controller, for example 1000–1999 for controller A and 2000–2999 for controller B. The copies are numbered consecutively from the first instance you give, and the ranges make the point list readable for the BMS integrator.
%bac:192.168.1.20/analogInput:3). Several rows can be selected at once.| Field | What to enter |
|---|---|
| Property (Remote object parameters) | The property of the controller objects to copy, usually presentValue. Always set it: the gateway has no default. |
| Polling | Optional read period written on the remote properties: milliseconds and/or a cron expression, separated by ; (e.g. 60000). Leave it empty if you use COV (step 2). |
| Object name suffix | Text appended to the name of each controller object to build the name of the copy, e.g. (AHU1). |
| Object type | Type of the local copies. Default analogValue. Use one type per batch: select binary objects and analog objects in two separate passes. |
| Object instance | Instance number of the first copy. The next copies take the following numbers, so the range must be free. |
| Object property | Property of the copy that receives the value, usually presentValue. |
| Transform value (Routes parameters) | Optional: a function or another address used as the route source value, e.g. to convert a unit. Empty = plain copy. |
For each selected object the gateway:
%bac:local/<Object type>:<instance> and its property address, e.g. %bac:local/analogValue:1000/presentValue;objectName of the copy (once, at creation);%bac:192.168.1.20/analogInput:3/presentValue, with the polling period if one was given;generated custom bacnet property routing <n>.The routes appear in the routing table like any other route: you can rename them, change their source value or disable them.
A copy is only as fresh as the remote value. Two methods:
subscribe. The gateway subscribes for the COV Lifetime of the gateway (600 s when not set) and renews the subscription automatically.Check the Value column of the copies in the Local server tab: it must follow the controller values.
A local object that carries an alarmValue (binary objects) or highLimit / lowLimit (analog objects) is evaluated for alarms by the gateway itself, from its value alone. On a proxy, this would produce alarms that do not exist on the controllers, or duplicate those that do.
Open the gateway parameters and tick Alarms from routes, then restart the gateway (gateway parameters are read at start-up). From then on, the alarm state of the local objects comes only from what routes write on the /events addresses.
If the option is not shown in your gateway form, the box software is older than r721: update it first (see Releases).
The gateway receives the event notifications of a controller only for the notification classes it is subscribed to:
notificationClass objects of the controller, e.g. %bac:192.168.1.20/notificationClass:1.subscribe. The gateway registers itself in the controller's recipientList (details in Subscribing to a remote notificationClass).%bac:192.168.1.20/events is created and holds the last event received from that controller.The BMS receives the alarms of the gateway through a local notification class:
%bac:local and insert a notificationClass object, e.g. %bac:local/notificationClass:10.priority and ackRequired properties to match your alarm concept.%bac:local/notificationClass:10/recipientList; you can also fill this list by hand (format in NotificationClass).Create a route from %bac:192.168.1.20/events (source) to %bac:local/events (destination), one route per controller. Writing an event on %bac:local/events makes the local device emit it to the recipients of the local notification class named in the event.
The event received from the controller names the controller object and the controller notification class. The route source value must translate both to the local copy and to the local notification class:
function (ev, source, dest, options) {
// Remote object (controller) -> local copy created in step 1
var map = {
"analogInput:3": ["analogValue", 1000],
"analogInput:4": ["analogValue", 1001],
"binaryInput:7": ["binaryValue", 1100]
};
if (!ev || typeof ev !== "object") return;
if (ev.type === "acknowledge") return; // acknowledgment sent to the controller: not an alarm
if (!ev.objectIdentifier) return;
var local = map[ev.objectIdentifier[0] + ":" + ev.objectIdentifier[1]];
if (!local) return; // object not republished: nothing is forwarded
var out = JSON.parse(JSON.stringify(ev));
out.objectIdentifier = local;
out.notificationClass = 10; // local notification class of section 4.3
return out;
}
A function that returns nothing cancels the route execution, so events of objects that are not in the table are simply not forwarded. The function can be stored once in an internal $ address and reused by the routes of all controllers (see Routes).
Restoring the alarm table without notifying. Adding "_populate": true to the event written on %bac:local/events only updates the alarm table of the local device (what the BMS reads with GetEventInformation) and sends no notification. An event with "eventState": "NORMAL" and "ackedTransitions": [1,1,1] removes the entry.
There are two ways to deal with the acknowledgments the controllers expect:
subscribe + autoack instead of subscribe: each received event that requires an acknowledgment is acknowledged automatically by the gateway, with the text auto.AcknowledgeAlarm received from the BMS appears on %bac:local/events as a value with "type": "acknowledge". A second route, from %bac:local/events to the controller's %bac:<controller>/events, can pass it on: the gateway sends an AcknowledgeAlarm to the controller when an object of this shape is written on the remote /events address:{
"type": "acknowledge",
"objectIdentifier": ["analogInput", 3],
"state": 3,
"text": "operator_01",
"eventdate": "4/29/2026 8:38:14 AM"
}
The function of this second route keeps only the values whose type is acknowledge and translates the object identifier back from the local copy to the controller object (the reverse of the table above). Before putting it in service, look at the value displayed on %bac:local/events after a test acknowledgment from your BMS, to check the fields it carries. Field meanings: Sending an AcknowledgeAlarm to a remote device.
%bac:local in the Local server tab, or a controller in the Clients tab, and choose Get Event Information. The window lists the active alarms of that device; those of the gateway must match those of the controllers.%bac:local/events (visible in the route status):| Error | Meaning |
|---|---|
recipientList_empty, recipientList_not_found |
Nobody is subscribed to the local notification class. Read %bac:local/notificationClass:<N>/recipientList; if it is empty, the BMS must subscribe again. This is not a driver malfunction. |
notificationClass_object_not_found_<N> |
The event names a local notification class <N> that does not exist: create it, or fix the number in the route function. |
missing objectIdentifier |
The event written on %bac:local/events has no objectIdentifier. |
The BMS integrator usually needs the list of the republished points as an EDE file: in the Local server tab open the export menu and, under EDE file format, choose All addresses (or All selected address). The archive contains EDE.csv, State-Texts.csv, Unit-text.csv and Object-types.csv (see EDE files).