Introduction
Modern commercial buildings are complex ecosystems. A typical Building Management System (BMS) controls thousands of data points—temperature sensors, damper actuators, VAV boxes, chillers, lighting zones—all speaking BACnet (ISO 16484-5). Yet most facility managers still rely on static schedules or manual overrides. What if you could simply tell an AI agent: “Reduce HVAC power by 15% in zone 3 unless CO₂ exceeds 800 ppm”—and have it executed instantly?
This article is a practical integration guide. We will show how the ASI Biont AI agent connects to any BACnet/IP device via the bac0 library, using the industrial_command tool. No custom dashboard, no PLC reprogramming—just a chat conversation. By the end you’ll know how to discover devices, read properties, and write setpoints from natural language.
Why BACnet for AI Integration?
BACnet (Building Automation and Control Network) is the de-facto standard for BMS communication. According to BACnet International, over 1.2 million BACnet devices were shipped in 2025 alone. The protocol supports point-to-point (MS/TP) and IP networks. For cloud AI agents, BACnet/IP is the natural choice—it runs over UDP port 47808 and can be reached across subnets.
ASI Biont uses the open-source bac0 library (maintained by Christian Tremblay), which wraps the BACnet Stack (bacpypes). With just a few lines of Python, the AI can:
- Discover all BACnet devices on the network via Who-Is broadcasts.
- Read any Analog Input, Binary Output, or Multistate Value by object type and instance.
- Write setpoints, override commands, and schedules.
How ASI Biont Connects to BACnet
There is no need to install a separate bridge application for BACnet. The AI agent runs Python scripts directly in the execute_python sandbox (cloud environment). The sandbox has pre-installed bac0==23.12.1 and bacpypes==0.18.14. The user simply provides the BACnet/IP network parameters (typically the local IP subnet or a specific device IP) in the chat.
Connection diagram
[User Chat] → ASI Biont Cloud (execute_python)
↓
bac0 BACnet/IP (UDP 47808)
↓
Building Network Switch
↓
BACnet Controller (e.g., Siemens PXC, Johnson Controls FEC)
↓
Sensors, Actuators, VAVs
The AI script runs in the cloud and sends BACnet APDUs directly to the device. No local agent is required—as long as the BACnet device is reachable from the ASI Biont server (or via a VPN/port forward).
Step 1: Discover Devices on the BACnet Network
Let’s start with a simple discovery. In the chat, the user types:
“Discover all BACnet devices on subnet 192.168.1.0/24 and show me their device names and vendor IDs.”
The AI generates and executes this script:
import bac0
# Initialize BAC0 with the local IP (must be on the same subnet)
bacnet = bac0.connect(ip='192.168.1.100')
# Discover devices (Who-Is broadcast)
devices = bacnet.devices
for dev in devices:
print(f"Device {dev.device_id}: {dev.name} (vendor {dev.vendor_name})")
The output might look like:
Device 1001: AHU-3 (vendor Siemens)
Device 1002: VAV-12A (vendor Johnson Controls)
Device 1003: LightPanel-B3 (vendor Delta Controls)
The AI then confirms: “Found 3 BACnet devices. Which one would you like to interact with?”
Step 2: Read Sensor Values in Real Time
Now the user says:
“Read the zone temperature from device 1001 (AHU-3) every 10 seconds for 1 minute and plot the trend.”
The AI executes:
import bac0
import matplotlib.pyplot as plt
import time
bacnet = bac0.connect(ip='192.168.1.100')
dev = bacnet.device('AHU-3')
temps = []
timestamps = []
for i in range(6):
# Read Analog Input 1 (zone temperature)
value = dev.read('ai:1')
temps.append(value)
timestamps.append(time.time())
time.sleep(10)
plt.plot(timestamps, temps)
plt.title('Zone Temperature Trend - AHU-3')
plt.xlabel('Time')
plt.ylabel('Temperature (°C)')
plt.savefig('/tmp/temp_trend.png')
print("Trend saved. Average temp: {:.1f}°C".format(sum(temps)/len(temps)))
The AI returns the chart as an image and a summary. The user can then ask: “If average temp > 24°C, reduce cooling setpoint by 2°C.”
Step 3: Write a Setpoint (Control the Building)
This is where the power of AI + BACnet shines. The user says:
“Set the cooling setpoint of AHU-3 to 22.5°C.”
The AI writes to the appropriate Analog Output:
import bac0
bacnet = bac0.connect(ip='192.168.1.100')
dev = bacnet.device('AHU-3')
# Write to Analog Output 2 (cooling setpoint) with priority 8
result = dev.write('ao:2', 22.5, priority=8)
print(f"Setpoint command sent: {result}")
# Confirm by reading back
current = dev.read('ao:2')
print(f"Current setpoint: {current}°C")
The AI confirms: “Cooling setpoint for AHU-3 changed to 22.5°C. Current value: 22.5°C.”
Real-World Scenario: Energy-Optimized Office Floor
A facility manager at a 10,000 m² office building in Frankfurt used ASI Biont to connect to 45 BACnet controllers (Siemens PXC). She described the following rule in chat:
“From 8 AM to 6 PM, maintain CO₂ below 900 ppm in zones 1–10. If any zone exceeds 900 ppm, increase the AHU supply fan speed by 10% and log the event. Also, if outside temperature > 30°C, ignore CO₂ and maximize cooling.”
The AI wrote a complete execute_python script that:
- Polls CO₂ sensors (Analog Inputs) every 5 minutes.
- Reads outside air temperature from a weather API (open-meteo).
- Writes to Analog Outputs (fan speed) using
write(). - Logs events to a local CSV file (accessible via chat).
The result: energy savings of approximately 28% compared to the previous fixed schedule (based on the building’s own monthly meter readings). The manager reported that she could now manage the entire BMS from a single chat window, without touching the Siemens Desigo CC interface.
Why This Matters: No Coding Required from the User
The entire integration—discovery, reading, writing, and complex logic—was done by the AI agent. The user never wrote a single line of Python. They simply described what they wanted in natural language. ASI Biont’s execute_python sandbox has access to over 80 libraries (bac0, pymodbus, snap7, aiohttp, etc.), so any industrial protocol is supported out of the box.
For BACnet specifically, the industrial_command tool provides a shorthand:
industrial_command(
protocol="bacnet",
command="write_property",
params={
"device_ip": "192.168.1.101",
"object_type": "analog-output",
"instance": 2,
"value": 22.5,
"priority": 8
}
)
But even that is hidden from the user—the AI generates the command automatically.
Practical Tips for BACnet Integration
| Aspect | Recommendation |
|---|---|
| Network | Ensure ASI Biont server can reach UDP port 47808 on the BACnet device. Use VPN or port forwarding if needed. |
| Device Discovery | Use bac0.connect() with the correct local IP. If devices are on a different VLAN, specify the broadcast address. |
| Object Types | Common: analog-input (ai), analog-output (ao), binary-input (bi), binary-output (bo), multi-state-value (msv). |
| Priority Array | BACnet writes require a priority (1–16). Use 8 for normal commands, 16 for default. |
| Security | BACnet has no native encryption. Use network segmentation or IPsec for sensitive installations. |
Conclusion
Connecting a BACnet BMS to an AI agent is no longer a fantasy reserved for custom software integrators. With ASI Biont, any facility manager can say: “Optimize my HVAC for comfort and cost” and have it executed in real time.
The key takeaway: you don’t need a team of developers to bridge legacy building protocols with modern AI. The execute_python sandbox and the industrial_command tool handle the low-level BACnet APDUs. You just describe the outcome.
Try it yourself. Visit asibiont.com, create an API key, and start a chat. Tell the AI: “Connect to my BACnet device at 192.168.1.101 and show me all analog inputs.” In 10 seconds, you’ll have live building data in your chat—and the ability to control it with plain English.
Comments