-
-
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
[Problem]: After switching to CC2652 coordinator, my network works perfectly, but no device will pair with it. #10339
Comments
Hmm, i have recently switched to the CC2652 also but no problems at all with repairing some devices. Did you delete devices who exist in your network and try to add again? If its not a new device maybe exist the device just in your databse.db? |
Hello I switched from a zigate to a sonofff itead yesterday. No pairing issue with this firmware : 20210120 Antoine |
|
Yes
See https://www.zigbee2mqtt.io/devices/ICTC-G-1.html#pairing how to reset this device, when you hold it 10 seconds it will setup a new network with just the dimmer and the lamp |
My sincere apologies, but I am failing at providing a sniff. I've spent quite some time to get the CC2531 set up as the sniffer tool, but having no CC debugger and unable to find a way to flash it via USB as I did for the 2653 using the TI Flasher V2 software, I am a bit stuck. Is there any chance my backup file gave some hints? For your kind consideration, my z2m config as well:
There may have been a misunderstanding in that I was not trying to pair it this way. I know it's to be reset by pressing the button 4 times - https://www.zigbee2mqtt.io/devices/E1743.html (it's actually this IKEA dimmer/switch). All this said, I am still unable to explain why getting the IKEA button into it's direct pair mode would kick out a different brand device from the network, as seen above. When I fix pairing issues I'll play with this, but for the moment getting something to pair with my network is a priority. |
@convicte unfortunately I need a sniff to debug this further, one thing you can try is to pair the dimmer when holding it very close to the coordinator (to ensure it tries to pair via that) |
@Koenkk I had some issue myself recently to pair devices. I tried the new FW on my CC2652R and the pairing worked just fine form their place (not close to the coordinator). |
@Koenkk
Finally, I started looking for ways how to flash the sniffer with available hardware I had and found an old PI and instructions how to use it to flash a CC2532, which worked!! I now have a sniffer and managed to follow your instructions to grab a paring process via routers with an IKEA button listed above. My only concern is with posting it, hence it will contain network keys. Is there any way to share it with you securely? Thank you!! |
yes You can send the network key to me on telegram (@Koenkk) |
Thank you! I just texted you on Telegram with the key. Pairing attempt via router.zip Both files as requested! |
I've checked the coordinator sniff, somehow the joining device isn't doing an association request. But while checking your sniff I found another issue. It seems the coordinator is using a different epid than the rest of the network leading to pan conflicts. @castorw my first thought is that this is caused by the cc2531 returning the wrong epid (0xdddd..), during the migration we write the wrong epid into the cc2652, could that be the case here? |
Thank you! I've seen this conflict in the sniff but failed to recognise the significance. Just in case you are wondering I could run another sniff with a different device entirely, to see if it's also not sending out a pairing request. My apologies if these are trivial questions. |
@convicte can you check if the |
|
Perfect, I did half of that already, so just need to run into the attic to get the stick down, to reflash it. I'll update everyone ASAP. |
Quick update:
Let me guess, a sniff of pairing next to the coordinator and one via routers? ;) Cheers!! |
Can you provide a sniff when pairing a non battery powered device (something like a switch or light) via a router? |
Absolutely! Please see pairing attempts of the same lamp as listed above (Lidl Livarno). Pairing attempt via router for a floor lamp.zip Same passwords as yesterday. |
@convicte, This sounds a lot like my problem. I have a Slaesh's CC2652RB Coordinator and just updated to 20211217. i'm trying to pair my devices (ikea, Tuya and others) via a ikea router, since they are a bit far away from the coordinator. if i disable join in z2m and turn the device off and on. It will revert back to the light blinking join mode. unfortunately i haven't got any spare zigbee stick to sniff what is happening. |
I have exactly the same problem. Devices are not connected to the coordinator. |
Hmm similiar situation with my network - after flashing 20211217 on Ebyte CC2652P I have strange behaviour from couple of sonoff devices - temp humidity sensors, which were disconected from the network after flashing firmware.. I can re-pair them but after pairing they not reporting anything and finally disconectiong from network. However one of these devices - same model still works and reporting correctly - that was device which stayed connected after flashing. Other devices pair / report correctly. I don't know what happened and that behaviour is really strange. |
Hi |
The problem is more global and does not seem to be related to the adapter firmware. I'm still using сс2531 I flashed on the latest firmware Z-Stack_Home_1.2 20211115/20211116 got the same result it seems to work but I can not connect a new or remote old device. If the problem was only in the firmware, then rollback and the old version of Z-Stack_Home_1.2 20201127/20201128 would return everything back, but it does not happen, so the reason is in the version itself zigbee2mqtt |
@Fabiancrg, if you don't have a conflict, I would assume everything is fine, as long as all your devices are on the same EPID. @LCerebo I am glad the troubleshooting steps worked for you! |
@convicte All my issues were fixed when I applied your procedure and removed/paired all routers that were not in the coordinator_backup.json file. So I would like to help others and create a script that will scan three files:
The output will list all missing routers with the friendly name, those ones will need to be removed/paired again @Koenkk is there a way to force the generation of the coordinator_backup.json without restarting Z2M ? I think it will be better if the script can run without causing any downtime of Z2M. Any idea if the conflict EPID could be detected without snifing the Zigbee network ? |
Yes, all the routers that use the empty pan_id "dddddddddddddddd" aren't listed in the coordinator_backup.json. |
Sorry to sound like a broken record, but you have to follow the steps I outlined above. Review the routers needing to be repaired, starting from the one closest to the coordinator, and take it from there. In the meantime, please reflash the coordinator as indicated above. If you have any specific questions or concerns, please let us know. Hopefully someone will be able to help if I fail to do so. |
I can confirm that i had the same problem with the EPID. |
Edit: I did it again and now it sticks correctly.
Config:
Coordinator backup:
I did what @fuglphoenix did, but reflashing does nothing, extended_pan_id keeps being my coordinator ieee even if i change the backup and re-flash. |
Hello my "extended_pan_id": "dddddddddd", and not all end device are in the backup.
|
My story here. I could not pair new devices reliably, especially Ikea E1743 were failing. Some router devices behaved strange during joining; they removed them selves from the network after interview. My coordinator is Smartlight CC2652P, don't have original fw version info anymore but it was stock from manufacturer. I did EPID change to dddddddddddddddd with this guide #10339 (comment) That didn't seem to resolve any of my pairing issues. I then flashed dev version CC1352P2_CC2652P_other_coordinator_20220103 At least for now that seems to resolve my issues. I was able to pair those Ikea E1743 and all other devices seem to behave now correctly. This as an information to all others. |
@drogfild |
Thanks @convicte . In my case I had routers in the backup file before all this and they are there also afterwards. Haven't checked if all of my routers are there. Maybe I should check that. It might be that all jumps and hoops with EPID was not needed for me. And new FW alone would have done the needed corrections for me. But as I don't have a sniffer I'm not able to tell. It was wild guess and maybe it was correct or maybe it wasn't, but I'm happy now that everything seems to be working. There's pretty similar case about EPID with dddd.. at #9117 (comment) It would be really cool to have some other way to see EPID conflicts than sniffing them. But that's most probably a limitation of zigbee network structure. |
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 |
I have the same issue with the CC2652P. Everything pairs with it but not with any other router in my ZigBee network. I found the discussion here pretty confusing and I was hoping that someone who actually managed to fix the problem could wrap things up in a sort of step by step tutorial for us noobs. Thank you in advance. |
@mihaimdinca, if you have the same problem as I had, t's due to some router devices that are not know correctly by the coordinator. Copy the following code in Z2McheckDevices.py and execute it using python3 Z2McheckDevices.py
PS: you will have to install python with the json and yaml modules. |
Thank you very much. I'll give it a try in the following days.
…On Sun, Jul 10, 2022, 14:33 Fabian ***@***.***> wrote:
@mihaimdinca <https://github.com/mihaimdinca>, if you have the same
problem as I had, t's due to some router devices that are define correctly
in Z2M.
They might be working properly, e.g.: a bulb might be working but not
forwarding the messages to the coordinator.
You can try to remove and pair every router device one by one or look for
the one(s) not defined correctly.
For this, I did the python script bellow, you can execute it and it will
list the routers that you will need to remove and pair again.
Copy the following code in Z2McheckDevices.py and execute it using python3
Z2McheckDevices.py
import` json
import yaml
devices = {} # Dictionnary with all devices
missingRouters = {}
missingEndDevices = {}
additionalDevices = {}
backupfile = open('/opt/zigbee2mqtt/data/coordinator_backup.json',"r")
DBfile = open('/opt/zigbee2mqtt/data/database.db', 'r')
Lines = DBfile.readlines()
# Parse database.db to retrive all devices IEEE address and type define in Z2M
print('Parsing database.db file')
for line in Lines:
DBdata = json.loads(line)
if "ieeeAddr" in DBdata and "type" in DBdata:
if DBdata ["type"] != 'Coordinator':
devices[DBdata["ieeeAddr"]] = [DBdata ["type"], "", False]
#print(DBdata["ieeeAddr"] + " is a " + DBdata ["type"])
DBfile.close()
print('Parsing database.db file... Done')
# Parse coordinator_backup.json to retreive all IEEE present in coordinator
data = json.loads(backupfile.read())
for device in data['devices']:
dev = devices.get("0x" + device['ieee_address'])
if dev:
devices["0x" + device['ieee_address']][2] = True
else:
devices["0x" + device['ieee_address']]=["Unknown","", True]
backupfile.close()
print('Parsing backup file... Done')
# Retreive friendly name from configuration.yaml
configfile = open('/opt/zigbee2mqtt/data/configuration.yaml',"r")
configData = yaml.safe_load(configfile)
configDevices = configData["devices"]
for key,value in devices.items():
dev = configDevices.get(key)
if dev:
devices[key][1]=configDevices[key]["friendly_name"]
else:
devices[key][1]="Unknown"
#print (key , '-->', value)
configfile.close()
# Print summary
for key,value in devices.items():
if devices[key][0] == "Router" and not devices[key][2]:
missingRouters[key] = devices[key][1]
elif devices[key][0] == "EndDevice" and not devices[key][2]:
missingEndDevices[key] = devices[key][1]
if devices[key][0] == "Unknown":
additionalDevices[key] = devices[key][1]
if len(missingRouters) > 0:
print ("The following routers are not correctly set up, please remove them from Z2M config and execute the pairing operation again")
for key, value in missingRouters.items():
print ("\t" + key + " - " + value)
if len(missingEndDevices) > 0:
print ("Some end devices are missing too but you must first fix the routers")
elif len(missingEndDevices) > 0:
print ("The following devices are not correctly set up, please remove them from Z2M config and execute the pairing operation again")
for key, value in missingEndDevices.items():
print ("\t" + key + " - " + value)
else :
print ("Routers and end devices are correctly setup on the controller")
if len(additionalDevices) > 0:
print ("Some devices are knwown by the controller but not present on your Zigbee network")
for key, value in additionalDevices.items():
print ("\t" + key)
PS: you will have to install python with the json and yaml modules.
I did this script for Z2M running on Linux, if you are using Windows, you
will have to update the paths
PPS: make sure you have a recent coordinator_backup.json file, if you have
the last Z2M version, this file is created every few hours, if you are
running an older version, please restart Z2M before starting the script to
trigger a backup (or upgrade to the latest Z2M version)
—
Reply to this email directly, view it on GitHub
<#10339 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXGYEQEKUEWLHBNR3K3XEA3VTKYIZANCNFSM5KVRY4IA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Fabiancrg Thanks for your script. I was going nuts trying to figure out why nothing would route/pair w/anything but the coordinator (Sonoff CC2652) and this solved my issue. |
Thanks for the script 😃 |
Hi |
I tried to edit your code to use it directly in HA OS.... but no luck (I have to admit it was a long shot :) ). Would be great if you could have a look!
|
Hi, @Fabiancrg I have tried this script with my Sonoff ZB Dongle-E. It gave me a list of routers that needed to be "fixed". That list looked suspiciously like all the routers I have in my environment. I waited a few minutes and then added the router back. After I requested a new backup I run the script again and the router that I removed and re-added again is in the list of routers that needs to be "fixed". How can that be? I just removed it (by button so the network key was deleted) and then add it back. It should had been fixed I assume. Is the script not working as it should with the Sonoff ZB Dongle-E? |
The check is now supported directly from Zigbee2MQTT: #18599 |
What happened?
I transitioned from an old and weak CC2531, which worked ok, but with 40 devices connected started to misbehave, lose connection to devices, etc. Unfortunately, upon switching to CC2652 there is no way to pair any new device (IKEA, XIAOMI, TUYA, etc.). The network rebuilt perfectly fine after the coordinator change, and is updating sensors just fine, but will not execute a pairing process.
I've changed back and forth between different coordinator firmwares, to no effect.
Unplugging the coordinator, restarting the VM in which HA is running, neither restarting HA made any effect.
What did you expect to happen?
When pairing is initiated, the interview process begins and the device joins the network as per the old CC2531.
How to reproduce it (minimal and precise)
Zigbee2MQTT version
1.22.1
Adapter firmware version
20211217, 20210319, 20210708
Adapter
Ebyte CC2652P
Debug log
How to record a debug of something that doesn't happen? I've been monitoring the logs and while the permit_join is enabled, no interview process is initiated. The device sits idle until it times-out.
The text was updated successfully, but these errors were encountered: