diff --git a/README.md b/README.md index a04324b..bb127f9 100644 --- a/README.md +++ b/README.md @@ -1 +1,55 @@ -# lib-protocol-proxy-bacnet \ No newline at end of file +# Protocol Proxy BACnet Library +![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg) +![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg) +[![Passing?](https://github.com/eclipse-volttron/lib-protocol-proxy-bacnet/actions/workflows/run-tests.yml/badge.svg)](https://github.com/eclipse-volttron/lib-protocol-proxy-bacnet/actions/workflows/run-tests.yml) +[![pypi version](https://img.shields.io/pypi/v/protocol-proxy-bacnet.svg)](https://pypi.org/project/protocol-proxy-bacnet/) + +This library provides support for communication and management of BACnet devices to a [Protocol Proxy](https://github.com/eclipse-volttron/lib-protocol-proxy) Manager. +Communication with a BACnet device on a network happens via a virtual BACnet device. + +## Automatically installed dependencies +- python = ">=3.10,<4.0" +- protocol-proxy = ">=2.0.0rc0" +- bacpypes3 = ">=0.0.102" + + +[//]: # (# Documentation) + +[//]: # (More detailed documentation can be found on [ReadTheDocs](https://eclipse-volttron.readthedocs.io/en/latest/external-docs/lib-protocol-proxy-bacnet/index.html. The RST source) + +[//]: # (of the documentation for this component is located in the "docs" directory of this repository.) + +# Installation +This library, along with its dependencies, can be installed using pip: + +```shell +pip install lib-protocol-proxy-bacnet +``` + +# Development +This library is maintained by the VOLTTRON Development Team. + +Please see the following [guidelines](https://github.com/eclipse-volttron/volttron-core/blob/develop/CONTRIBUTING.md) +for contributing to this and/or other VOLTTRON repositories. + +[//]: # (Please see the following helpful guide about [using the Protocol Proxy](https://github.com/eclipse-volttron/lib-protocol-proxy/blob/develop/developing_with_protocol_proxy.md)) + +[//]: # (in your VOLTTRON agent or other applications.) + +# 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. diff --git a/pyproject.toml b/pyproject.toml index a862c09..86f5fdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,9 @@ python = ">=3.10,<4.0" bacpypes3 = ">=0.0.102" protocol-proxy = ">=2.0.0rc0" +[tool.poetry.group.dev.dependencies] +# No additional dependencies. + [tool.poetry.group.documentation.dependencies] Sphinx = "^4.5.0" sphinx-rtd-theme = "^1.0.0" diff --git a/src/protocol_proxy/protocol/bacnet/bacnet.py b/src/protocol_proxy/protocol/bacnet/bacnet.py index a9fe5f4..08e52d1 100644 --- a/src/protocol_proxy/protocol/bacnet/bacnet.py +++ b/src/protocol_proxy/protocol/bacnet/bacnet.py @@ -157,7 +157,7 @@ async def write_property(self, device_address: str, object_identifier: str, prop int(priority) ) except ErrorRejectAbortNack as e: - _log.debug(str(e)) + return e # async def write_property_multiple(self, device_address: str, write_specifications: list): # # TODO Implement write_property_multiple. Commenting until completed. diff --git a/src/protocol_proxy/protocol/bacnet/bacnet_proxy.py b/src/protocol_proxy/protocol/bacnet/bacnet_proxy.py index 0648441..2fc1c90 100644 --- a/src/protocol_proxy/protocol/bacnet/bacnet_proxy.py +++ b/src/protocol_proxy/protocol/bacnet/bacnet_proxy.py @@ -214,7 +214,6 @@ async def who_is_endpoint(self, _, raw_message: bytes): device_instance_low = message.get('device_instance_low', 0) device_instance_high = message.get('device_instance_high', 4194303) dest = message.get('dest', '255.255.255.255:47808') - apdu_timeout = message.get('apdu_timeout', None) # Keep for backward compatibility but don't use # TODO: Why!? result = await self.bacnet.who_is(device_instance_low, device_instance_high, dest) return serialize(result)