Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Extend support for custom zigbee frames with zcl_command #8867

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

chrivers
Copy link
Contributor

The existing implementation is almost a generic "send zigbee frame" function, but falls short.

Notably, it:

  • Does not allow specifying a Zcl.FrameType value
  • Does not allow suppressing normal ACK reporting
  • Does not allow disabling log output in z2m

When working on implementing support for complicated Zigbee devices (Philips Hue, for instance), these limitations hit hard.

This reasonably simple change makes the zcl_command significantly more powerful, and should be fully backwards-compatible.

The one possible exception is that the logging default is reversed. I'm testing devices that need to stream at a rate of 10-60 packets/sec, so being able to disable the log is actually a critical feature, surprisingly.

chrivers added a commit to chrivers/zigbee-herdsman that referenced this pull request Feb 22, 2025
The Philips Hue ecosystem uses cluster 0xFC01 for "entertainment mode"
packets. This is a manufacturer-specific extension, that allows high-frequency
updates (tested up to 90 *per second*, but typically 10-50) for up to 10 lights.

Unfortunately, `manuSpecificLegrandDevices` already "owns" 0xFC01, making it
impossible to send the required commands to make this work, even with the
necessary patch to enable full control in `zcl_command`:

  Koenkk/zigbee-herdsman-converters#8867

With this change, the `.cluster` field in `zcl_command` can be specified as
`manuSpecificPhilips3`, and will be correctly identified by zigbee-herdsman.

These changes (this PR and the one mentioned above) is sufficient to allow
Entertainment Mode control over Zigbee2MQTT!

The upcoming beta version of [Bifrost](https://github.com/chrivers/bifrost) will
have rudimentary support for this.
chrivers added a commit to chrivers/zigbee-herdsman that referenced this pull request Feb 22, 2025
The Philips Hue ecosystem uses cluster 0xFC01 for "entertainment mode"
packets. This is a manufacturer-specific extension, that allows high-frequency
updates (tested up to 90 *per second*, but typically 10-50) for up to 10 lights.

Unfortunately, `manuSpecificLegrandDevices` already "owns" 0xFC01, making it
impossible to send the required commands to make this work, even with the
necessary patch to enable full control in `zcl_command`:

  Koenkk/zigbee-herdsman-converters#8867

With this change, the `.cluster` field in `zcl_command` can be specified as
`manuSpecificPhilips3`, and will be correctly identified by zigbee-herdsman.

These changes (this PR and the one mentioned above) is sufficient to allow
Entertainment Mode control over Zigbee2MQTT!

The upcoming beta version of [Bifrost](https://github.com/chrivers/bifrost) will
have rudimentary support for this.
@chrivers
Copy link
Contributor Author

The motivation for this PR is to make it possible to run Hue Entertainment Mode over z2m.

See also: Koenkk/zigbee-herdsman#1322

@chrivers
Copy link
Contributor Author

Oh, and if the new default for whether logging is enabled is too controversial, we can of course flip it back.

But it's very important for my use case that it can be disabled.

@chrivers
Copy link
Contributor Author

You got it - one moment :)

…oint.

The existing implementation is almost a generic "send zigbee frame" function,
but falls short.

Notably, it:

 - Does not allow specifying a Zcl.FrameType value
 - Does not allow suppressing normal ACK reporting
 - Does not allow disabling log output in z2m

When working on implementing support for complicated Zigbee devices (Philips
Hue, for instance), these limitations hit hard.

This reasonably simple change makes the `zcl_command` significantly more
powerful.
@chrivers chrivers force-pushed the chrivers/zcl-raw-command branch from 6786e15 to ed26385 Compare February 22, 2025 16:38
@chrivers
Copy link
Contributor Author

Ready for another look - let me know if you'd like anything else fixed :)

@Koenkk Koenkk merged commit 8dc1719 into Koenkk:master Feb 22, 2025
3 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Feb 22, 2025

Thanks!

@chrivers chrivers deleted the chrivers/zcl-raw-command branch February 22, 2025 19:29
chrivers added a commit to chrivers/zigbee-herdsman that referenced this pull request Feb 22, 2025
The Philips Hue ecosystem uses cluster 0xFC01 for "entertainment mode"
packets. This is a manufacturer-specific extension, that allows high-frequency
updates (tested up to 90 *per second*, but typically 10-50) for up to 10 lights.

Unfortunately, `manuSpecificLegrandDevices` already "owns" 0xFC01, making it
impossible to send the required commands to make this work, even with the
necessary patch to enable full control in `zcl_command`:

  Koenkk/zigbee-herdsman-converters#8867

With this change, the `.cluster` field in `zcl_command` can be specified as
`manuSpecificPhilips3`, and will be correctly identified by zigbee-herdsman.

These changes (this PR and the one mentioned above) is sufficient to allow
Entertainment Mode control over Zigbee2MQTT!

The upcoming beta version of [Bifrost](https://github.com/chrivers/bifrost) will
have rudimentary support for this.
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