zigpy / bellows

A Python 3 project to implement EZSP for EmberZNet devices
GNU General Public License v3.0
177 stars 87 forks source link

HUSBZB-1 config regression fix for Aqara devices #557

Closed puddly closed 1 year ago

puddly commented 1 year ago

550 introduced a major regression for older coordinators. Below are the previous EZSP configurations:

v4 set CONFIG_ADDRESS_TABLE_SIZE = 16
v4 set CONFIG_APPLICATION_ZDO_FLAGS = 3
v4 set CONFIG_END_DEVICE_POLL_TIMEOUT = 60
v4 set CONFIG_END_DEVICE_POLL_TIMEOUT_SHIFT = 8
v4 set CONFIG_INDIRECT_TRANSMISSION_TIMEOUT = 7680
v4 set CONFIG_KEY_TABLE_SIZE = 4
v4 set CONFIG_MAX_END_DEVICE_CHILDREN = 32
v4 set CONFIG_MULTICAST_TABLE_SIZE = 16
v4 set CONFIG_PACKET_BUFFER_COUNT = 255
v4 set CONFIG_PAN_ID_CONFLICT_REPORT_THRESHOLD = 2
v4 set CONFIG_SECURITY_LEVEL = 5
v4 set CONFIG_SOURCE_ROUTE_TABLE_SIZE = 16
v4 set CONFIG_STACK_PROFILE = 2
v4 set CONFIG_SUPPORTED_NETWORKS = 1
v4 set CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE = 2

v7 changed CONFIG_END_DEVICE_POLL_TIMEOUT = 8 (was 60)
v7 changed CONFIG_KEY_TABLE_SIZE = 12 (was 4)

v8 set CONFIG_TC_REJOINS_USING_WELL_KNOWN_KEY_TIMEOUT_S = 90

EZSP v7 renamed CONFIG_END_DEVICE_POLL_TIMEOUT_SHIFT to CONFIG_END_DEVICE_POLL_TIMEOUT and changed the format. This unfortunately meant that the earlier PR made the new config backwards-incompatible with older coordinators (i.e. the HUSBZB-1) and that child devices that poll very infrequently (i.e. Aqara) will be aged out quickly by the coordinator. This only affected devices connected straight to the coordinator, not through an intermediate router.


https://github.com/home-assistant/core/issues/92581

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (50c80cd) 99.76% compared to head (851241e) 99.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #557 +/- ## ======================================= Coverage 99.76% 99.76% ======================================= Files 62 62 Lines 4594 4594 ======================================= Hits 4583 4583 Misses 11 11 ``` | [Impacted Files](https://app.codecov.io/gh/zigpy/bellows/pull/557?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy) | Coverage Δ | | |---|---|---| | [bellows/ezsp/config.py](https://app.codecov.io/gh/zigpy/bellows/pull/557?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL2NvbmZpZy5weQ==) | `100.00% <100.00%> (ø)` | | | [bellows/ezsp/protocol.py](https://app.codecov.io/gh/zigpy/bellows/pull/557?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Byb3RvY29sLnB5) | `97.29% <100.00%> (-0.08%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

exx76 commented 1 year ago

Still broken.....

milnergroup commented 1 year ago

Mine is still working beautifully

puddly commented 1 year ago

@exx76 the config is tested to match exactly what was in the previous version of the library. If you're having issues, try to re-join the devices.

exx76 commented 1 year ago

@puddly I did re-join the devices, but that is not a solution. For the past I don't even KNOW how many releases prior to 2023.5.0, Zigbee was rock solid. Beginning with 2023.5.0 and including 2023.5.3, I have had to repeatedly re-join zigbee devices. Clearly this issue is not resolved, since if it were, I would not have had to do that with 2023.5.3.

puddly commented 1 year ago

@exx76 If you can gather debug logs from 2023.4.6 and 2023.5.3 with your exact setup (I have more specific instructions here: https://github.com/home-assistant/core/issues/92581#issuecomment-1541253558), it would help figure out why you're seeing a difference.

exx76 commented 1 year ago

@puddly I don't have a 2023.4.6 setup here, but I just made the config entries for my 2023.5.3 system and will forward them to you once the system has been running for a bit.

exx76 commented 1 year ago

@puddly email sent.

exx76 commented 1 year ago

Overnight, a different Aqara device dropped off the network. This is a different behavior than 5.0, 1 or 2. With those 3 prior releases, it was always the same devices that were affected; the problem never "moved around".