Skip to content

Audio support, phase 1: claim and capture Audio (205) and Media Transport (192) lines - #181

Merged
cursor[bot] merged 4 commits into
masterfrom
dougrathbone/audio-event-capture-c063
Nov 21, 2026
Merged

cursor[bot] merged 4 commits into
masterfrom
dougrathbone/audio-event-capture-c063

Conversation

@dougrathbone

@dougrathbone dougrathbone commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

First step of audio support for #172, released as 1.40.6. This change decodes nothing and adds no Home Assistant entities. It makes the traffic visible so the decoder can be built from real captures instead of guesses.

Problem

Audio (205) and Media Transport (192) event lines have a two-segment address (//PROJ/254/205, no group). Before this change:

  • CBusEvent fails on every one and logs "Could not parse event line".
  • The #/#s#-prefixed form is dropped as a comment.
  • cbus_raw_event_log_apps cannot capture them, because capture requires a net/app/group triple. A tester has no way to produce the data a decoder needs.

Changes

  • rawEventCapture: fall back to a net/app pair when a line has no group. Published to cbus/read/{net}/{app}/raw.
  • AudioEventHandler: claims audio and mediatransport lines (including #/#s#/#e# prefixes), routes them to raw capture, and logs one INFO hint per application on how to capture.
  • docs/AUDIO_INVESTIGATION.md: what the C-Gate manual gives us, what is unknown, tester capture steps, and the plan.
  • Option docs and schema description mention the group-less topic.

Why no decoder yet

The manual lists command names and argument ranges but not what the zone function code means (volume?), how feed numbers map to source names, or which events a real amp emits. A guessed decoder is the failure mode the HVAC work hit. Unknown semantics fail closed.

Finding for the issue

Home Assistant's MQTT integration has no media_player discovery platform, so the "media players" request cannot be met through MQTT Discovery. The investigation doc proposes switch/select/number/button entities once the protocol is confirmed.

Testing

  • npm test (3436 passing), npm run lint, npm run typecheck, validate:translations, validate:addon-config, validate:changelog.
  • New bridge tests fail if the handler is not wired in.
Open in Web Open in Cursor 

Capture only matched a network/application/group triple. Clock, Audio
and Media Transport address the application itself, so their lines
(for example "audio mute //BOARD/254/205 1 2 7") never matched and
cbus_raw_event_log_apps captured nothing for them. Fall back to the
network/application pair and publish to cbus/read/{net}/{app}/raw.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
Audio (205) and Media Transport (192) lines have a two-segment address,
so CBusEvent warned "Could not parse event line" for every one, and the
#-prefixed form was dropped as a comment before capture could see it.

Claim both in a small handler that routes them to raw capture and logs a
single INFO hint on how to capture. Nothing is decoded: the manual does
not say what the zone function codes mean and there are no real captures
yet, so a decoder would be a guess.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
Records what the C-Gate manual says about Audio and Media Transport,
what is still unknown, and how a tester captures the traffic. Also notes
that Home Assistant has no MQTT media_player platform, which shapes what
the issue's "media players" request can become.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
Audio and Media Transport lines are captured instead of rejected as
unreadable, so a tester can record real traffic for the decoder.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
@cursor
cursor Bot merged commit 6343a62 into master Nov 21, 2026
27 checks passed
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.

1 participant