Package: volttron-lib-bacnet-driver
volttron-lib-bacnet-driverPrerequisitesPython 3.8PythonTo install Python 3.8, we recommend usingpyenv.# install pyenvgitclonehttps://github.com/pyenv/pyenv~/.pyenv# setup pyenv (you should also put these three lines in .bashrc or similar)exportPATH="${HOME}/.pyenv/bin:${PATH}"exportPYENV_ROOT="${HOME}/.pyenv"eval"$(pyenvinit-)"# install Python 3.8pyenvinstall3.8.10# make it available globallypyenvglobalsystem3.8.10PoetryThis project usespoetryto install and manage dependencies. To install poetry,
follow theseinstructions.InstallationCreate and activate a virtual environment.python-mvenvenvsourceenv/bin/activateInstalling volttron-platform-driver requires a running volttron instance. Install volttron and start an instance in the background and save log output to a file named 'volttron.log'pipinstallvolttron
volttron-vv-lvolttron.log&Install the volttron platform driver:vctlinstallvolttron-platform-driver--vip-identityplatform.driver--startInstall the BACnetProxy agent:vctlinstallvolttron-bacnet-proxy--agent-config<pathtobacnetproxyagentconfigurationfile>\--vip-identityplatform.bacnet_proxy\--startInstall the volttron bacnet driver library:pipinstallvolttron-lib-bacnet-driverInstall a BACnet Driver onto the Platform Driver.Installing a BACnet driver in the Platform Driver Agent requires adding copies of the device configuration and registry configuration files to the Platform Driver’s configuration store.Create a config directory and navigate to it:mkdirconfigcdconfigCreate a file calledbacnet.config; it should contain a JSON object that specifies the configuration of your BACnet driver. An example of such a file is provided at the root of this project; the example file is named 'bacnet.config'. The following JSON is an example of abacnet.config:{"driver_config":{"device_address":"123.45.67.890","device_id":123456},"driver_type":"bacnet","registry_config":"config://bacnet.csv","interval":15,"timezone":"US/Pacific"}ℹ️TIP:In thedriver_config,device_addressis the address bound to the network port over which BACnet communication will happen on the computer running VOLTTRON. This is NOT the address of any target device. SeeBACnet Router Addressing.Create another file calledbacnet.csv; it should contain all the points on the device that you want published to Volttron. An example of such a CSV file is provided at the root of this project; the example CSV file is named 'bacnet.csv'. The following CSV file is an example:Point Name,Volttron Point Name,Units,Unit Details,BACnet Object Type,Property,Writable,Index,Notes
12345a/Field Bus.12345A CHILLER.AHU-COIL-CHWR-T,12345a/Field Bus.12345A CHILLER.AHU-COIL-CHWR-T,degreesFahrenheit,-50.00 to 250.00,analogInput,presentValue,FALSE,3000741,,Primary CHW Return TempAdd the bacnet driver config and bacnet csv file to the Platform Driver configuration store:vctl config store platform.driver bacnet.csv bacnet.csv --csv
vctl config store platform.driver devices/bacnet bacnet.configObserve DataTo see data being published to the bus, install aListener Agent:vctl install volttron-listener --startOnce installed, you should see the data being published by viewing the Volttron logs file that was created in step 2.
To watch the logs, open a separate terminal and run the following command:tail -f <path to folder containing volttron.log>/volttron.logDevelopmentPlease see the following for contributing guidelinescontributing.Please see the following helpful guide aboutdeveloping modular VOLTTRON agentsDisclaimer NoticeThis material was prepared as an account of work sponsored by an agency of the
United States Government.  Neither the United States Government nor the United
States Department of Energy, nor Battelle, nor any of their employees, nor any
jurisdiction or organization that has cooperated in the development of these
materials, makes any warranty, express or implied, or assumes any legal
liability or responsibility for the accuracy, completeness, or usefulness or any
information, apparatus, product, software, or process disclosed, or represents
that its use would not infringe privately owned rights.Reference herein to any specific commercial product, process, or service by
trade name, trademark, manufacturer, or otherwise does not necessarily
constitute or imply its endorsement, recommendation, or favoring by the United
States Government or any agency thereof, or Battelle Memorial Institute. The
views and opinions of authors expressed herein do not necessarily state or
reflect those of the United States Government or any agency thereof.