Skip to content

Conversation

SvenKirschbaum
Copy link
Contributor

This is a companion PR to 9468.

This PR exposes a new option, making it possible to override the profileId contained in the APS frame individually.
As zStack does not support changing the profileId directly, in case the profileId but no src endpoint is set, an endpoint with the correct profile is choosen automatically. If the requested profileId cannot be satisfied, an exception is thrown.

Please note, that i only own ember based adapters, so the changes to the other adapters are untested.

I have also added the following Shelly specific changes:

  • Added the manufacturer Code
  • Added a new endpoint with appprofid 0xc001
  • Added profile 0xc001 to the ezspIncomingMessageHandler filter

@SvenKirschbaum SvenKirschbaum force-pushed the feat-support-per-frame-profile-override branch from a0bc0fb to fe809d2 Compare June 6, 2025 04:25
@Koenkk Koenkk requested a review from Nerivec June 6, 2025 18:00
@Nerivec
Copy link
Collaborator

Nerivec commented Jun 6, 2025

We should add complete generic support and add the variables to group/broadcast too.
Not sure how these Shelly work, if they might need it or not, but at least it covers future needs (and keeps the API consistent).

- Move shelly profile id to an exported constant
- Skip sourceEndpointInfo logic in ember adapters if profileId parameter is present
- Skip dynamic endpoint selection if no profile id is given for zStack adapters
- Move endpoint selection into function to make it reusable for groups and broadcast for zStack adapters
@SvenKirschbaum
Copy link
Contributor Author

We should add complete generic support and add the variables to group/broadcast too. Not sure how these Shelly work, if they might need it or not, but at least it covers future needs (and keeps the API consistent).

Support for group and broadcast frames was added.

@SvenKirschbaum SvenKirschbaum requested review from Koenkk and Nerivec June 7, 2025 17:08
@SvenKirschbaum SvenKirschbaum force-pushed the feat-support-per-frame-profile-override branch from 787460e to 7bffe08 Compare June 8, 2025 09:33
@SvenKirschbaum SvenKirschbaum requested a review from Nerivec June 8, 2025 09:34
@SvenKirschbaum SvenKirschbaum requested a review from Koenkk June 9, 2025 08:38
@Nerivec
Copy link
Collaborator

Nerivec commented Jun 9, 2025

It's a little strange that ember and zoh tests are passing without changes. That new function parameter should require more coverage.

https://github.com/Koenkk/zigbee-herdsman/blob/master/test/adapter/ember/emberAdapter.test.ts#L2497-L3284

https://github.com/Koenkk/zigbee-herdsman/blob/master/test/adapter/zoh/zohAdapter.test.ts#L560-L810

@Hedda
Copy link
Contributor

Hedda commented Jun 23, 2025

@SvenKirschbaum Off-topic but if you are by any chance interested in also contributing support for this to Home Assistant's ZHA integration as well then please see this discussion in the zigpy/zha community:

@Koenkk Koenkk merged commit a369f61 into Koenkk:master Sep 2, 2025
1 check passed
@Koenkk
Copy link
Owner

Koenkk commented Sep 2, 2025

Sorry for taking so long to merge, thanks!

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.

4 participants