Protocols & Integration Technologies

Real buildings are never one protocol. A single site might run BACnet chillers, Modbus meters, Lon field devices, SNMP power gear, and an MQTT feed to the cloud – all needing to land in one Niagara station. Software Pile does the multi-protocol integration that ties a mixed building into a single, coherent system.

Protocols We Integrate

  • BACnet (IP and MS/TP) and Modbus (TCP and RTU) – the workhorses
  • MQTT for cloud and IoT, SNMP for IT and power infrastructure
  • LonWorks for legacy field networks, oBIX and REST for enterprise systems
  • Proprietary and OEM protocols via custom drivers when nothing off-the-shelf fits

The Integration Is the Hard Part

Getting each protocol to connect is table stakes. Making them agree – consistent units, coherent naming, sensible alarms, and a data model that survives the next building added – is the real work. That is where a specialist earns the fee.

Send us the protocol mix at your site and your Niagara version. We will scope the integration end to end.

Which Protocol Should a Building Integration Use?

In most cases you do not get to choose — the equipment already installed decides for you, and the job is to integrate what is there. Where there is a choice, on new equipment, the practical hierarchy is straightforward:

  • BACnet is the default for building automation. It carries not just values but objects, alarms, schedules and trends, which means less mapping work and richer integration.
  • Modbus is simple, universal and everywhere, especially on meters, drives and plant equipment. It carries only registers, so all meaning — scaling, units, what register 40001 represents — lives in your mapping rather than in the protocol.
  • LonWorks is legacy but widely installed and still running buildings.
  • MQTT suits telemetry to cloud or analytics platforms; it is a transport pattern rather than a building-data model.
  • oBIX and REST are how building data is usually handed to IT and business systems.
  • SNMP covers IT and power infrastructure — UPS, PDUs, network gear — that increasingly needs to appear alongside building plant.

What Makes Protocol Integration Fail?

Rarely the protocol itself. The recurring causes are mundane and predictable:

  • Scaling and units. A Modbus register returning tenths of a degree read as whole degrees produces plausible, wrong data that can survive for months before anyone notices.
  • Polling that overwhelms the field network. Legacy networks in particular degrade under polling rates that seem reasonable on paper.
  • No defined offline behaviour. A device that goes away should read as a fault, not hold its last value forever while operators trust it.
  • Vendor deviations. Equipment that claims standard compliance but implements it partially or oddly — common enough that testing against the actual device, not the datasheet, is the only reliable approach.
  • Undocumented mapping. An integration only the original engineer understands is a liability the moment they move on.

How Do You Scope an Integration Properly?

Per device type: the protocol and physical layer, the exact points needed in each direction, the units and scaling for each, the read and write requirements, the acceptable update rate, and what should happen when the device is unreachable. That list is unglamorous and it is the difference between an integration that works and one that produces numbers nobody trusts.

It also exposes early whether a custom driver is needed or whether a gateway or a standard driver will do — a decision worth making before, not during, delivery.

Related services: BAS integration services · custom Niagara driver development.

How a Protocol Becomes Points in a Station

Every driver in Niagara has the same three-level shape: a network under the station's Drivers container, devices under the network, and points under each device. The point itself is an ordinary control point, identical to one holding a calculated value. What makes it live is the proxy extension attached to it, which holds the field address, the conversion and the facets that turn a raw reading into engineering units at a defined precision, and the tuning policy that sets the minimum and maximum time between updates and the point at which a value is considered stale.

Once a value is a proxy point, everything above it stops caring which protocol produced it. Logic, alarm extensions, histories and graphics attach to a Modbus register and a BACnet analog value in exactly the same way, which is what makes a mixed station one system rather than several running side by side in one box.

  • Network level. Driver-wide settings live here: the poll scheduler and its rate buckets, the worker queue, and for serial drivers the port, baud rate, parity and stop bits. A rate changed here changes it for every device beneath it.
  • Device level. The address the driver uses to reach the equipment (a BACnet device instance, an IP address plus unit ID for Modbus TCP, a subnet and node for Lon), the ping monitor that tracks reachability, and, where the protocol supports it, device extensions sitting beneath the device in the station tree that import its own alarm, schedule and trend log objects instead of rebuilding them in the station.
  • Proxy point level. The field address and whether the point reads, writes or both. A BACnet write lands in a slot of the object's priority array, so releasing a write does not return the object to its previous value but to whatever lower priority still holds one, or to the relinquish default if none do.

Names, Tags and What a Rename Costs Later

Discovery names points after the vendor's own artifacts. What arrives is AI_3, or a register offset, or a truncated abbreviation from the controller's configuration tool, because that is the only name the driver has to work with. Those names then propagate into histories, alarm messages, graphics bindings and every report built on top of them.

Renaming afterward is not free, and how expensive it is depends on how the references were written. A history takes its ID from the station and point name at the moment it is created; renaming the point later leaves the collected data under the old ID rather than following the point. Links and bindings written as slot path ords break on a rename, while handle ords survive it, because a handle refers to the component itself rather than to its position and name in the tree.

Tagging is the part that pays back. A tag dictionary lets a point carry what it measures and what equipment it belongs to independently of where it sits in the tree, so a BQL query or a Nav tree can gather every discharge air temperature on a site regardless of which driver produced it or how the vendor named it. Applied while each device type is being brought in, tagging is part of the same pass; applied afterward it is a separate one across every point already built.

Modbus Addressing and Word Order

The 40001 convention is documentation, not wire protocol. On the wire, reading holding register 40001 is function code 3 with a starting address of zero. Vendors write the same register as 40001, 4x0001, 400001 or 0, and some publish 1-based tables for devices that are 0-based, so the first thing to establish about any register list is which convention it uses.

An off-by-one does not announce itself. Adjacent registers in a device map usually hold quantities of the same type and similar magnitude, so a whole block shifted by one register still returns numbers that sit in the range an operator expects. Verifying two points at opposite ends of a block against the device's own display exposes it, because a shifted block runs past its own end: the last register lands in an unrelated part of the map or returns an exception while the first still looks ordinary.

  • 32-bit values occupy two consecutive 16-bit registers, and Modbus does not specify which word comes first. A float read with the words reversed lands wildly out of range or near zero, which is at least visible; the same reversal on a 32-bit counter can produce a number that merely looks large. Many devices expose a word order setting, and it is worth reading before assuming the driver is at fault.
  • Function code 3 reads holding registers and function code 4 reads input registers, and those are separate address spaces. The same numeric address in the wrong space returns an unrelated value on some devices and an exception on others.
  • An exception response is the device answering rather than failing to answer. Code 02 means that address does not exist in its map; code 03 means the quantity or value is outside what it accepts.
  • Modbus TCP carries a unit identifier. A native TCP device usually ignores it, but a serial gateway uses it to select which RTU slave behind it a request is for, so one IP address with several unit IDs is several devices, each needing its own device entry.
  • The response timeout is the only evidence available that a device has stopped answering, so the timeout value and retry count decide how quickly that becomes visible.

Ports, Discovery and What the Network Has to Allow

BACnet/IP runs over UDP, normally on port 47808 (0xBAC0), and its discovery mechanism is a broadcast. Who-Is does not cross a router, so a station on one subnet discovers nothing on another until either a BBMD exists on each subnet with the others in its broadcast distribution table, or the station registers as a foreign device with a BBMD that has room for it. Foreign device registration carries a time to live and has to be renewed, which is why a station can discover devices one week and see none the next with no configuration having changed. A device that answers a directed read but never appears in a discovery is the signature of a broadcast problem, not of broken equipment.

MS/TP is token passing over RS-485, so a segment's throughput is shared and shaped by properties set on the devices themselves. Max_Master sets the highest MAC address the token is offered to; left at the default of 127 on a segment whose highest address is 12, every device spends part of each token rotation soliciting masters that do not exist. MAC addresses must be unique on the segment, and BACnet device instance numbers must be unique across the entire internetwork rather than just the segment, so two controllers shipped with the same default instance produce reads that contradict each other intermittently.

  • RS-485 wants a daisy chain, with termination at the two physical ends only and bias applied once on the segment. Star wiring and long spurs often work at 9600 baud and fail at 38400, which makes the baud rate look like the cause when the topology is.
  • A standard RS-485 segment is specified for 32 unit loads. Transceivers rated at a fraction of a unit load allow more devices than that, which is why some segments run well past 32 devices and others will not.
  • COV subscriptions replace polling on devices that support them, but a subscription has a lifetime and has to be renewed. If a renewal is lost the device is still online and answering, so nothing about it looks wrong; the point simply stops changing.
  • SNMP polls go out to UDP 161 and traps arrive unsolicited on UDP 162, so a firewall rule that permits polling can still drop every trap. v1 and v2c carry the community string in cleartext; v3 adds authentication and privacy but requires matching user and engine configuration at both ends.
  • MQTT is a connection the station makes outward, usually to TCP 8883 with TLS, and never one it accepts, so it crosses a firewall that would block an inbound protocol. Retained messages and a last will topic are the only way a subscriber learns state that was published before it connected, or learns that the publisher dropped off.

Reading Point Status Before Opening a Tool

Niagara does not discard a value it cannot trust, it flags it, and the flags narrow the problem. Stale means the value did not refresh inside the maximum update time set in its tuning policy. Fault carries a cause string from the driver, and those causes are specific: an unknown object or property, an illegal data address, a write the device rejected, or a license limit reached on the host. Overridden means something inside the station, not the field, is holding the value.

Where the trouble sits in the tree points at the layer to examine, before any trace is enabled.

  • Every device on one network failing at once: the network. Port, baud rate and parity on a serial driver; IP reachability and credentials on a network driver; or the converter or gateway they all share.
  • One device failing while its neighbors on the same network read normally: that device's address, or the device itself. A wrong device instance, a wrong unit ID, or a duplicate MAC on an MS/TP segment all present this way.
  • A single point in fault on a device whose other points are fine: that point's address, its data type, or a property the device does not actually implement despite listing the object.
  • Nothing conclusive from the station: raising the driver's log level to trace records the actual requests and responses in the station log. On a serial network that shows whether the station transmitted at all, which separates a wiring or converter problem from a device that received the request and answered with an exception.

Frequently Asked Questions

What limits how many protocols and devices one station can carry?

License capacity, host resources and total poll load, not the number of protocol types. Each driver adds its own network under the station with its own scheduler, and a controller running BACnet MS/TP, Modbus RTU and an MQTT client at the same time is ordinary. The constraints that actually bite are the device and point counts the license permits, the memory and CPU of the host, and the aggregate rate at which every mapped point wants refreshing.

What has to already exist before integration work can begin?

A licensed Niagara host with a station on it, the driver modules for the protocols involved, network access to the equipment, and per device documentation. Access means IP reachability and firewall rules for IP protocols, and wired, terminated segments with known baud rate and parity for serial ones. Documentation means the register or object list plus the device side settings such as addresses and unit IDs. Licensing is worth checking early, because Niagara licenses cap device and point counts per host, and a station will not load a driver module built for a later Niagara version than the host runs.

How does the work proceed once access is in place?

One device of each type, end to end, before any replication. That means adding the network, addressing the device, discovering or hand building its points, then proving them: values checked against the device's own display, writes taking effect and releasing correctly, and the behavior when the device is unreachable confirmed rather than assumed. Building every device of a type before proving one turns a single mapping error into the same error repeated across the site. Once one is proven, the rest of that type is duplication and re-addressing.

What do you have to decide, as opposed to supply?

Who owns each writable value, and at what priority. A value that both the station and a local controller can write needs an agreed arbitration, and the protocols differ in how much help they give: BACnet makes ownership explicit through the priority array, so a station write at one level coexists with a local write at another, while Modbus has no such concept and two writers of the same register are indistinguishable to the device. The related decision is which points need to be writable at all, since a read only mapping removes the question entirely. You also have to decide whether devices can be taken out of service during commissioning, because testing writes and unreachable device behavior on live plant is not always acceptable.

When is a custom driver the right answer for a protocol with no off-the-shelf support?

It turns on three things: whether the protocol is documented, how many devices there are, and whether the values need to be full station points. A published register or command reference makes a device drivable; an undocumented serial protocol has to be reverse engineered from captures first, which is a different and much larger job. A handful of devices weighs differently from dozens of the same type, because driver work is paid once while per device workarounds are paid repeatedly. And if the values only need to be seen rather than modeled, tagged, trended and alarmed on, the requirement can often be met without native points at all.

Does every value a device exposes need to be a point in the station?

No, and mapping everything a register list contains is a common way to spend license capacity and poll bandwidth on values nobody reads. A point costs the same whether it drives control logic, an alarm, a trend someone reviews or a report, or whether it was mapped only because it appeared in the documentation. The useful test is whether a value drives something. Values that are only ever glanced at can stay on the equipment's own display or web page.

How do systems outside the station get data out of it?

Three routes with different shapes. oBIX presents the station itself over HTTP or HTTPS and authenticates the caller as a Niagara user, so what an external system can read or write is whatever that user's permissions allow, configured in the station rather than in a separate export definition. REST calls in the other direction are initiated by the station, on a schedule or a trigger, which suits pushing to a system that will not poll. MQTT publishes to a broker, where the topic structure becomes a naming decision every downstream consumer depends on and that is awkward to change once they do.