Repository navigation
Conversation
Add DiagnosticInterface for the read-only IDiagnostic methods InFusion Diagnostics uses for its History and Log views: the trigger history, the system log, and the modules answering on an enclosure's bus. TriggerType and SysLogType name the trigger and log type codes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add EventStream.subscribe_triggers for the live EVENT enhanced log, which names the object that started each task, and have the controllers' enhanced log handler skip lines that are not object status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add EventStream.subscribe_system_log for the live SYSTEM enhanced log, which carries the controller's warnings and module offline and online messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 22, 2026
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes have no unresolved blocking issues.
No open issues 🎉
What changed in this PR
Adds diagnostic data access and live enhanced-log subscriptions for trigger and system events, including system-log notifications such as module offline/online messages.
Changes:
- Adds diagnostic RPC models and interfaces for event history, system logs, and module status.
- Adds trigger and system-log parsing and subscriptions with reconnect and reference-count support.
- Filters non-status enhanced-log entries from controller handling.
- Adds tests and monitoring examples.
| File | Description |
|---|---|
tests/controllers/test_base.py |
Verifies non-status enhanced-log entries are ignored while object status updates continue working. |
tests/config_client/test_diagnostic.py |
Tests diagnostic RPC parsing, addressing, empty results, and unreadable fields. |
tests/command_client/test_events.py |
Tests trigger/system-log parsing, subscriptions, and reference-count behavior. |
src/aiovantage/events.py |
Defines and parses trigger and system-log event payloads. |
src/aiovantage/config_client.py |
Exports diagnostic interfaces, models, and log-type enums. |
src/aiovantage/_log_types.py |
Defines trigger and system-log type enums. |
src/aiovantage/_controllers/base.py |
Filters non-object-status entries from enhanced-log handling. |
src/aiovantage/_config_client/interfaces/diagnostic.py |
Implements diagnostic XML models and RPC interface methods. |
src/aiovantage/_command_client/events.py |
Adds live trigger and system-log subscription APIs. |
examples/config_client/dump_diagnostics.py |
Demonstrates reading diagnostic history, logs, and module status. |
examples/command_client/monitor_triggers.py |
Demonstrates live trigger monitoring. |
examples/command_client/monitor_system_log.py |
Demonstrates live system-log monitoring. |
Review effort: Lite
This was referenced Oct 22, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
InFusion Diagnostics' Log view shows the controller's warnings and module offline/online messages. The IDiagnostic PR adds reading that log. This adds the live version, from the Host Command
SYSTEMenhanced log, so an integration can alert when a module goes offline as it happens.This is the third of three PRs split from #404, as asked.
How it is implemented
EventStream.subscribe_system_logsubscribes to theSYSTEMenhanced log and passes each system log line to the callback as aSystemLogReceived, with its type, source and message.log_typenames the type withSysLogType. It is built onsubscribe_enhanced_log, so peers, reference counting and resubscribing after a reconnect work as they already do.Interface.Method) don't match. The controllers' enhanced log handler already skips non-status lines, from the trigger log PR.examples/command_client/monitor_system_log.py.Protocol notes
Verified against an IC-II controller on 4.11 firmware:
SYSTEMlines are<type> <source> <message>, where the source is one word, eg.Controller.Module OfflineandModule Online.ELENABLE SYSTEM ON, which stays on after the client disconnects, the same as the existing enhanced log subscriptions.How it was tested
SYSTEMlog.pytest,ruff check,ruff format --checkandpyrightpass.Home Assistant
A companion change to home-assistant-vantage fires a
vantage_system_logevent from this subscription, and refreshes the module connectivity sensors on offline/online messages. It will follow once an aiovantage release carrying these changes is available to pin.🤖 Generated with Claude Code