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) Expose Custom Clusters in MQTT #22583

Merged
merged 5 commits into from
May 21, 2024
Merged

(feat) Expose Custom Clusters in MQTT #22583

merged 5 commits into from
May 21, 2024

Conversation

LaurentChardin
Copy link
Contributor

@LaurentChardin LaurentChardin commented May 10, 2024

The purpose of this change is to expose Custom Clusters to the frontend UI, with the target to enable attribute listing in the dev-console page. Actually dev-console is retrieving Clusters definitions directly from the zh package, which will not work for Custom Clusters.

In order to do so, i propose to extend the function getDefinitionPayload with the custom_clusters object, as part of the device information. This will be publish as usual in the MQTT bridge/devices topic.
This change is needed for nurikk/zigbee2mqtt-frontend#2001 which will provide the frontend updates for dev-console.

UPDATE: design changed during implementation. See the thread of comments or refer to documentation starting with 1.37.2

Copy link

@MoazzemHossain-bot MoazzemHossain-bot left a comment

Choose a reason for hiding this comment

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

Thanks

lib/extension/bridge.ts Outdated Show resolved Hide resolved
@LaurentChardin LaurentChardin marked this pull request as ready for review May 13, 2024 23:49
LaurentChardin added a commit to LaurentChardin/zigbee2mqtt-frontend that referenced this pull request May 16, 2024
- Supporting new topic `bridge/definitions`
  Introduced in Koenkk/zigbee2mqtt#22583
- Removing previously added files from `zigbee-herdsman`, but keeping
  the enum one
lib/extension/bridge.ts Outdated Show resolved Hide resolved
lib/model/device.ts Outdated Show resolved Hide resolved
test/bridge.test.js Outdated Show resolved Hide resolved
test/bridge.test.js Outdated Show resolved Hide resolved
LaurentChardin added a commit to LaurentChardin/zigbee2mqtt-frontend that referenced this pull request May 17, 2024
- Supporting new topic `bridge/definitions`
  Introduced in Koenkk/zigbee2mqtt#22583
- Removing previously added files from `zigbee-herdsman`, but keeping
  the enum one
lib/extension/bridge.ts Outdated Show resolved Hide resolved
lib/extension/bridge.ts Outdated Show resolved Hide resolved
lib/extension/bridge.ts Outdated Show resolved Hide resolved
lib/extension/bridge.ts Outdated Show resolved Hide resolved
@Koenkk
Copy link
Owner

Koenkk commented May 18, 2024

A few more this.publishDefinitions(); can be removed. Could you also make a PR for the docs?

Once that's done, this can be merged.

LaurentChardin and others added 5 commits May 20, 2024 17:53
- Introducing bridge/definitions
- Updating test case for custom clusters
- Updating new path after ZCL revamp with 0.47.0

This change is needed for nurikk/zigbee2mqtt-frontend#2001
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
LaurentChardin added a commit to LaurentChardin/zigbee2mqtt.io that referenced this pull request May 20, 2024
- New topic: `bridge/definitions`
- Related to Koenkk/zigbee2mqtt#22583
@LaurentChardin
Copy link
Contributor Author

A few more this.publishDefinitions(); can be removed. Could you also make a PR for the docs?

Once that's done, this can be merged.

@Koenkk I have updated the test cases and created a PR for the documentation.

LaurentChardin added a commit to LaurentChardin/zigbee2mqtt-frontend that referenced this pull request May 20, 2024
- Supporting new topic `bridge/definitions`
  Introduced in Koenkk/zigbee2mqtt#22583
- Removing previously added files from `zigbee-herdsman`, but keeping
  the enum one
Koenkk added a commit to Koenkk/zigbee2mqtt.io that referenced this pull request May 21, 2024
* Updating MQTT docs about the newly added topic

- New topic: `bridge/definitions`
- Related to Koenkk/zigbee2mqtt#22583

* Update mqtt_topics_and_messages.md

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@Koenkk Koenkk merged commit d484405 into Koenkk:dev May 21, 2024
11 checks passed
@Koenkk
Copy link
Owner

Koenkk commented May 21, 2024

Many thanks for this PR 😄

@Koenkk Koenkk mentioned this pull request May 21, 2024
Koenkk pushed a commit to nurikk/zigbee2mqtt-frontend that referenced this pull request May 24, 2024
* feat(attributePicker): support custom attributes (#2001)
- Update type definition to import Custom Clusters
- Remove zh and zhc dependencies
- Duplicate Cluster.ts file as this is becoming static
- Updating references in components

* fix(reporting): only display clusters declared by the device

* feat(customclusters): refactoring the mqtt topic

- Supporting new topic `bridge/definitions`
  Introduced in Koenkk/zigbee2mqtt#22583
- Removing previously added files from `zigbee-herdsman`, but keeping
  the enum one

* feat(customclusters): updating github build script

* feat(customclusters): fixing github action configuration

* feat(customerclusters): fix pretty

* feat(customclusters): fixing pnpm lock

* feat(customclusters): fixing test cases

* feat(customclusters): small revamp style

* feat(customclusters): adding codebeatignore file and exclude test files

* feat(customclusters): fixing ignore

* feat(customclusters): fixing ignore

* feat(customclusters): fixing pretty

---------

Co-authored-by: Laurent Chardin <>
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