Skip to content

API to subscribe to multicast groups - #737

Open
puddly wants to merge 4 commits into
zigpy:devfrom
puddly:puddly/zigpy-multicast-api
Open

API to subscribe to multicast groups#737
puddly wants to merge 4 commits into
zigpy:devfrom
puddly:puddly/zigpy-multicast-api

Conversation

@puddly

@puddly puddly commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Implements zigpy/zigpy#1864. CI will fail until a new version of zigpy is released.

Copilot AI review requested due to automatic review settings July 27, 2026 16:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for zigpy’s new coordinator multicast group subscription APIs by wiring bellows’ multicast table controller into the ControllerApplication hooks, and updating tests/dependencies accordingly.

Changes:

  • Implement _subscribe_to_multicast_group() / _unsubscribe_from_multicast_group() in bellows.zigbee.application.ControllerApplication.
  • Add application-level tests covering subscribe/unsubscribe behavior with and without XNCP extensions.
  • Update multicast table “missing entry” logging and bump the zigpy minimum version.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
bellows/zigbee/application.py Adds multicast subscribe/unsubscribe hook implementations that delegate to bellows.multicast.Multicast when enabled.
bellows/multicast.py Lowers log severity when unsubscribing a group that is not in the multicast table.
tests/test_application.py Adds tests for the new multicast group subscription APIs under different firmware feature sets.
pyproject.toml Raises the minimum zigpy dependency version to pick up the new APIs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_application.py
Comment on lines +2689 to +2691
async def test_multicast_group_subscription(app: ControllerApplication) -> None:
"""Test multicast group subscription APIs when there are no XNCP extensions."""
app._ezsp._xncp_features = FirmwareFeatures.NONE
Comment thread tests/test_application.py
Comment on lines +2717 to +2725
async def test_multicast_group_subscription_xncp(app: ControllerApplication) -> None:
"""Test multicast group subscription APIs when XNCP extensions are available."""
app._ezsp._xncp_features |= FirmwareFeatures.MEMBER_OF_ALL_GROUPS

# Subscribe to a group (no-op)
await app.subscribe_to_multicast_group(0x1234)

# Unsubscribe from a group (no-op)
await app.unsubscribe_from_multicast_group(0x1234)
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