Skip to content

Add OPC-UA read-only adapter foundation#226

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

Add OPC-UA read-only adapter foundation#226
smithaldon1 merged 1 commit into
mainfrom
feat/issue-211-opcua-read-only-adapter

Conversation

@smithaldon1
Copy link
Copy Markdown
Member

@smithaldon1 smithaldon1 commented May 25, 2026

Closes #211

Summary

  • Add an ingestion-layer OPC-UA read-only adapter foundation that loads enabled OPC-UA ProtocolConnectionProfile records from the local profile store.
  • Read only the configured profile.opcua.node_ids through an injectable node reader; no browse, write, or arbitrary tag discovery path is added.
  • Normalize configured numeric node values into process.measurement.recorded FactoryEvents with source metadata for connection profile ID, node ID, adapter name, and poll index.
  • Add clear adapter errors for invalid profile stores, unavailable endpoints, bad configured nodes, and nonnumeric node values.
  • Cover the foundation with fake-reader unit tests and a practical integration test against the local simulator-backed OPC-UA server.

Test Evidence

  • .venv/bin/python -m pytest services/ingestion/tests/test_opcua_read_only_adapter.py - passed, 7 tests.
  • make test-integration - passed, 74 tests.
  • make lint - passed, Ruff found no issues after import formatting.
  • make typecheck - passed, compileall completed across packages and services.
  • make test - passed, 246 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 OPC-UA read-only adapter foundation, 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

  • Implement explicit tag/source mapping lookup so mapping_reference supplies site, line, asset, unit, and signal metadata instead of adapter defaults.
  • Add scheduling/runtime orchestration for adapter polling only after the connector runtime boundary is defined.
  • Keep browse-all-tags, writeback, source discovery, and UI ingestion controls out of this adapter until their 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 19388fa into main May 25, 2026
3 checks passed
@smithaldon1 smithaldon1 deleted the feat/issue-211-opcua-read-only-adapter branch May 25, 2026 15:16
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.

7. Feature: Add OPC-UA read-only adapter foundation

1 participant