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

Extend genBasic support #1282

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Extend genBasic support #1282

merged 1 commit into from
Jan 2, 2025

Conversation

kennylevinsen
Copy link
Contributor

Currently fails on coverage as we do not have any tests with frames containing productCode, productLabel or productUrl so the setters do not get exercised. The latter is quite common though.

@Nerivec
Copy link
Collaborator

Nerivec commented Dec 31, 2024

We should limit this to update cluster.ts only (the missing properties) for reference.
There is no use case for any of these properties, and most manufacturers don't set them at all (or worse, set to long null strings). They would bloat database/payloads for no reason.

@kennylevinsen
Copy link
Contributor Author

kennylevinsen commented Dec 31, 2024

Why would unused properties bloat the database? It would be undefined and therefore not written, so it doesn't seem like something that we need to worry about.

Generic device type and product URL are generally set, but indeed I have (sadly) yet to see e.g., productCode.

@Nerivec
Copy link
Collaborator

Nerivec commented Dec 31, 2024

It would be undefined

In cases where the fields are filled with dummy/null characters that would not be the case, and could represent long useless strings of data. In cases where the fields are left to the firmware builder's defaults by the manufacturer, some values could be all wrong on top of it. Additionally, URLs could become (or already be) defunct, not to mention could since have been hijacked, etc., so, providing them to the end-user is a non-starter (I'm not even sure why the ZigBee spec bothered with these... 😕).

More importantly, they just have no use (they bring no actual value and are rarely even set -properly-), but they add code to maintain/cover with tests/be executed.

@kennylevinsen kennylevinsen force-pushed the genbasic branch 2 times, most recently from 93bd2fa to c62e220 Compare January 2, 2025 00:26
@kennylevinsen
Copy link
Contributor Author

I don't agree that the fields don't have value, but I do agree that when the fields are rarely if ever set that the gain is minimal and as such not something I plan on spending a whole lot of energy defending nor something I feel like crafting packets for. :)

I'll leave it at the cluster changes so that users at least get access to the attributes in the dev console.

This adds the following fields to the cluster:

- genericDeviceType
- productCode
- productUrl
- manufacturerVersionDetails
- productLabel
@Koenkk Koenkk merged commit 4cc23fc into Koenkk:master Jan 2, 2025
1 check passed
@Koenkk
Copy link
Owner

Koenkk commented Jan 2, 2025

Thanks!

@kennylevinsen kennylevinsen deleted the genbasic branch January 2, 2025 13:14
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.

3 participants