zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

1.21.2 has breaking changes for Green Power devices (e.g. Philips Hue Tap)

Open davidjb opened this issue 5 years ago • 8 comments

What happened

On upgrading to v1.21.2, I've found the action values for Green Power devices have changed as a result of https://github.com/Koenkk/zigbee-herdsman-converters/pull/2980, meaning all automations won't work until they're updated to use the changed values.

The change was easy enough for make via find-and-replace, it was more that the breaking change was unexpected & I had to discover the problem and why and then figure out the mapping. For the Philips Hue Tap, the mapping is:

  • toggle → press_1
  • recall_scene_0 → press_2
  • recall_scene_1 → press_3
  • recall_scene_2 → press_4

What did you expect to happen

Changelog would ideally mention breaking changes and, if following SemVer, then the major version number should be increased.

How to reproduce it (minimal and precise)

Be using a previous version and update to >=1.21.2.

Debug info

Zigbee2MQTT version: 1.21.2

davidjb avatar Oct 06 '21 00:10 davidjb

Similar that 1.21.0 broke some functionality of the keypads https://github.com/Koenkk/zigbee2mqtt/issues/8630.

I also think that it should be more obvious when functionality is lost, maybe add another headline for the release updates - "Breaking changes".

rindlerblabla avatar Oct 06 '21 05:10 rindlerblabla

Changelog would ideally mention breaking changes and, if following SemVer, then the major version number should be increased.

You are totally right, this should indeed be marked as a breaking change however I completely missed this (mainly because it wasn't meant to be breaking in the first place, details: https://github.com/Koenkk/zigbee-herdsman-converters/pull/2885)

Koenkk avatar Oct 06 '21 06:10 Koenkk

No worries, thanks @Koenkk. I mostly opened this to make folks aware of the situation in case they experienced the same situation.

I really appreciate all your efforts -- and fwiw these underlying changes are really helpful. They makes the Tap switches more usable in z2m and easier to work with as the action values more logical/memorable.

davidjb avatar Oct 06 '21 06:10 davidjb

This should have been handled the same was as e.g. https://www.zigbee2mqtt.io/devices/WXKG01LM.html#deprecated-click-event (only enable this when legacy: false is set for this device). However adding this now would make another breaking change for the next release, I think doing nothing is the best option now.

Koenkk avatar Oct 06 '21 07:10 Koenkk

@Koenkk Sounds good 👍 Perhaps in the interim you could edit the release description for the current release (https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.21.2) and mention the known issue / breaking change? Linking to this issue (e.g. the mapping of values) would probably help others - assuming they're reading the release notes 😄

davidjb avatar Oct 06 '21 07:10 davidjb

@davidjb good point, added this.

Koenkk avatar Oct 06 '21 18:10 Koenkk

I have a Niko 91004 which I'm trying to create some automations for. But since it fires the same action for 'click' and 'hold' it's hard to distinguish. I've added an [issue] (https://github.com/xaviml/controllerx/issues/364) for adding support to ControllerX, which will also be hard if the same actions are fired. Apparently deCONZ fires different actions for click and hold. Also discussed here. Would it be possible to add different actions for click and hold to zigbee2mqtt?

kris10an avatar Oct 24 '21 13:10 kris10an

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Nov 24 '21 00:11 github-actions[bot]