Closed pipiche38 closed 2 years ago
What firmware build date is this?
20211207, I'll try the latest 20220219. The CIE is a zzh
Shouldn't make a difference as long as it's above 20210708
.
indeed same problem.
how do you suggest I should approach , debug that issue ?
Everything looks like it should be working and I again tested a ZZH with the latest dev
version of Home Assistant with the updated radio libraries and zigpy, including some additional debug logging.
diff --git a/zigpy/application.py b/zigpy/application.py
index 0930fa4..3777b3b 100644
--- a/zigpy/application.py
+++ b/zigpy/application.py
@@ -629,6 +629,7 @@ class ControllerApplication(zigpy.util.ListenableMixin, abc.ABC):
if node != self.state.node_info.ieee:
try:
dev = self.get_device(ieee=node)
+ LOGGER.debug("Sending 'mgmt_permit_joining_req' to %s", node)
r = await dev.zdo.permit(time_s)
LOGGER.debug("Sent 'mgmt_permit_joining_req' to %s: %s", node, r)
except KeyError:
Can you replicate this problem without Domoticz, using just ZHA from Home Assistant dev
, and post the debug logs?
@puddly I trust you when you say it works with ZHA I have no doubt on that, so for me this will not bring value to test outside of Domoticz, as my issue is there. But 1/ the problem is happening only on ZNP (not on bellows; for deConz I understood this is not possible) 2/ the problem occurred only on the permit to join when a router is targeted
The problem is not on the permit to join it self, it works, the newtork is correctly open on that router, the issue is it looks like the we never come back from teh request and so zigpy trigger a Timeout
So for me it is more how to debug the await part ?
Here is a minimum logs with bellows
2022-06-29 09:01:52,949 INFO : [ MainThread] Requesting router: b7eb to enable Permit to join
2022-06-29 09:01:52,950 DEBUG : [ MainThread] zdp_permit_joining_request b7eb f0 00
2022-06-29 09:01:52,951 DEBUG : [ MainThread] zdp_raw_permit_joining_request b7eb f0 00
2022-06-29 09:01:52,965 INFO : [ ZigpyCom_9] PERMIT-TO-JOIN: {'cmd': 'PERMIT-TO-JOIN', 'datas': {'Duration': 240, 'targetRouter': 7497054118825609865}, 'NwkId': None, 'TimeStamp': 1656489712.9469523, 'ACKIsDisable': False, 'Sqn': None}
2022-06-29 09:01:52,967 INFO : [ ZigpyCom_9] PERMIT-TO-JOIN: duration: 240 for Radio: ezsp for node: 68:0a:e2:ff:fe:7a:ca:89
2022-06-29 09:01:57,817 INFO : [ ZigpyCom_9] returning from the self.app.permit(time_s=240, node=68:0a:e2:ff:fe:7a:ca:89 )
here are a minimum logs with ZNP
2022-06-29 09:00:25,123 INFO : [ MainThread] Requesting router: f1fa to enable Permit to join
2022-06-29 09:00:25,153 INFO :Entering in AppZnp permit 'mgmt_permit_joining_req' to 68:0a:e2:ff:fe:7a:ca:89
2022-06-29 09:00:25,154 INFO : [ ZigpyCom_8] PERMIT-TO-JOIN: {'cmd': 'PERMIT-TO-JOIN', 'datas': {'Duration': 240, 'targetRouter': 7497054118825609865}, 'NwkId': None, 'TimeStamp': 1656489625.1214826, 'ACKIsDisable': False, 'Sqn': None}
2022-06-29 09:00:25,156 INFO :Ready to send 'mgmt_permit_joining_req' to 68:0a:e2:ff:fe:7a:ca:89
2022-06-29 09:00:25,157 INFO : [ ZigpyCom_8] PERMIT-TO-JOIN: duration: 240 for Radio: znp for node: 68:0a:e2:ff:fe:7a:ca:89
2022-06-29 09:00:25,281 INFO : [ ZigpyForwarder_8] Accepting new Hardware: Enable (On)
2022-06-29 09:00:53,331 ERROR : [ ZigpyCom_8] asyncio.TimeoutError / : request() Not able to execute the zigpy command: PERMIT-TO-JOIN data: {'Duration' : 240,'targetRouter' : 7497054118825609865,}
From my current investigation, it never comes back from
r = await dev.zdo.permit(time_s)
Despite the fact that
:ZDO permit Mgmt_Permit_Joining_req
is correctly done.
Is that not an issue ? that I don't seem with Bellows
2022-06-29 09:50:57,314 DEBUG :[0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_rsp: [<Status.SUCCESS: 0>]
2022-06-29 09:50:57,316 DEBUG :[0x0000:zdo] No handler for ZDO request:ZDOCmd.Mgmt_Permit_Joining_rsp([<Status.SUCCESS: 0>])
when using ZDO.MgmtPermitJoinReq on a targeted router , it open the network on the corresponding router, but around 18 seconds later there is an asyncio.Timeout because we never come back from
await self.app.permit(time_s=duration, node=target_router )
If we simply use None for the node, there is no issue at all.