Can Building Automation Be Free?
One thing I can't help but think about, after spending about 10 years working on construction sites and doing controls service as a field technician, and then being exposed to IoT in research, is the idea that a BAS (Building Automation System) could be free. Hear me out...
Typically, when contracting or setting up a BAS, the mechanical contractor builds the HVAC system along with the other trades. A lot of electrical wiring is installed, and there’s plenty of drywall dust and noise as windows, walls, and other structures are built. In my experience, the first step is often to set up the small devices, like the programmable temperature controller for individual HVAC zones. In larger commercial buildings, this device is usually called a VAV (Variable Air Volume) box controller. In a VAV AHU (Air Handling Unit) system, this small programmable device controls the mixture of air and temperature to maintain the zone temperature at a desired setpoint, particularly in a VAV reheat system.
Once all these moving parts, such as air damper rotations, reheat hot water valve commands, and temperature sensing elements, are working correctly and reading appropriate values, the technician would move upstream to the next larger piece of equipment that delivers air to all the VAV boxes. Depending on the system, this process can involve a lot of troubleshooting—getting temperature, humidity, air dampers, valves, cooling coils, and variable fans on frequency drives all working in tandem to respond to control signals.
The key point is that you want all the air dampers downstream to be functional before you start pumping air into the ductwork. Each of these devices must be fully operational, even when running almost as stand-alone units. For example, as the first device programmed or started up on the construction site, the VAV can operate as a stand-alone device, attempting to control the zone temperature setpoint even if the air isn't yet moving through the ducts or the AHU hasn't been built by the mechanical contractor.
Similarly, the larger equipment, like the air handling unit, needs to function almost entirely independently, capable of handling 99.9% of the mechanical design engineer's sequence of operations. This is all managed within the programmable controller, which drives the I/O for air dampers, valves, fans, coils, and other components.
Supervisory level logic
That other 0.1% of logic needed for the air handling unit (AHU) and VAV boxes—what would that be? In modern DDC (Direct Digital Control) systems, especially in cold weather climates like where I live, there's almost always a hardwired temperature sensor measuring the outside air, which is wired directly to the boiler controller. I’ve personally never seen it done any other way. This is usually a safeguard in case the control system communication fails for any reason—whether due to a lightning strike, IT outage, rodents gnawing on wires, earthquakes, or mischievous kids in a school. The boiler still needs an outdoor air temperature reference to heat the building and prevent major equipment damage, like frozen pipes.
Other devices inside the building, such as the AHU, also require outside air temperature information to follow the mechanical design engineer's sequence of operations, particularly for free economizer cooling. The AHU needs this outside air reference, which can be provided through supervisory-level logic. This step typically happens toward the end of the construction phase when all downstream components are connected to the supervisory controller, and global data is shared.
A well-designed BAS (Building Automation System) generally minimizes the need for supervisory-level logic. However, I’ve seen poor practices over the years where the BAS is entirely driven by supervisory logic over the network, effectively turning all field-level devices into dummy I/O devices.
In this schematic below, a traditional building automation setup might look like this: imagine a small office with 10 VAV boxes on a BACnet MSTP trunk, an AHU and a boiler connected via BACnet IP on the IT LAN, a supervisory controller, and a server to host BAS graphics. In reality, a building this size likely wouldn’t require a server, as everything could be managed by the supervisory controller. However, for reference, this is a typical setup for a standard building.
In my experience with BAS contracting, the IT department typically provides the contractor with IP addressing schemes to use on their network, as well as any necessary computer hardware for server purposes. It's also worth noting that these supervisory controllers, at least when I was setting them up, cost around $5,000 each. The server software also required licensed programming tools and a trained BAS technician to implement both the supervisory-level logic and the server's graphics, which served as the GUI for building operators and maintenance staff.
The point I want to drive home is that setting up just the supervisory-level logic and graphics can cost around $10-20k per job. That’s an estimate, as I was never involved in controls sales, but just from a technical perspective, I’d say I’m in the ballpark. This estimate doesn’t even account for the yearly software licensing fees, which can vary from manufacturer to manufacturer.
Modern IoT practices
In recent years, I’ve been exposed to a lot of Python programming, which is pretty cool. Python has libraries for almost everything, including robust BACnet stacks, which I use in research projects focused on demand response. For example, my supervisor, a PhD mechanical engineer, will create an algorithm to test grid-interactive building (GEB, a concept of the future...) sequencing for electrical load shifting, load shedding, or load rolling. I’ll then code that algorithm in Python, which is quite similar to how an HVAC design mechanical engineer creates an HVAC sequence of operations—something I used to implement using ladder logic tools for VAV boxes and AHU controllers.
The GEB building sequencing I work on is relatively simple, involving actions like adjusting zone setpoints by ±2°F or modulating the AHU cooling compressor to shed loads. But the exciting part is that it’s all done in Python, which is an easy programming language to learn. For me, the key has been learning modern computer science patterns to interact with building systems.
Does the BAS use this? No, absolutely not. The clunky ladder logic tools for supervisory-level logic in the BAS world are all proprietary and lack modern computer science patterns. For example, a student fresh out of college with a computer science degree—or even mechanical engineering students who have learned Python and algorithms—could hit the ground running. But once they enter the BAS or HVAC industry, all those skills and ideas go out the window because of the proprietary tools that dominate the industry.
This is particularly true when it comes to data science, fault detection, and diagnostics. The tools that have been standard in the industry for decades are proprietary and far removed from what someone with a background in data science or a recent bootcamp graduate would understand.
Getting back into the supervisory level logic for a building...
So, what does our building really need to set up the HVAC system if it’s running on minimal overhead supervisory-level logic? It boils down to two things: the outside air temperature from the boiler to the AHU, and occupancy control for the VAVs and AHUs.
At its core, what is the fundamental purpose of a building automation system (BAS) in its most minimalist form? The main goal is to meet energy code requirements, which are passed down from the mechanical engineer to the controls contractor. But do we really need a $5k appliance, proprietary software, and steep licensing fees to accomplish this? I argue, no!
With Python and robust BACnet stacks, which are already built into many IoT devices and drivers—and based on what I’ve been doing in demand response research—we can easily achieve the same outcomes with just a few lines of code. Let me show you how simple it can be!
A schematic representation would look like this: now, a BACnet router is required, which is still about a $250 device but comes without licensing fees. The IT department would typically provide a computer—sometimes a virtual machine—to run the Python script.
Recommended by LinkedIn
What you may notice in the schematic above is an IoT edge device, which would be part of the chosen IoT platform. In my opinion, after seeing demand response research, fault detection, and other energy management information systems (EMIS) research—cloud-based platforms for fault detection diagnostics, visualizing HVAC data, energy accounting, metering, and other analytics—why are we still requiring a BAS GUI? Traditionally, with operations technology (OT), these interfaces were behind the firewall for HVAC systems. But in the modern age of internet connectivity, we can access all of this via the cloud. We could simply maintain our energy code requirements with a straightforward Python script, eliminating the need for complex and expensive proprietary systems.
In my opinion, this design serves multiple purposes, not just being cheaper. I can confidently say that the $10k–$20k typically spent on proprietary software licensing fees for an HVAC GUI could go much further when applied to typical IoT SaaS fees on a monthly subscription basis. The data and visualizations are far better and more informative, and the client wouldn’t be locked into any one IoT contractor. They’d have the flexibility to shop around—if one provider isn’t meeting expectations for near-real-time data visualization, cloud analytics, or customer support, they could easily switch to another.
What about the BAS controllers driving equipment?
If you remember from my previous job as a field technician setting up all the programmable I/O devices, I don’t think those roles or the hardware will be changing anytime soon. In fact, they are excellent, in my experience. I worked with JCI hardware and programming logic tools for application-specific devices, and I found them to be very reliable. I don’t believe these jobs will ever disappear or be replaced by AI. A skilled controls technician at the hardware level—someone who is a master of wiring, troubleshooting electrical circuits, and programming HVAC sequences into control panels—is essential. We need these technicians, and it’s crucial to find local, reliable people with the skills to troubleshoot and maintain systems on the ground. While IoT contractors can often work remotely, sometimes from far away, we still need really good local BAS techs who can be available for on-site work and emergencies.
The Python script
This script could run in our imaginary building that integrates IoT for all data visualization and analytics to help make buildings more efficient and effective. It's not much different from a demand response research project that adjusts space temperature setpoints for the GEB building of the future.
At a high level, there are constants in caps representing the building start and stop times, BACnet addresses for the VAV boxes, AHU controller, and boiler controller. The script simply shares the outside air temperature from the boiler to the AHU, allowing it to handle economizing logic set up by the controls technician. It also manages building occupancy setbacks to meet energy code requirements, and that's it—it can be that simple!
import BAC0
import time
from datetime import datetime
# Initialize BACnet
bacnet = BAC0.lite()
# Define constants
BUILDING_STARTUP = "08:00"
BUILDING_SHUTDOWN = "18:00"
# Boiler and AHU details
BOILER_IP = "192.168.0.102/24"
AHU_IP = "192.168.0.103/24"
BOILER_OUTSIDE_AIR_SENSOR = "analogInput 3 presentValue"
AHU_OUTSIDE_AIR_VALUE = "analogValue 10 presentValue"
# VAV box addresses on MSTP trunk 100
vav_addresses = [
"100:1",
"100:2",
"100:3",
"100:4",
"100:5",
"100:6",
"100:7",
"100:8",
"100:9",
"100:10",
]
# Define zone temperature setpoints
unoccupied_heat_setpoint = 55.0
unoccupied_cool_setpoint = 90.0
occupied_heat_setpoint = 70.0
occupied_cool_setpoint = 75.0
# Function to check if building is occupied
def is_occupied():
current_time = datetime.now().time()
occupied_start = datetime.strptime(BUILDING_STARTUP, "%H:%M").time()
occupied_end = datetime.strptime(BUILDING_SHUTDOWN, "%H:%M").time()
return occupied_start <= current_time <= occupied_end
# Main loop for supervisory control
while True:
if is_occupied():
heat_setpoint = occupied_heat_setpoint
cool_setpoint = occupied_cool_setpoint
else:
heat_setpoint = unoccupied_heat_setpoint
cool_setpoint = unoccupied_cool_setpoint
# Write temperature setpoints to each VAV
for address in vav_addresses:
write_heat = f"{address} analogValue 1 presentValue {heat_setpoint}"
bacnet.write(write_heat)
write_cool = f"{address} analogValue 2 presentValue {cool_setpoint}"
bacnet.write(write_cool)
# Read outside air temperature from the boiler
outside_air_temp = bacnet.read(f"{BOILER_IP} {BOILER_OUTSIDE_AIR_SENSOR}")
# Write the outside air temperature to the AHU controller
bacnet.write(f"{AHU_IP} {AHU_OUTSIDE_AIR_VALUE} {outside_air_temp}")
# Sleep for 1 minute
time.sleep(60)
# Clean up BACnet connection
bacnet.disconnect()
What’s also noticeable is that there’s no exception handling for errors or alarms to notify if a pump fails, but that can easily be built in. When I used to set up supervisory controllers, I’d ask the client’s IT department for their email SMTP service or server and implement alarms through clunky supervisory-level logic. Today, there are plenty of Python libraries to handle that seamlessly. In my opinion, BAS alarms should be kept to an absolute minimum—only dialing out a text for mission-critical equipment failures, like a pump or boiler, and that’s it.
Instead, we should be leveraging the power of cloud-based analytics for non-critical issues like zones not meeting setpoints, fault detection for things like PID hunting, zone effectiveness, etc. We should focus more on IoT services rather than relying on outdated, noisy BAS alarm consoles that often get ignored over time.
Again, this is a commercial building, not a research facility with complex exhaust systems, a blood bank, or a prison requiring intricate smoke damper sequencing. The reality is, most buildings out there are smaller, often without a BAS at all. In these cases, simpler systems are more than sufficient to meet the needs of the building without the added complexity.
What if the maintenance staff needs to make setpoint adjustments and building startup TAB processes?
In my humble opinion, we should be installing BAS hardware—programmable devices inside control panels—that allow for setpoint adjustments directly on the device itself like a controller with an LED display and keypad, while heavily leveraging IoT for cloud-based data science services, instead of relying on a BAS GUI at all. A Python script can easily handle more constants, and you simply restart the script after setpoint adjustments are made. I do this all the time, sometimes several times a day. IT provides the computer hardware and methods to access the machine running the script, and you just modify a text file. If I can do it, anyone can—if they are trained properly and willing.
The Testing, Adjusting, and Balancing (TAB) process is the final phase of construction, where a specialized technician calibrates the HVAC system. This process requires the controls technician to ensure the equipment is properly commissioned, and they typically work together to drive the system in specific ways—for example, sending a VAV AHU system into maximum cooling mode so the TAB technician can set the duct static pressure for the AHU in that condition. They also directly plug into VAV box controllers to calibrate airflow readings, bypassing the need for any involvement of the supervisory controller. If I can write a Python script for electrical load shedding, similar scripts can easily be created for the HVAC system checkout process as well.
Where does industry need to change to implement this?
Owner-direct or existing systems could adopt this approach right now. In my opinion, monitoring-based commissioning (MBx) businesses are well-positioned for this shift. They already operate as IoT companies or use IoT services to consult with building owners about mechanical deficiencies found in HVAC analytics data. So, what would it take for a mechanical engineer at one of these MBx firms—someone who probably already knows Python—to simply view the fault detection diagnostics (FDD) and HVAC analytics, then make adjustments to a Python script running all the supervisory-level logic?
Some IoT companies offer bi-directional control of the building, but I personally prefer separating supervisory-level logic from IoT—even if the supervisory logic is just a Python script. This gives the client the flexibility to choose and switch IoT vendors as needed. Plus, Python is free, open-source, and familiar to computer science students and IT staff fresh out of college. In my opinion, clients’ internal IT and maintenance staff could easily run a simple script like this, without needing specialized or proprietary software.
I also believe for the industry to change on a larger scale, the shift needs to start at the mechanical design engineer level. For example, at least where I live, mechanical designers create a "specification" for a contractor to build and automate. If it's not in the "spec," it won't get done. Contractors get paid to set up equipment according to the spec, and that's the end of it. However, if this new approach can be demonstrated effectively, I’m willing to bet that many mechanical design engineers would be open to adopting it. Most are likely progressive in this area, and often they just copy and paste very generic control specifications from one job to the next.
Mechanical design engineers are experts in sizing HVAC equipment, applying mechanical engineering theory, thermodynamics, and ensuring compliance with heat transfer theory, energy codes, and ventilation requirements—not automation. As long as the system meets the energy and ventilation codes, that’s probably all they’re concerned with anyway.
What do you guys think? I find this approach really exciting and would love to set it up in a heartbeat. Feel free to DM me if you’d like to dive deeper into the details! This is just the basics, but it can easily be expanded to integrate more building systems, demand response, and much more—all using free and open-source tools. Thanks for reading...this would make for a real neat conceptual idea GitHub repository.
Sr. Staff Engineer at Rochester Institute of Technology
3moOne final thing. Your comment about "get a block of IP addresses from the IT department" has in my experience been a really huge problem, because you have IT people who don't understand BACnet, and controls people who really don't understand networking. That may not always be the case but in my experience it usually is. Of particular concern to me is the dependence of BACnet on broadcasts, and the need to address this as the BAS grows. Once you get to campus scale, it can be a complete disaster - my campus's controls network is 11 or 12 separate IP networks with BBMDs making them all into a single BACnet broadcast domain. Not all devices implement BACnet well. In my case, the field controllers will implement COV until there are more than 2 or 3 subscribers, then revert to just broadcasting. The result is that I see some sensors 1/2 mile away broadcasting their COV changes network-wide. Unless you're good with wireshark AND know how to interpret the BACnet APDUs then you can easily have degraded performance. If you ask me, the world really needs something smarter than a BBMD - some kind of netfilter plugin would be awesome.
Sr. Staff Engineer at Rochester Institute of Technology
3moI'm also a little concerned about having python-capable devices on the edge. Replacing a VAV controller with a Raspberry Pi Zero running Python is, in my mind a bad idea. (I'm not suggesting you proposed this). I've done quite a bit with micropython on microcontrollers and thus far it has been pretty reliable and stable. Most of the VAV boxes I've worked with in the last few years (especially lab exhaust type stuff) tend to have 4-20mA control and feedback.
Sr. Staff Engineer at Rochester Institute of Technology
3moI very strongly agree with the comment that most BAS/BMS systems don't support traditional software design methodologies, which means software quality suffers. I must say though that if you go back to the origins of a PLC, not the programming language itself but the concepts of execution - fixed time scans, latched I/O before/after the scans, minimal or no jumps, loops, or interrupts - do lead to some positive software quality outcomes as well. There's a reason PLCs are designed that way, and there's a reason that PLCs I worked on 35 years ago are still in service today. For devices on the very edge I'm far from ready to completely abandon some of those ideas.
Sr. Staff Engineer at Rochester Institute of Technology
3moThe second thing I mentioned is visualization. If you look at the graphing built into Siemens or Automated Logic, the graphing abilities are rigid and still feel like they were designed in the 1980s. I am a huge Grafana fan, and I have built a Grafana datasource driver for Automated Logic's WebCTRL. It lets me pick points to graph no matter where they are in the system - even if they are on different WebCTRL instances - which is useful for performance monitoring and tuning, but EVEN MORE useful for troubleshooting. What I'm trying to say is that there are many first-in-class open source components that fit into your concept. To make things even more plug and play I think it's worth mentioning the tagging approaches of Haystack, which can guide some normalization even if one doesn't fully adopt the Haystack philosophy .
Sr. Staff Engineer at Rochester Institute of Technology
3moI find that some of the foundational components of commercial automation systems - data storage and analytical visualization - are lacking (or worse). Two things come to mind. The first is don't underestimate the value of having building data stored in a true time-series database like TimescaleDB or InfluxDB. These databases are efficient for long-term time-series data storage (which is what BAS historical data is), and they have time-series handling functions built in. Consider the case where you want to pull in a couple of years worth of trends, perhaps millions of points (there are over half a million minutes in a year). These time series functions become even more important when you're trying to combine differential (what BACnet calls "COV") data streams - that's often the first step for any kind of machine learning, and also for more traditional analysis.