Skip to content

Add BACnet read-only adapter foundation#228

Merged
smithaldon1 merged 1 commit into
mainfrom
feat/issue-218-bacnet-read-only-adapter
May 25, 2026
Merged

Add BACnet read-only adapter foundation#228
smithaldon1 merged 1 commit into
mainfrom
feat/issue-218-bacnet-read-only-adapter

Conversation

@smithaldon1
Copy link
Copy Markdown
Member

Closes #218

Summary

  • Add an ingestion-layer BACnet read-only adapter foundation that loads enabled BACnet ProtocolConnectionProfile records from the local profile store.
  • Poll configured object references through an injectable BacnetObjectReader; no BACnet writes, commandable-property changes, object discovery, or runtime scheduler is added.
  • Support device address, device instance, optional network number, configured object identifiers, polling interval access, units, object names, and object-to-FactoryEvent mapping.
  • Normalize numeric BACnet object readings into process.measurement.recorded FactoryEvents with source metadata for connection profile ID, network/device descriptor, object reference, adapter name, and poll index.
  • Add clear adapter errors for invalid profile stores, unavailable devices, missing objects, unconfigured objects, stale readings, and nonnumeric values.
  • Document Docker Desktop BACnet/UDP demo limitations separately from production BACnet/IP expectations.

Test Evidence

  • .venv/bin/python -m pytest services/ingestion/tests/test_bacnet_read_only_adapter.py - passed, 9 tests.
  • make test-integration - passed, 94 tests.
  • make lint - passed, Ruff found no issues after import cleanup.
  • make typecheck - passed, compileall completed across packages and services.
  • make test - passed, 266 tests.
  • make docs - passed; docs are Markdown-only and no checker is configured yet.
  • git diff --check and git diff --cached --check - passed.

Docs Impact

  • Updated services/ingestion/README.md with the BACnet read-only adapter foundation, Docker Desktop demo limitations, production BACnet/IP expectations, source metadata behavior, safety boundary, and focused test command.
  • Updated docs/LEARNING_LOG.md with what changed, why it matters, how the data flows, how to test it, and the next learning step.

Follow-up Work

  • Add a real BACnet/IP object reader only after connector runtime orchestration, network approval, and object mapping rules are defined.
  • Add explicit tag/source mapping lookup so object mapping can be governed by mapping_reference instead of adapter defaults and object reader metadata.
  • Keep BACnet writes, commandable-property changes, arbitrary object discovery, and UI ingestion controls out of this adapter until dedicated issues and ADR updates define those boundaries.

Copy link
Copy Markdown
Member Author

@smithaldon1 smithaldon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and approved for merge

@smithaldon1 smithaldon1 merged commit 21fc816 into main May 25, 2026
3 checks passed
@smithaldon1 smithaldon1 deleted the feat/issue-218-bacnet-read-only-adapter branch May 25, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9. Feature: Add BACnet read-only adapter foundation

1 participant