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>
This was referenced Oct 22, 2026
This was referenced Oct 22, 2026
Closed
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes have no unresolved blocking issues, and all approval assessments indicate readiness.
No open issues 🎉
What changed in this PR
Adds live trigger notifications from the controller’s EVENT enhanced log, alongside diagnostic history APIs and safeguards for unrelated enhanced-log messages.
Changes:
- Adds
TriggerReceivedparsing andEventStream.subscribe_triggerswith reference counting and reconnect support. - Adds diagnostic models, interfaces, enums, tests, and examples.
- Filters non-object-status enhanced-log lines before controller status handling.
| File | Description |
|---|---|
tests/controllers/test_base.py |
Tests filtering non-status enhanced-log messages. |
tests/config_client/test_diagnostic.py |
Tests diagnostic RPC parsing and edge cases. |
tests/command_client/test_events.py |
Tests trigger parsing, subscription, and reference counting. |
src/aiovantage/events.py |
Defines the TriggerReceived event model and parser. |
src/aiovantage/config_client.py |
Exports diagnostic interfaces, models, and log enums. |
src/aiovantage/_log_types.py |
Defines trigger and system log type enums. |
src/aiovantage/_controllers/base.py |
Ignores enhanced-log lines that are not object status messages. |
src/aiovantage/_config_client/interfaces/diagnostic.py |
Implements diagnostic models and RPC wrappers. |
src/aiovantage/_command_client/events.py |
Adds the trigger log subscription API. |
examples/config_client/dump_diagnostics.py |
Demonstrates reading diagnostic information. |
examples/command_client/monitor_triggers.py |
Demonstrates live trigger 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' History view shows which object started which task, eg. which button press ran a scene. The IDiagnostic PR adds reading that history. This adds the live version, from the Host Command
EVENTenhanced log, so an integration can react to a trigger as it happens rather than polling the history.This is the second of three PRs split from #404, as asked.
How it is implemented
EventStream.subscribe_triggerssubscribes to theEVENTenhanced log and passes each trigger line to the callback as aTriggerReceived, with its source, destination, event code and parameters.trigger_typenames the code withTriggerType. It is built onsubscribe_enhanced_log, so peers, reference counting and resubscribing after a reconnect work as they already do.Interface.Method, so each parser matches only its own shape.100raises during unpacking and stops the event stream.examples/command_client/monitor_triggers.py.Protocol notes
Verified against an IC-II controller on 4.11 firmware:
EVENTlines are<source> <destination> <event> <param1> <param2>. A press, a double press (param1 = 2) and a hold were captured live and matched the trigger history one to one.0xA004from the module, with what looks like the feed number in param1.ELENABLE EVENT ON, which stays on after the client disconnects, the same as the existing enhanced log subscriptions.How it was tested
pytest,ruff check,ruff format --checkandpyrightpass.0xA004trigger.Home Assistant
A companion change to home-assistant-vantage fires a
vantage_triggerevent from this subscription. It will follow once an aiovantage release carrying these changes is available to pin.🤖 Generated with Claude Code