BAC0 / An open source tool for BACnet controllers
In the world of software programming, there’s what we call unit tests and test suites. They serve the purpose of testing small parts of an application, easily and rapidly. You modify the code, run the test suites and see if everything works again.
In the DDC world (mostly Building Automation Systems or BAS), we must usually count on some simulation tool inside the proprietary programming tool provided with the controller to test our sequences. And more than often, real tests are done in the field… All these tests are then made « by hand », are hard to reproduce in an exact fashion and they are hard to document. So if you modify your program, how can you tell you didn’t break something ?
Created by Christian Tremblay from SERVISYS inc. BAC0 is the first open source effort to bring a common tool to DDC programmers so they can test efficiently the sequences they are working on. Scriptable, easy to learn, once it’s connected to your device, every exposed variables will be kept in memory so you can document your tests. Thanks to Jupyter Notebook, all this work can be done in your browser.
Based on Python
BAC0 is a Python application. This programming language is part of the top ten more popular languages [ref : http://www.tiobe.com/tiobe_index]. It gained popularity by it’s simplicity, flexibility and a real adoption by the scientific community. Python is a perfect fit for a tool like BAC0.
BAC0 is actually working only with BACnet/IP. It relies on a module named BACpypes (created by Joel Bender). Using a simple BACnet/IP to BACnet/MSTP router makes it work flawlessly with any MSTP devices. BACnet is the most popular communication protocole in the Building Automation industry actually.
Live trending capabilities
Livre trends example created in BAC0 using Bokeh, try it !
With all the features of BAC0, you can bring it on the field to help you with your startups and commissioning. Calculate heater temperature delta, calculate fresh air percentage, make overrides or simulate a sensor to validate your sequence. Bring back a complete database of every points and refer to it later.
Python makes it easy
As BAC0 is a Python application, it is possible to use any Python functions or modules. All histories are created using Pandas DataFrame from which you can extract statistical informations or manipulate data (creating data columns that are the results of an operation on 2 others for example. Like computing an error between a set point and a process variable. )
Python have a lot of testing modules that can be used with BAC0 to automate tests on your devices (unittest, nose, py.test)
Using Pytest for example, it’s easy to create a bunch of test that will interact with your device and tell you if your test pass or not directly from the command line.
Python is multi platform. Use it on your Mac, Windows or Linux machine.
For more details, you can read BAC0 documentation.