Skip to main content

BACnet Scripting Framework for testing DDC Controls

Project description

BAC0 Build status Coverage Documentation

Join the chat at https://gitter.im/ChristianTremblay/BAC0

BAC0 is a Python 3 (3.6 and over) scripting application that uses BACpypes to process BACnet™ messages on a IP network. This library brings out simple commands to browse a BACnet network, read properties from BACnet devices or write to them.

Python is a simple language to learn and a very powerful tool for data processing. Coupled to BACnet, it becomes a great tool to test devices an interact with controllers.

BAC0 takes its name from the default IP port used by BACnet/IP communication which is port 47808. In hexadecimal, it’s written 0xBAC0.

Test driven development (TDD) for DDC controls

BAC0 is made for building automation system (BAS) programmers. Controllers used in this field are commonly called DDC Controllers (Direct Digital Control).

Typical controllers can be programmed in different ways, depending on the manufacturer selling them (block programming, basic “kinda” scripts, C code, etc…). BAC0, is a unified way, using Python language and BACnet/IP communication, to interact with those controllers once their sequence is built.

BAC0 allows users to simply test an application even if sensors are not connected to the controller. Using the out_of_service property, it’s easy to write a value to the input so the controller will think an input is conencted.

It’s also possible to do “manual commands” on output (often called overrides). In fact, every variable is exposed and seen by BAC0 and it’s possible to interact with them using a simple scripting language or a complete unit test suite (like Pytest).

Without a program like BAC0, you can rely on your DDC programming tool… but it is often slow and every test must be done manually. That means also that if you want to repeat the tests, the more complicated they are, the less chance you’ll be able to do so.

Now you can write your test and run them as often as you want. We’ll show you how it works.

Better start-up with data acquisition

As you will discover, when you define a controller in BAC0, you will get access to historical data of every variables in the controllers. Every points are trended every 10 seconds by default. Which means that you can do data analysis on everything while you’re doing your startup. It allows to see performances and trouble really fast.

This make BAC0 not only a good tool to test your sequence while your in the office. But also a really good tool to assist your startup, test and balancing. Using Jupyter Notebook, you’ll even be able to create nice looking report right from your code.

InfluxDB native support

Connect BAC0 histories directly to a InfluxDB v2.0 instance. It’s then possible to use Grafana to explore your data.

Web features included

BAC0 includes a local web page that will help the user providing basic informations about the netwok seen by the script and also provide a simple interface to historical trends. Flask is used to render the web page and a Bokeh server is also provided to serve live trends to the user.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

BAC0-22.9.21.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

BAC0-22.9.21-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file BAC0-22.9.21.tar.gz.

File metadata

  • Download URL: BAC0-22.9.21.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for BAC0-22.9.21.tar.gz
Algorithm Hash digest
SHA256 c0d5558704b6fe2f801adbd77270ea87c14d5336efb388fc8b876a853722fc71
MD5 67b8cbc0789fb0d6aec6f8ea908b106c
BLAKE2b-256 199e4b88b982164db9ea62e18ca043b302034c13c509ebee97f9b98b013fb2ab

See more details on using hashes here.

File details

Details for the file BAC0-22.9.21-py3-none-any.whl.

File metadata

  • Download URL: BAC0-22.9.21-py3-none-any.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for BAC0-22.9.21-py3-none-any.whl
Algorithm Hash digest
SHA256 7a8b5b16c1b15a515aecc96b9d5ead696de4131d87020d4ad3d2ede6e0323a6b
MD5 260efdbbb0f1dd8b87adc18d86be7cf1
BLAKE2b-256 e9e5daf0757c88d63bd5140490a345664c6b17b1f536803392f6d9fe240edffa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page