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>
This was referenced Oct 22, 2026
This was referenced Oct 22, 2026
Closed
There was a problem hiding this comment.
🔵 Needs a closer look
get_event_log must use the response Position field to distinguish a valid entry with a missing or unreadable timestamp from an empty response.
No open issues 🎉
What changed in this PR
Adds read-only IDiagnostic support to the config client for retrieving trigger history, system logs, and module status information.
Changes:
- Implements diagnostic RPC models and
DiagnosticInterfacemethods. - Adds public
TriggerTypeandSysLogTypeenums. - Adds parsing tests and a diagnostic-dumping example.
| File | Description |
|---|---|
tests/config_client/test_diagnostic.py |
Tests diagnostic RPC requests, parsing, empty responses, master addressing, and unreadable fields. |
src/aiovantage/config_client.py |
Exports the diagnostic interface, result models, and log-type enums. |
src/aiovantage/_log_types.py |
Defines trigger and system-log type enums. |
src/aiovantage/_config_client/interfaces/diagnostic.py |
Implements diagnostic response models and read-only RPC methods. |
examples/config_client/dump_diagnostics.py |
Demonstrates reading and displaying diagnostic data. |
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
When a button press doesn't do what was expected, or a module drops off its bus, the place to find out why is InFusion Diagnostics: its History view shows which object started which task, and its Log view shows the controller's warnings and module offline/online messages. Neither is reachable from aiovantage today.
This adds the read-only side of the
IDiagnosticACI interface that those views use.This is the first of three PRs split from #404, as asked. The live trigger log and the live system log follow as their own PRs, stacked on this one, since they reuse its log type enums.
How it is implemented
DiagnosticInterface(config client) wraps four read-onlyIDiagnosticmethods:get_event_logreturns the trigger history: which object (button, timer, sensor, module) started which task, and how.get_event_log_nextreturns one history entry by position.get_sys_logreturns the system log.get_modulesreturns the modules answering on an enclosure's bus, with their status bytes and error counts.Each takes
master=, like the other interfaces.TriggerTypeandSysLogTypeenums name the trigger and log type codes. They live in their own module, so the live event types in the follow-up PRs don't depend on the config client. Both are exported fromaiovantage.config_client.Example:
examples/config_client/dump_diagnostics.py.Protocol notes
Verified against an IC-II controller on 4.11 firmware:
GetEventLogandGetSysLoganswer only when an empty<call/>element is sent. A bare<GetEventLog/>gets no reply.<call>N</call>element.GetEventLogNext(n)returns entrynwithPositionset to the next position, or-1on the last entry, and an empty<return/>past the end. How many entries the controller keeps, and what it drops once full, isn't known, so the docstring says to check timestamps rather than rely on positions alone.0xA004from the module, with what looks like the feed number in param1.TriggerType.MODULE_ALERTis marked as observed rather than documented.EventLogEntrykeeps them as text and itstimestampproperty returns a naive datetime. The registered converter would otherwise mark them UTC.How it was tested
IDiagnosticcall, including empty replies, addressing another master, and unreadable fields.pytest,ruff check,ruff format --checkandpyrightpass.Home Assistant
A companion change to home-assistant-vantage uses these calls for trigger history, system log and module status actions, and per-module connectivity sensors. It will follow as focused PRs once an aiovantage release carrying these changes is available to pin.
🤖 Generated with Claude Code