From 7dfd8b431f9311b76d0759de90d876e51cadc73d Mon Sep 17 00:00:00 2001 From: "David M. Raker" Date: Tue, 30 Sep 2025 19:22:12 -0700 Subject: [PATCH 1/5] Fixed log statement. --- src/protocol_proxy/protocol/bacnet/bacnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol_proxy/protocol/bacnet/bacnet.py b/src/protocol_proxy/protocol/bacnet/bacnet.py index 6583d4c..a9fe5f4 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: - print(str(e)) + _log.debug(str(e)) # async def write_property_multiple(self, device_address: str, write_specifications: list): # # TODO Implement write_property_multiple. Commenting until completed. From 9831949d050eea6d698a77ae36657ca8eb9901c7 Mon Sep 17 00:00:00 2001 From: "David M. Raker" Date: Wed, 1 Oct 2025 13:57:56 -0700 Subject: [PATCH 2/5] Updates to README.md. --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) 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. From 88468fbde9801b4b3c4a52df0555f20c4d50651d Mon Sep 17 00:00:00 2001 From: "David M. Raker" Date: Wed, 1 Oct 2025 13:58:28 -0700 Subject: [PATCH 3/5] Added dev dependencies group to pyproject.toml. --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index eab03bf..ca12714 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" From d9845774be86db45b583a6d5f01727ee4d28e61f Mon Sep 17 00:00:00 2001 From: "David M. Raker" Date: Wed, 1 Oct 2025 14:00:06 -0700 Subject: [PATCH 4/5] Updated handling of return from write_property on error. --- src/protocol_proxy/protocol/bacnet/bacnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From b3c275aae3338d7ef5d9fa9c5610585aae302746 Mon Sep 17 00:00:00 2001 From: "David M. Raker" Date: Wed, 22 Oct 2025 10:28:49 -0700 Subject: [PATCH 5/5] Removed unnecessary line. --- src/protocol_proxy/protocol/bacnet/bacnet_proxy.py | 1 - 1 file changed, 1 deletion(-) 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)