zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Removed hue lamp doesn't stay removed

Open hvxl opened this issue 7 years ago • 9 comments

Bug Report

What happened

I removed a hue lamp. Within a few seconds it is automatically reconnected again.

What did you expect to happen

Once removed, a device should stay removed until explicitly rejoining it again.

How to reproduce it (minimal and precise)

Issue a zigbee2mqtt/bridge/config/remove message for a hue lamp. Then observe the log and see that it is successfully removed, but then automatically connected again. Note: This is with permit_join set to false. I don't know if this problem is limited to hue lamps, but that's all the zigbee devices I have at the moment.

Debug Info

zigbee2mqtt version:1.6.0 CC253X firmware version:20190425

Debug log showing the issue: log.txt

hvxl avatar Sep 20 '19 10:09 hvxl

Hi this happened because the end-device as self ones doesn't reset their connectivity states. The result of this would be that Z2M removed them from their side but if you wouldn't allow a join back the workaround would be to blacklist them.

tb-killa avatar Sep 22 '19 12:09 tb-killa

Same issue here with an IKEA switch, device is added back within seconds after being removed: rem-add.txt

gdave321 avatar Sep 24 '19 08:09 gdave321

I cannot reproduce this on the dev branch. Can you try this?

As also mentioned in the OP, make sure that permit_join: false, otherwise I see that the Hue bulb immediately rejoins indeed.

Koenkk avatar Sep 25 '19 23:09 Koenkk

@Koenkk tried the dev branch, but could get it to startup, looks I hit issue #1956 (and yes, permit_join is set to false)

gdave321 avatar Sep 26 '19 14:09 gdave321

Multiple issues are mentioned there. In case you have the Error: Cannot find module 'zigbee-herdsman/dist/deprecated/ziee' issue, see https://github.com/Koenkk/zigbee2mqtt/issues/1892#issuecomment-527837064.

Koenkk avatar Sep 27 '19 20:09 Koenkk

Ok, got the dev branch to run, not entirely sure what was wrong but re-installed the modules and got it to successfully run. However, had some difficulties to get a light to join in order to test the subsequent remove. Noticed a lot of device reporting issues and timeouts, so blame that for these joining troubles. As I needed my lights again I went back to release branch. Will re-test once the reporting issues are settled.

error 2019-09-28T09:28:57: Failed to setup reporting for '0x0017880110453b2e' - Error: Timeout - 26339 - 11 - 13 - 7 after 10000ms at Timeout.object.timer.setTimeout [as _onTimeout] (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/utils/waitress.js:44:24) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10)

gdave321 avatar Sep 28 '19 10:09 gdave321

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 27 '19 11:11 stale[bot]

Considering the troubles reported by gdave123, I was a bit hesitant to try the dev branch. But I have now tried with zigbee2mqtt version 1.7.1 and can confirm that a removed device no longer immediately rejoins. (I do also see the "Failed to setup reporting" errors.)

hvxl avatar Nov 29 '19 14:11 hvxl

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 28 '20 15:01 stale[bot]