volttron-lib-bacnet-driver


Namevolttron-lib-bacnet-driver JSON
Version 0.2.0rc0 PyPI version JSON
download
home_pagehttps://github.com/eclipse-volttron/volttron-lib-bacnet-driver
SummaryBACnet driver supported and maintained by the Volttron team.
upload_time2023-01-18 22:32:25
maintainer
docs_urlNone
authorMark Bonicillo
requires_python>=3.8,<4.0
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # volttron-lib-bacnet-driver

[![Passing?](https://github.com/VOLTTRON/volttron-lib-bacnet-driver/actions/workflows/run-tests.yml/badge.svg)](https://github.com/VOLTTRON/volttron-lib-bacnet-driver/actions/workflows/run-tests.yml)
[![pypi version](https://img.shields.io/pypi/v/volttron-lib-bacnet-driver.svg)](https://pypi.org/project/volttron-lib-bacnet-driver/)

# Prerequisites

* Python 3.8

## Python

<details>
<summary>To install Python 3.8, we recommend using <a href="https://github.com/pyenv/pyenv"><code>pyenv</code></a>.</summary>

```bash
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv

# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"

# install Python 3.8
pyenv install 3.8.10

# make it available globally
pyenv global system 3.8.10
```
</details>


## Poetry

This project uses `poetry` to install and manage dependencies. To install poetry,
follow these [instructions](https://python-poetry.org/docs/master/#installation).

# Installation

1. Create and activate a virtual environment.

```shell
python -m venv env
source env/bin/activate
```

2. Installing 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'

```shell
pip install volttron
volttron -vv -l volttron.log &
```

3. Install the volttron platform driver:

```shell
vctl install volttron-platform-driver --vip-identity platform.driver --start
```

4. Install the BACnetProxy agent:

```shell
vctl install volttron-bacnet-proxy --agent-config <path to bacnet proxy agent configuration file> \
--vip-identity platform.bacnet_proxy \
--start
```

5.  Install the volttron bacnet driver library:

```shell
pip install volttron-lib-bacnet-driver
```

6.  Install 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:

```shell
mkdir config
cd config
```

* Create a file called `bacnet.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 a `bacnet.config`:

```json
{
    "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 the `driver_config`, `device_address` is 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. See [BACnet Router Addressing](https://volttron.readthedocs.io/en/develop/agent-framework/driver-framework/bacnet/bacnet-router-addressing.html#bacnet-router-addressing).

* Create another file called `bacnet.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:

```csv
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 Temp
```

* Add 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.config
```

7. Observe Data

To see data being published to the bus, install a [Listener Agent](https://pypi.org/project/volttron-listener/):

```
vctl install volttron-listener --start
```

Once 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.log
```

# Development

Please see the following for contributing guidelines [contributing](https://github.com/eclipse-volttron/volttron-core/blob/develop/CONTRIBUTING.md).

Please see the following helpful guide about [developing modular VOLTTRON agents](https://github.com/eclipse-volttron/volttron-core/blob/develop/DEVELOPING_ON_MODULAR.md)

# Disclaimer Notice

This 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eclipse-volttron/volttron-lib-bacnet-driver",
    "name": "volttron-lib-bacnet-driver",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Mark Bonicillo",
    "author_email": "volttron@pnnl.gov",
    "download_url": "https://files.pythonhosted.org/packages/f8/b2/fa46fab98651f7b8695c2c8484161010ed79e18bea9a103438407b5c997f/volttron_lib_bacnet_driver-0.2.0rc0.tar.gz",
    "platform": null,
    "description": "# volttron-lib-bacnet-driver\n\n[![Passing?](https://github.com/VOLTTRON/volttron-lib-bacnet-driver/actions/workflows/run-tests.yml/badge.svg)](https://github.com/VOLTTRON/volttron-lib-bacnet-driver/actions/workflows/run-tests.yml)\n[![pypi version](https://img.shields.io/pypi/v/volttron-lib-bacnet-driver.svg)](https://pypi.org/project/volttron-lib-bacnet-driver/)\n\n# Prerequisites\n\n* Python 3.8\n\n## Python\n\n<details>\n<summary>To install Python 3.8, we recommend using <a href=\"https://github.com/pyenv/pyenv\"><code>pyenv</code></a>.</summary>\n\n```bash\n# install pyenv\ngit clone https://github.com/pyenv/pyenv ~/.pyenv\n\n# setup pyenv (you should also put these three lines in .bashrc or similar)\nexport PATH=\"${HOME}/.pyenv/bin:${PATH}\"\nexport PYENV_ROOT=\"${HOME}/.pyenv\"\neval \"$(pyenv init -)\"\n\n# install Python 3.8\npyenv install 3.8.10\n\n# make it available globally\npyenv global system 3.8.10\n```\n</details>\n\n\n## Poetry\n\nThis project uses `poetry` to install and manage dependencies. To install poetry,\nfollow these [instructions](https://python-poetry.org/docs/master/#installation).\n\n# Installation\n\n1. Create and activate a virtual environment.\n\n```shell\npython -m venv env\nsource env/bin/activate\n```\n\n2. Installing 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'\n\n```shell\npip install volttron\nvolttron -vv -l volttron.log &\n```\n\n3. Install the volttron platform driver:\n\n```shell\nvctl install volttron-platform-driver --vip-identity platform.driver --start\n```\n\n4. Install the BACnetProxy agent:\n\n```shell\nvctl install volttron-bacnet-proxy --agent-config <path to bacnet proxy agent configuration file> \\\n--vip-identity platform.bacnet_proxy \\\n--start\n```\n\n5.  Install the volttron bacnet driver library:\n\n```shell\npip install volttron-lib-bacnet-driver\n```\n\n6.  Install a BACnet Driver onto the Platform Driver.\n\nInstalling a BACnet driver in the Platform Driver Agent requires adding copies of the device configuration and registry configuration files to the Platform Driver\u2019s configuration store.\n\n* Create a config directory and navigate to it:\n\n```shell\nmkdir config\ncd config\n```\n\n* Create a file called `bacnet.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 a `bacnet.config`:\n\n```json\n{\n    \"driver_config\": {\"device_address\": \"123.45.67.890\",\n                      \"device_id\": 123456},\n    \"driver_type\": \"bacnet\",\n    \"registry_config\":\"config://bacnet.csv\",\n    \"interval\": 15,\n    \"timezone\": \"US/Pacific\"\n}\n```\n\n \u2139\ufe0f **TIP:** In the `driver_config`, `device_address` is 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. See [BACnet Router Addressing](https://volttron.readthedocs.io/en/develop/agent-framework/driver-framework/bacnet/bacnet-router-addressing.html#bacnet-router-addressing).\n\n* Create another file called `bacnet.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:\n\n```csv\nPoint Name,Volttron Point Name,Units,Unit Details,BACnet Object Type,Property,Writable,Index,Notes\n12345a/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 Temp\n```\n\n* Add the bacnet driver config and bacnet csv file to the Platform Driver configuration store:\n\n```\nvctl config store platform.driver bacnet.csv bacnet.csv --csv\nvctl config store platform.driver devices/bacnet bacnet.config\n```\n\n7. Observe Data\n\nTo see data being published to the bus, install a [Listener Agent](https://pypi.org/project/volttron-listener/):\n\n```\nvctl install volttron-listener --start\n```\n\nOnce installed, you should see the data being published by viewing the Volttron logs file that was created in step 2.\nTo watch the logs, open a separate terminal and run the following command:\n\n```\ntail -f <path to folder containing volttron.log>/volttron.log\n```\n\n# Development\n\nPlease see the following for contributing guidelines [contributing](https://github.com/eclipse-volttron/volttron-core/blob/develop/CONTRIBUTING.md).\n\nPlease see the following helpful guide about [developing modular VOLTTRON agents](https://github.com/eclipse-volttron/volttron-core/blob/develop/DEVELOPING_ON_MODULAR.md)\n\n# Disclaimer Notice\n\nThis material was prepared as an account of work sponsored by an agency of the\nUnited States Government.  Neither the United States Government nor the United\nStates Department of Energy, nor Battelle, nor any of their employees, nor any\njurisdiction or organization that has cooperated in the development of these\nmaterials, makes any warranty, express or implied, or assumes any legal\nliability or responsibility for the accuracy, completeness, or usefulness or any\ninformation, apparatus, product, software, or process disclosed, or represents\nthat its use would not infringe privately owned rights.\n\nReference herein to any specific commercial product, process, or service by\ntrade name, trademark, manufacturer, or otherwise does not necessarily\nconstitute or imply its endorsement, recommendation, or favoring by the United\nStates Government or any agency thereof, or Battelle Memorial Institute. The\nviews and opinions of authors expressed herein do not necessarily state or\nreflect those of the United States Government or any agency thereof.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "BACnet driver supported and maintained by the Volttron team.",
    "version": "0.2.0rc0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7afb9989e8acae60b81695dd30ec2394f2ae93a72aea59fe8061cd25497d00e8",
                "md5": "c851ce45bb790a8ab3dd7866ca1b1f1b",
                "sha256": "4ad723cfddb8a16ffdef3d7094ef8964f273e076bb0223c89b07ca7857e8a61d"
            },
            "downloads": -1,
            "filename": "volttron_lib_bacnet_driver-0.2.0rc0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c851ce45bb790a8ab3dd7866ca1b1f1b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 7479,
            "upload_time": "2023-01-18T22:32:23",
            "upload_time_iso_8601": "2023-01-18T22:32:23.914377Z",
            "url": "https://files.pythonhosted.org/packages/7a/fb/9989e8acae60b81695dd30ec2394f2ae93a72aea59fe8061cd25497d00e8/volttron_lib_bacnet_driver-0.2.0rc0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8b2fa46fab98651f7b8695c2c8484161010ed79e18bea9a103438407b5c997f",
                "md5": "180fff04302dc96bb04dc372b7b9a4a6",
                "sha256": "134d8319e3f94ea9dd89ec5e5e9d94f2f7393531f3ffb44e0b367089fd7a6136"
            },
            "downloads": -1,
            "filename": "volttron_lib_bacnet_driver-0.2.0rc0.tar.gz",
            "has_sig": false,
            "md5_digest": "180fff04302dc96bb04dc372b7b9a4a6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 8165,
            "upload_time": "2023-01-18T22:32:25",
            "upload_time_iso_8601": "2023-01-18T22:32:25.695955Z",
            "url": "https://files.pythonhosted.org/packages/f8/b2/fa46fab98651f7b8695c2c8484161010ed79e18bea9a103438407b5c997f/volttron_lib_bacnet_driver-0.2.0rc0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-18 22:32:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "eclipse-volttron",
    "github_project": "volttron-lib-bacnet-driver",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "volttron-lib-bacnet-driver"
}
        
Elapsed time: 0.06924s