BACnet Guide
Integrate building automation devices over BACnet/IP and MS/TP.
Overview
ControlBird speaks BACnet natively in both client and server roles. As a client, ControlBird reads and writes properties on remote BACnet devices, discovers devices on the network, and subscribes to Change-of-Value (COV) notifications. As a server, ControlBird exposes mapped Store entities as BACnet objects so that third-party supervisors, workstations, and controllers can read and command them.
Each role supports two transports: BACnet/IP (over UDP, with both IPv4 and IPv6) and BACnet MS/TP (Master-Slave / Token-Passing over RS-485 serial). All configuration is performed through the Device Manager app using dedicated controller, endpoint, and mapper entities. No manual files are required, and the system automatically handles device discovery, reconnection, and health checking.
Where BACnet fits
BACnet is the dominant protocol for HVAC, lighting, access control, and life-safety equipment in commercial buildings. Use the client role to pull data from existing building controllers; use the server role to publish ControlBird logic into a building management system.
Transports
| Transport | Medium | Key Settings |
|---|---|---|
| BACnet/IP | UDP, IPv4 or IPv6 | Host, Port (default 47808), LocalPort, Interface, IpVersion |
| BACnet MS/TP | RS-485 serial | SerialPort, BaudRate, Parity, DataBits, StopBits, MstpMacAddress, MaxMaster, MaxInfoFrames |
Default ports
BACnet/IP uses UDP port 47808 (0xBAC0) by default for both client and server. The default local UDP port for the BACnet/IP client is 47810; the remote port defaults to 47808. MS/TP defaults to a baud rate of 38400.
Entity Model
A BACnet integration is built from a controller, one or more endpoints, and a set of mappers. The controller groups its endpoints together and coordinates redundancy across them. Each endpoint configures a transport. Mappers tie BACnet objects to ControlBird entity fields.
| Entity | Role | Purpose |
|---|---|---|
| BacnetClientController | Client | Manages client connections to remote devices for reading/writing properties |
| BacnetClientEndpoint | Client | BACnet/IP client endpoint with host/port and discovery settings |
| BacnetMstpClientEndpoint | Client | MS/TP client endpoint for serial RS-485 connections |
| BacnetServerController | Server | Exposes ControlBird entities as BACnet objects |
| BacnetServerEndpoint | Server | BACnet/IP server endpoint accepting client connections |
| BacnetMstpServerEndpoint | Server | MS/TP server endpoint for serial RS-485 connections |
| BacnetMapper | Client | Maps a BACnet object to an entity field for read/write |
| BacnetServerMapper | Server | Maps an entity field to a BACnet object for get/set |
All endpoints share common settings, including health-check timing, TLS configuration (TlsEnabled, Certificate), logging (Logging, MaxLogFiles, MaxLogSizeMb), and retry backoff (MinRetryBackoffMs, MaxRetryBackoffMs).
Configuration Workflow
- Open the Device Manager app in ControlBird.
- Create a
BacnetClientControllerorBacnetServerControllerunderRoot/Controllers/Protocols/. - Create a matching endpoint (
BacnetClientEndpoint,BacnetMstpClientEndpoint,BacnetServerEndpoint, orBacnetMstpServerEndpoint) under the controller. Add more than one endpoint to enable redundancy. - For BACnet/IP: set
Host(IP address),Port(default 47808),Interface(network device), andIpVersion(IPv4 or IPv6). - For BACnet MS/TP: set
SerialPort(e.g./dev/ttyUSB0),BaudRate(e.g. 38400),Parity,DataBits,StopBits,MstpMacAddress,MaxMaster, andMaxInfoFrames. - Set
DeviceIdto the target BACnet device instance number. - Enable
Loggingif communication logging is required. - Client: create
BacnetMapperentities to map BACnet objects to entity fields. Server: createBacnetServerMapperentities with source ControlBird entity paths.
Network and certificates
BACnet/IP endpoints support TLS via the TlsEnabled flag and an optional Certificate. See the certificates guide to provision certificates, and walkthrough step 7: Connect a Device for a hands-on device setup.
Device Discovery
The client uses the standard Who-Is / I-Am handshake to locate devices on the network by their device instance number. The discovery timeout defaults to 5 seconds (DiscoveryTimeoutMs: 5000). Resolved device addresses are cached for 5 minutes before the cache is refreshed, avoiding repeated broadcasts on a busy network.
Client Mappers
A BacnetMapper binds a single BACnet object property to a ControlBird entity field. It supports both reading from and writing to the remote device, with either polling or COV-subscription read modes.
| Field | Description |
|---|---|
| ObjectType | BACnet object type (default AnalogValue) |
| ObjectInstance | Instance number of the object (e.g. 0, 1, 2) |
| PropertyId | Property to access (default PresentValue) |
| ArrayIndex | Optional array index (default 0) |
| Direction | Read (read from BACnet) or Write (write to BACnet) |
| ReadMode | Poll or Subscribe (COV) |
| PollIntervalMs | Polling interval for read operations (default 1000) |
| Priority | Write priority, 1 (highest) to 16 (lowest, default) |
| CovIncrement | COV threshold (real number) that triggers a subscribed update |
| TargetEntity / TargetField | ControlBird entity and field to bind |
| Disabled | Temporarily disable the mapper |
Read modes
For reads, choose between two modes:
- Poll: ControlBird issues
ReadPropertyrequests on thePollIntervalMsschedule. Multiple reads on the same device can be batched viaReadPropertyMultiplefor efficiency. - Subscribe: ControlBird registers a Change-of-Value subscription and receives updates only when the value changes by at least
CovIncrement. This minimizes network traffic for slowly-changing analog points.
Write priority
BACnet write operations use a 16-level priority array. ControlBird's Priority field ranges from 1 (highest) to 16 (lowest), and defaults to 16. Writes at a given priority occupy that slot in the device's priority array; lower-priority writes from other controllers will not override a higher-priority value.
Array index semantics
For array-valued properties, ArrayIndex 0 returns the size of the array, while indices 1 and above retrieve individual elements. Use 0 (the default) for scalar properties such as PresentValue.
Server Mappers
A BacnetServerMapper publishes a ControlBird entity field as a BACnet object property so external clients can read or command it. Server mappers configure ObjectType, ObjectInstance, and PropertyId only; array indices do not apply to server mappers.
| Field | Description |
|---|---|
| ObjectType | Exposed BACnet object type (default AnalogValue) |
| ObjectInstance | Instance number presented to clients |
| PropertyId | Exposed property (default PresentValue) |
| Direction | Get (read from entity) or Set (write to entity); default Get |
| SourcePath | Path to the source ControlBird entity |
| TargetEntity / TargetField | Entity and field that back the BACnet object |
The server endpoint also advertises identity to clients via DeviceId, DeviceName, and VendorId. VendorId defaults to 0. DeviceName defaults to "BACnet Device" for an IP server and "BACnet MS/TP Device" for an MS/TP server.
Object Types
The ObjectType enum covers more than 40 standard BACnet object types. The most common in day-to-day integrations are the analog, binary, and multi-state families:
| Family | Object Types |
|---|---|
| Analog | AnalogInput, AnalogOutput, AnalogValue |
| Binary | BinaryInput, BinaryOutput, BinaryValue |
| Multi-state | MultiStateInput, MultiStateOutput, MultiStateValue |
| Scheduling | Calendar, Schedule, NotificationClass |
| Logging | TrendLog, TrendLogMultiple, EventLog |
| System | Device, Command, Program, Loop, File, Group, NetworkPort |
| Life safety | LifeSafetyPoint, LifeSafetyZone |
Additional supported types include Averaging, Accumulator, PulseConverter, GlobalGroup, GroupedView (StructuredView), LoadControl, AccessDoor, NotificationForwarder, AlertEnrollment, EventEnrollment, Channel, LightingOutput, BinaryLightingOutput, ElevatorGroup, Escalator, and Lift.
Property Identifiers
The PropertyId enum exposes more than 150 standard properties. Frequently mapped properties include:
PresentValue ObjectName Description
ObjectType ObjectInstance EventState
EventType OutOfService CovIncrement
PriorityArray Deadband HighLimit
LowLimitPresentValue is the default and is what most read/write mappers target. PriorityArray exposes the 16-slot command priority array of a commandable object, and CovIncrement reflects the device-side COV threshold.
Reliability
BACnet endpoints include built-in resilience so integrations survive transient network and device faults:
- Automatic reconnection with exponential backoff between
MinRetryBackoffMs(default 1000) andMaxRetryBackoffMs(default 60000). - Health checking that detects an unresponsive device and flags it for recovery.
- Failover across multiple endpoints in a controller, enabling redundant connections to the same device set.
- Communication logging with configurable verbosity and rotation via
MaxLogFilesandMaxLogSizeMb.
Redundancy
Placing several endpoints under a single controller lets ControlBird run them as a redundant group. If the active endpoint loses contact, a standby endpoint takes over automatically without losing the mapper configuration.