-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
permit_join false not honored #538
Comments
Hi this "strange" restrained construct return if the device themselve doesn´t remove sucessfully from the network. |
So, to rephrase what you're saying, the "correct" way to remove a device is to first reset the device and THEN perform the remove function? |
I`m just here with a Hue motion sensor Even when first reset:
Some devices are very.. Presistant |
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. |
Hi, I had the same problem with Aqara LED bulbs (routers). Done on Zigbee2mqtt 1.2.1 + CC2531 coordinator with firmware version 20190223 |
I would like to re-open this. I've experienced similar issues as described above. Today I was playing with a Xiaomi temperature sensor and a Gledopto LED controller. Moreover, one of the devices (Xiaomi sensor) has never been paired with my zigbee2mqtt setup before (it is a brand new sensor) and the very first time I tried to pair it the config option permit_join was set to false (the log file also showed this: "PM Zigbee: disabling joining new devices." during zigbee2mqtt startup. So in my case, the permit_join setting is definitely not honored (using dev branch, updated today).
|
Please let me know if I can help and troubleshoot / debug this in any way. It is really annoying for me now since I am running Philips Hue bridge as well as zigbee2mqtt at the same time and it is impossible for me to pair any of my (brand new) Hue devices with the Hue bridge. zigbee2mqtt almost instantly "intercepts" all fresh devices before I am able to detect them with Hue bridge. I have to shutdown my Raspberry Pi every time I need to pair a device with the Hue bridge, even though the |
@uncle-fed I expect this should be improved with the latest dev branch, be sure that the device you don't want to join isn't in the |
I'm afraid there is no improvement on my side. Just pulled the latest updates in the dev branch and here is what I get:
now (re)starting zigbee2mqtt with
Now plugging in new Zigbee device (Osram Smart+ Wall Plug) and resetting it so it goes into pairing mode:
Now repeating the commands above:
So basically, same as before, the device joins immediately, even though it was never present neither in configuration.yaml nor in the database.db. |
@uncle-fed I've added some extra logging, can you up to the latest dev branch and make sure that |
I repeated the test above exactly same way (making sure that 0x7cb03eaa00a3c718 was not in the /opt/zigbee2mqtt/data/database.db). I saw the following message that you added to the debug output:
Hmm... |
There must be some flaw in the logic that handles the 'incoming device' messages.
this message is much earlier than the
So it seems that the check is done too late ?? |
@uncle-fed this is expected, can you try to ban the device: http://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#zigbee2mqttbridgeconfigban |
executed the following:
this got added to
restarted zigbee2mqtt and the checked that database.db did not contain any references to 0x7cb03eaa00a3c718. additionally completely powercycled Raspberry Pi and reset the Osram plug while Raspberry Pi was down. Here is the debug log when turning on Osram plug and entering pairing mode.
|
Can you check again with the latest dev branch? |
I went and started completely from scratch with 0 byte
Started zigbee2mqtt and saw this in the log:
At this time, the Then I turned on the Osram Smart+ Plug and put it into pairing mode. Here is what the log file showed immediately:
After that, the contents of the
The So, it looked like the device was STILL added to both What is worse, the process did not stop at this point because the latest changes modified some logic. Now, the device is not really joined the Zigbee network (at least at some level) and retries every 15 seconds to do this. The log file grows with exactly same block of messages as above and the |
@uncle-fed this may actually be fixed by Z-Stack 3, please see #1445 |
Thank you for the info. I was hoping that this rather fundamental broken feature could be fixed in a stable firmware. I am enthusiastic about this project in general but at this stage I was hoping to build something simple and stable that just works without resorting to flashing experimental firmware. I hope that the fixes can be backported to the current stable firmware. After all, if you have to run more than 1 zigbee network, the issue becomes significant. Im not sure how this should work if you have neighbors in a building who also have a smart home system that is Zigbee based. It would be a total nightmare. |
If that firmware indeed fixes it, don't expect that changes can be backported. The firmware is not under my control and is maintained by Texas Instruments. Zigbee 3.0 has much better security policies compared to Zigbee 1.2 HA. |
How certain is it that the issue is in the firmware? Until now it looked like it was the nodejs code. Last experiment in the dev branch really changed the behavior although did not fix the issue. |
The firmware is responsible for letting devices join, which means that non of this logic should be in the nodejs code. Everything added there is basically a hacky workaround. |
I just cannot believe I am the only person suffering from this and/or having major concern about this behaviour. Permanently letting alien devices joining in would not only make it annoying when you are running more than 1 zigbee network yourself but would be completely nasty towards neighbours who would wonder why they cannot pair their newly bought smart lights with their bridge. Let alone security concerns of having random alien devices on your private network and having no control over it. As much as I love the idea of getting rid of all proprietary bridges and Chinese clouds it would then remain just a proof of concept until this fundamental feature is functioning correctly. So much work already went into supporting so many devices and what a nasty surprise suddenly. :-( So the NodeJS code sets some kind of flag in firmware? Can the firmware code be debugged somehow? |
I'm not sure if I understand you correctly, I thought it only happened with devices that you already had paired to your network. This of course doesn't (or shouldn't) happen with a factory fresh device which has never been in your network before. Is this the case? |
Please see my very first comment above: #538 (comment) Yes, it happened and continues to happen with brand new devies, freshly unpacked from the store, never paired before I would like to undestand something. Besides the configuration.yaml and database.db, does something somewhere (like firmware on a CC stick) keep another list of "known devices" that seems to be not controlled correctly via NodeJS code? |
The coordinator does not keep a list of connected devices, in fact, this responsibility lies in the devices (they know the network key/channel). I have the suspicion that some other device in your network allows joining of new devices (which does not honor |
Okay, I will do the following very soon (not today): |
@uncle-fed great! that sounds like a good test setup. |
I have successfully created new environment with Zigbee traffic sniffer in place and clean configuration. So far I cannot reproduce the issue any more with one brand new device (never paired before) and one older device that I reset. I am a bit at loss as to what was different before and will keep an eye on it when I start adding more devices. If I am able to reproduce it I'll report back again. Just as you suggested I also suspect some router-type device allowing unathorized joins but so far I am unable to figure out what device it is. For now we can close this issue as it seems that zigbee2mqtt (1.3.1) is performing OK. |
@uncle-fed thanks for posting the results here. good to hear it's working as expected now. |
Running Dev version...
When a device is removed (via MQTT), the device immediately pairs again and is allowed to do so despite permit_join being false. I've tested this through configuration file and by setting permit_join via MQTT.
The log shows "disabling joining new devices", so I know the message is being sent and received correctly. Then I remove the device and it immediately joins again. If I remove power from the device and then remove it from zigbee, of course, it doesn't re-pair. But, as soon as I put power to the device again, it pairs, despite permit_join still being false.
Device is a Model 74283 (Sylvania Lightify Dimmable Soft White A19 Bulb).
The text was updated successfully, but these errors were encountered: