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

[Feature request]: add genBinaryInput/genBinaryOutput clusters to auto generator #23708

Closed
tomaszduda23 opened this issue Aug 22, 2024 · 4 comments
Labels
feature request Feature request

Comments

@tomaszduda23
Copy link

Is your feature request related to a problem? Please describe

esphome/esphome#7340 adds zigbee support to esphome on nrf52840. genBinaryInput/genBinaryOutput clusters were implemented in hope that it would be discovered by zigbee2mqtt automatically. Documentation mentions By default, the external definition will use modern extends. This is done by mapping them to exposed Zigbee clusters. But this approach only works well when devices implement the Zigbee ZCL specification. When I try with my implementation it render

const {deviceEndpoints, identify} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['v1'],
    model: 'v1',
    vendor: 'esphome',
    description: 'Automatically generated definition',
    extend: [deviceEndpoints({"endpoints":{"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8}}), identify()],
    meta: {"multiEndpoint":true},
};

module.exports = definition;

Describe the solution you'd like

add genBinaryInput/genBinaryOutput to https://github.com/Koenkk/zigbee-herdsman-converters/blob/5a3af85dd57a008fab09134207d403d5745bd34c/src/lib/generateDefinition.ts#L198

Describe alternatives you've considered

I already implemented my own convert. It would be nice to support it out of the box since it is part of ZCL.

Additional context

genBinaryInput/genBinaryOutput has description which is not supported by genOnOff. For esphome descripton for clusters allow to correct name entities in home assistant.

@tomaszduda23 tomaszduda23 added the feature request Feature request label Aug 22, 2024
@Koenkk
Copy link
Owner

Koenkk commented Aug 24, 2024

Would you mind making a PR to add support for this in generateDefinition.ts?

@tomaszduda23
Copy link
Author

When I use genOnOff it is shown as switch in UI without any external converter. Is done by generateDefinition.ts?

@Koenkk
Copy link
Owner

Koenkk commented Aug 25, 2024

Yes, that is automatically generated

@tomaszduda23
Copy link
Author

It works with 1.40. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
Development

No branches or pull requests

2 participants