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

Unbiding from non-existing group fails #4901

Closed
docbobo opened this issue Nov 8, 2020 · 7 comments
Closed

Unbiding from non-existing group fails #4901

docbobo opened this issue Nov 8, 2020 · 7 comments
Labels
problem Something isn't working stale Stale issues

Comments

@docbobo
Copy link
Contributor

docbobo commented Nov 8, 2020

What happened

I bought an Ikea IKEA E1524/E1810 yesterday, which is pre-bound to a default group. In my case it was 901, I suspect this is the one Ikea uses for all its devices.

In order to control my devices, I needed to bind the to the remote. However, according to the Z2M documentation, I had to first unbind from the default group. But that did not work because group 901 did not exist on my system before.

The UI was showing group 901 as empty, but neither could I delete it over there nor could I unbind the device from the group. Instead, I had to first manually add it to the configuration.yaml.

What did you expect to happen

Unbinding the group & deleting it should work independent of whether it has an entry in configuration.yaml or not.

How to reproduce it (minimal and precise)

See above. I suspect creating a group, binding a device, then manually deleting the group from configuration.yaml will set up the system in a similar way. Didn't try to.

Debug info

Zigbee2MQTT version: 1.16.1
Adapter hardware: CC1352P-2
Adapter firmware version: 20201026

@docbobo docbobo added the problem Something isn't working label Nov 8, 2020
@Koenkk
Copy link
Owner

Koenkk commented Nov 8, 2020

Can you provide the debug log when unbinding from this group?

To enable debug logging set in configuration.yaml:

advanced:
  log_level: debug

@pierrepinon
Copy link

pierrepinon commented Nov 8, 2020

I have the same issue

Group 901 is created on UI without devices in :

Capture d’écran 2020-11-08 à 14 44 03

When i try to remove 901 group :
`debug 2020-11-08 13:46:00: Received MQTT message on 'zigbee2mqtt/bridge/request/group/remove' with data '901'

error 2020-11-08 13:46:00: Request 'zigbee2mqtt/bridge/request/group/remove' failed with error: 'message.trim is not a function'

info 2020-11-08 13:46:00: MQTT publish: topic 'zigbee2mqtt/bridge/response/group/remove', payload '{"data":{},"error":"message.trim is not a function","status":"error"}'`

@pedrolamas
Copy link
Contributor

pedrolamas commented Nov 10, 2020

@Koenkk I'm experiencing this right now with an IKEA E1743 switch!

image

image

image

Zigbee2MQTT:debug 2020-11-10 18:41:02: Received MQTT message on 'zigbee2mqtt/bridge/request/group/remove' with data '901'
Zigbee2MQTT:error 2020-11-10 18:41:02: Request 'zigbee2mqtt/bridge/request/group/remove' failed with error: 'message.trim is not a function'
Zigbee2MQTT:info  2020-11-10 18:41:02: MQTT publish: topic 'zigbee2mqtt/bridge/response/group/remove', payload '{"data":{},"error":"message.trim is not a function","status":"error"}'

Following this, I also tried using MQTT message "zigbee2mqtt/bridge/config/remove_group" with payload "901" but that also failed:

Zigbee2MQTT:debug 2020-11-10 18:53:20: Received MQTT message on 'zigbee2mqtt/bridge/config/remove_group' with data '901'
Zigbee2MQTT:error 2020-11-10 18:53:20: Failed to call 'BridgeLegacy' 'onMQTTMessage' (AssertionError [ERR_ASSERTION]: Group '901' does not exist
    at BridgeLegacy.removeGroup (/app/lib/extension/legacy/bridgeLegacy.js:277:9)
    at BridgeLegacy.onMQTTMessage (/app/lib/extension/legacy/bridgeLegacy.js:370:44)
    at Controller.callExtensionMethod (/app/lib/controller.js:378:44)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5))

@pedrolamas
Copy link
Contributor

After better reading this on the docs, I managed to solve my problem!

I still seem to not being able to fully "unbind" from the 901 group, but at least the button is usable inside the group I wanted!

image

@docbobo
Copy link
Contributor Author

docbobo commented Nov 11, 2020

When trying to unbind the device from a group that does not exist in the configuration.yaml - something definitely happening with the IKEA default of 901, I get

Zigbee2MQTT:info  2020-11-11 16:28:00: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/unbind', payload '{"data":{"from":"hue_dimmer_04/1","to":"4"},"error":"Target device or group '4' does not exist","status":"error"}'
Zigbee2MQTT:error 2020-11-11 16:28:00: Target device or group '4' does not exist

(I did try to reproduce this by first creating the group, the removing it from the yaml).

Trying to delete the group, results in

Zigbee2MQTT:error 2020-11-11 16:30:14: Request 'zigbee2mqtt/bridge/request/group/remove' failed with error: 'message.trim is not a function'

The group does show in the group list of the new UI though - that's how I triggered both unbind and delete.

@Koenkk
Copy link
Owner

Koenkk commented Nov 11, 2020

  • I've fixed the unbinding of this group, it will now appear as default_bind_group instead of 901.
  • This is a special group and cannot be removed. @nurikk I think we should now show this group in the group overview.

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

zombielinux added a commit to zombielinux/zigbee2mqtt that referenced this issue Nov 12, 2020
* Update zigbee2mqtt-frontend to 0.2.71 (Koenkk#4928)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update zigbee2mqtt-frontend to 0.2.72 (Koenkk#4932)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update zigbee2mqtt-frontend to 0.2.74 (Koenkk#4935)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix set/get with property including endpoint name having _ not working.

* Fix unbind for default_bind_group (901) not working from frontend. Koenkk#4901

* Update zigbee-herdsman to 0.13.28 (Koenkk#4946)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Expose `position` for compatible thermostats (Koenkk#4936)

This exposes an absolute position.

* Display manufacturer name for unsupported devices (Koenkk#4938)

* Display manufacturer name for unsupported devices

* fixup! Display manufacturer name for unsupported devices

* Fix state.json not pretty printed (Koenkk#4943)

* state.json format

Since 9774031 the state.json file is not formatted anymore, it's just 1 line.

* Update state.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>

* Update zigbee2mqtt-frontend to 0.2.75 (Koenkk#4953)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update zigbee2mqtt-frontend to 0.2.76 (Koenkk#4957)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update zigbee-herdsman to 0.13.29 (Koenkk#4955)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update zigbee2mqtt-frontend to 0.2.77 (Koenkk#4961)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update zigbee2mqtt-frontend to 0.2.78 (Koenkk#4962)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Co-authored-by: Kamil Trzciński <ayufan@ayufan.eu>
Co-authored-by: Drzony <drzony@gmail.com>
Co-authored-by: Nonsense112 <35377929+Nonsense112@users.noreply.github.com>
@github-actions
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working stale Stale issues
Projects
None yet
Development

No branches or pull requests

4 participants