Skip to content

Commit dc32c5a

Browse files
committed
Version 1.4.9 - See changelog for updates.
1 parent 6d29c20 commit dc32c5a

File tree

8 files changed

+385
-9
lines changed

8 files changed

+385
-9
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.4.9] - 2026-02-14
11+
12+
### Added
13+
14+
- **Interactive CLI example**: New `examples/interactive_cli.py` providing a menu-driven
15+
interactive CLI for testing Client API features against a real BACnet device. Supports
16+
read/write (single and multiple), device discovery (Who-Is, Who-Has, object list), COV
17+
subscriptions with live notifications, and time synchronization. Uses non-blocking input
18+
to keep the event loop responsive for COV callbacks between actions.
19+
1020
## [1.4.8] - 2026-02-14
1121

1222
### Added

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Asynchronous BACnet/IP protocol library for Python 3.13+, implementing ASHRAE Standard 135-2020. Zero required runtime dependencies, built on native `asyncio`.
44

5-
[Documentation](https://bac-py.readthedocs.io) | [Getting Started](https://bac-py.readthedocs.io/en/latest/getting-started.html) | [API Reference](https://bac-py.readthedocs.io/en/latest/api/app/client.html) | [Changelog](https://bac-py.readthedocs.io/en/latest/changelog.html)
5+
[Documentation](https://jscott3201.github.io/bac-py/) | [Getting Started](https://jscott3201.github.io/bac-py/getting-started.html) | [API Reference](https://jscott3201.github.io/bac-py/api/app/index.html) | [Changelog](https://jscott3201.github.io/bac-py/changelog.html)
66

77
```python
88
from bac_py import Client
@@ -38,7 +38,7 @@ async with Client(instance_number=999) as client:
3838
| **Convenience API** | String-based addressing (`"ai,1"`, `"pv"`), smart type coercion, auto-discovery |
3939
| **Serialization** | `to_dict()`/`from_dict()` on all data types; optional `orjson` backend |
4040
| **Conformance** | BIBB declarations and PICS generation per Clause 24 |
41-
| **Quality** | 6,300+ unit tests, Docker integration tests, local benchmarks, type-safe enums and frozen dataclasses throughout |
41+
| **Quality** | 6,380+ unit tests, Docker integration tests, local benchmarks, type-safe enums and frozen dataclasses throughout |
4242

4343
## Installation
4444

@@ -84,7 +84,7 @@ The convenience API accepts 48 object type aliases (`ai`, `ao`, `av`, `bi`,
8484
`bo`, `bv`, `msv`, `dev`, `sched`, `tl`, `nc`, etc.) and 45 property
8585
abbreviations (`pv`, `name`, `type`, `list`, `status`, `priority`, `min`,
8686
`max`, etc.). Full names like `"analog-input,1"` and `"present-value"` also
87-
work. See the [alias reference](https://bac-py.readthedocs.io/en/latest/getting-started.html#string-aliases) for the complete table.
87+
work. See the [alias reference](https://jscott3201.github.io/bac-py/getting-started.html#string-aliases) for the complete table.
8888

8989
### Write a Value
9090

@@ -318,7 +318,7 @@ from bac_py.services.errors import (
318318

319319
## Examples
320320

321-
The [`examples/`](examples/) directory contains 22 runnable scripts. See the
321+
The [`examples/`](examples/) directory contains 23 runnable scripts. See the
322322
[Examples Guide](https://jscott3201.github.io/bac-py/guide/examples.html) for
323323
detailed walkthroughs.
324324

@@ -345,6 +345,7 @@ detailed walkthroughs.
345345
| `secure_connect_hub.py` | Run a BACnet/SC hub with object serving |
346346
| `ip_to_sc_router.py` | Bridge BACnet/IP and BACnet/SC networks |
347347
| `ipv6_client_server.py` | BACnet/IPv6 client and server with foreign device |
348+
| `interactive_cli.py` | Menu-driven interactive CLI for exploring the full API |
348349
| `sc_generate_certs.py` | Generate test PKI and demonstrate TLS-secured SC |
349350

350351
## Testing

docs/guide/examples.rst

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Example Scripts
44
===============
55

6-
The ``examples/`` directory contains 22 runnable scripts demonstrating bac-py's
6+
The ``examples/`` directory contains 23 runnable scripts demonstrating bac-py's
77
capabilities. Each script is self-contained and uses the high-level
88
:class:`~bac_py.client.Client` API with ``asyncio.run()``.
99

@@ -35,6 +35,42 @@ All examples follow the same structure:
3535
full logger hierarchy and filtering options.
3636

3737

38+
.. _examples-interactive-cli:
39+
40+
Interactive CLI
41+
---------------
42+
43+
interactive_cli.py
44+
^^^^^^^^^^^^^^^^^^
45+
46+
A menu-driven interactive CLI for testing Client API features against a real
47+
BACnet device. Provides a single tool to explore the full API interactively
48+
instead of editing and re-running individual example scripts.
49+
50+
.. code-block:: bash
51+
52+
# Start with a target address
53+
uv run python examples/interactive_cli.py 192.168.1.100
54+
55+
# Or enter the address interactively
56+
uv run python examples/interactive_cli.py
57+
58+
The menu offers 10 actions covering the core Client API:
59+
60+
- **Read / Write** -- single property reads and writes with array index and
61+
priority support, plus batch operations via ReadPropertyMultiple and
62+
WritePropertyMultiple
63+
- **Discovery** -- Who-Is device discovery, Who-Has object search, and object
64+
list enumeration
65+
- **COV** -- subscribe and unsubscribe with live ``[COV]``-prefixed
66+
notifications printed between menu prompts
67+
- **Device Management** -- time synchronization using the current system clock
68+
69+
Input uses ``asyncio.run_in_executor()`` so the event loop stays responsive for
70+
COV callbacks while waiting for user input. Active COV subscriptions are
71+
automatically cleaned up on exit.
72+
73+
3874
.. _examples-reading-writing:
3975

4076
Reading and Writing

0 commit comments

Comments
 (0)