Koenkk / zigbee-herdsman-converters

Collection of device converters to be used with zigbee-herdsman
MIT License
917 stars 3.04k forks source link

Proposal: Don't enable legacy mode by default #7076

Closed klada closed 8 months ago

klada commented 8 months ago

For quite some time now there have been a few converters out there which create a so-called "legacy payload" (see src/lib/legacy.ts).

Even new installs have to deal with those legacy payloads. We have the option to disable legacy per device to get "non-legacy" payloads. According to the description of the legacy exposes definition it's even recommended to set legacy to false (see this):

| Set to false to disable the legacy integration (highly recommended)

Now the question is: if it's highly recommended to disable the legacy integration, why is it still active by default? Maybe the time has finally come to change the default value of legacy from true to false.

Pro arguments:

Con arguments:

Koenkk commented 8 months ago

Its already disabled by default for new installs

klada commented 8 months ago

@Koenkk I think you are referring to this commit in zigbee2mqtt, right?

There is one issue with this. If legacy is not set (neither to true nor to false) then zigbee-herdsman-converters assumes legacy=true. This is what I am referring to.

The thing is that other tools such as ioBroker are using zigbee-herdsman-converters as well and will keep using the legacy converters forever if the defaults in zigbee-herdsman-converters don't change. I'll ask if they can disable legacy mode in their environment as well to work around an issue they are having with the Busch-Jaeger devices.

But nevertheless any tool relying on the converters will need to explicitly do this. Maybe it's still a consideration to change the default at some point.

lattice0 commented 8 months ago

Sorry but what is legacy option?

Koenkk commented 8 months ago

@klada the default will not be changed, instead the legacy converters will be removed at a certain point. But this is a breaking change so not soon.

klada commented 8 months ago

@klada the default will not be changed, instead the legacy converters will be removed at a certain point. But this is a breaking change so not soon.

Thanks for the clarification. I'll close this issue then and forward the info to the ioBroker developers.