Skip to content

Chime Device Type#577

Open
lboue wants to merge 15 commits into
Luligu:devfrom
lboue:Chime-Device-Type
Open

Chime Device Type#577
lboue wants to merge 15 commits into
Luligu:devfrom
lboue:Chime-Device-Type

Conversation

@lboue

@lboue lboue commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds support for the Matter Chime device type / cluster, allowing plugins to expose devices (e.g. doorbells, alert devices) that can play a selected or requested chime sound.

  • Add MatterbridgeChimeServer behavior (packages/core/src/behaviors/chimeServer.ts), extending ChimeServer, which handles the playChimeSound command: resolves the chime ID from the request or falls back to selectedChime, forwards the command to the Matterbridge command handler, logs the action, and emits the chimeStartedPlaying event.
  • Add MatterbridgeEndpoint.createDefaultChimeClusterServer(...) helper to create a default Chime cluster server with configurable installedChimeSounds, selectedChime, and enabled state.
  • Wire up the chime device type in addClusterServers() so it is created automatically via addRequiredClusterServers().
  • Extend MatterbridgeEndpointCommandHandler with the playChimeSound command handler type/entry (Chime.playChimeSound).
  • Export MatterbridgeChimeServer from packages/core/src/behaviors/export.ts.
  • Add vitest coverage:
    • createDefaultChimeClusterServer default-attributes test in matterbridgeEndpoint-default.test.ts.
    • Chime device creation, registration on the server node, and playChimeSound command invocation in matterbridgeEndpoint-matterjs.test.ts.

Test plan

  • npm run build (tsgo) passes with no type errors.
  • npm run lint no longer reports the chimeServer.ts warning.
  • New vitest cases cover default Chime cluster attributes and the playChimeSound command flow (request with/without chimeId, log output, chimeStartedPlaying event).

@lboue lboue changed the base branch from main to dev July 6, 2026 19:42
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@lboue lboue marked this pull request as ready for review July 9, 2026 18:33
@lboue lboue requested a review from Luligu July 9, 2026 18:44
@Luligu Luligu deleted the branch Luligu:dev July 10, 2026 19:45
@Luligu Luligu closed this Jul 10, 2026
@Luligu Luligu reopened this Jul 10, 2026
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.

2 participants