zigpy / bellows

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

Retry energy scans until they succeed for Zigbeed #552

Closed puddly closed 1 year ago

puddly commented 1 year ago

Zigbeed occasionally interrupts the energy scan without any error message:

2023-05-02 22:34:08.447 homeassistant bellows.ezsp.protocol DEBUG Send command startScan: (<EzspNetworkScanType.ENERGY_SCAN: 0>, <Channels.ALL_CHANNELS: 134215680>, 2)
2023-05-02 22:34:08.448 homeassistant bellows.uart DEBUG Data frame: b'1212a1a9012a15322f7e'
2023-05-02 22:34:08.448 homeassistant bellows.uart DEBUG Sending: b'82503a7e'
2023-05-02 22:34:08.448 homeassistant bellows.ezsp.protocol DEBUG Application frame received setPolicy: [<EzspStatus.SUCCESS: 0>]
2023-05-02 22:34:08.449 homeassistant bellows.uart DEBUG Sending: b'227d3321a94e2a15b2a16b4d2753a27e'
2023-05-02 22:34:08.450 homeassistant bellows.uart DEBUG Data frame: b'2313a1a94e2a15b25994dc767e'
2023-05-02 22:34:08.451 homeassistant bellows.uart DEBUG Sending: b'83401b7e'
2023-05-02 22:34:08.451 homeassistant bellows.ezsp.protocol DEBUG Application frame received startScan: [<sl_Status.SL_STATUS_OK: 0>]
2023-05-02 22:34:08.659 homeassistant bellows.uart DEBUG Data frame: b'3313b1a91c2a1e115b847e'
2023-05-02 22:34:08.659 homeassistant bellows.uart DEBUG Sending: b'8430fc7e'
2023-05-02 22:34:11.889 homeassistant bellows.ezsp.protocol DEBUG Application frame received energyScanResultHandler: [11, -93]
2023-05-02 22:34:11.889 homeassistant bellows.zigbee.application DEBUG Received energyScanResultHandler frame with [11, -93]
2023-05-02 22:34:12.087 homeassistant bellows.uart DEBUG Data frame: b'0511b5a91c2a191ad32d7e'
2023-05-02 22:34:12.088 homeassistant bellows.uart DEBUG Sending: b'8160597e'
2023-05-02 22:34:12.089 homeassistant bellows.ezsp.protocol DEBUG Application frame received energyScanResultHandler: [12, -88]
2023-05-02 22:34:12.090 homeassistant bellows.zigbee.application DEBUG Received energyScanResultHandler frame with [12, -88]
2023-05-02 22:34:12.091 homeassistant bellows.uart DEBUG Data frame: b'1511b1a9482a0fb2cac57e'
2023-05-02 22:34:12.091 homeassistant bellows.uart DEBUG Sending: b'82503a7e'
2023-05-02 22:34:12.092 homeassistant bellows.ezsp.protocol DEBUG Application frame received scanCompleteHandler: [26, <EmberStatus.SUCCESS: 0>]
2023-05-02 22:34:12.092 homeassistant bellows.zigbee.application DEBUG Received scanCompleteHandler frame with [26, <EmberStatus.SUCCESS: 0>]

This allows a subsequent energy scan to immediately run for the remaining channels until one completes.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 :tada:

Comparison is base (a73588d) 99.71% compared to head (a2216e1) 99.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #552 +/- ## ========================================== + Coverage 99.71% 99.76% +0.04% ========================================== Files 61 62 +1 Lines 4582 4586 +4 ========================================== + Hits 4569 4575 +6 + Misses 13 11 -2 ``` | [Impacted Files](https://app.codecov.io/gh/zigpy/bellows/pull/552?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy) | Coverage Δ | | |---|---|---| | [bellows/ezsp/v8/config.py](https://app.codecov.io/gh/zigpy/bellows/pull/552?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Y4L2NvbmZpZy5weQ==) | `100.00% <ø> (ø)` | | | [bellows/multicast.py](https://app.codecov.io/gh/zigpy/bellows/pull/552?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9tdWx0aWNhc3QucHk=) | `100.00% <ø> (ø)` | | | [bellows/zigbee/device.py](https://app.codecov.io/gh/zigpy/bellows/pull/552?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy96aWdiZWUvZGV2aWNlLnB5) | `100.00% <ø> (+3.92%)` | :arrow_up: | | [bellows/ezsp/config.py](https://app.codecov.io/gh/zigpy/bellows/pull/552?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/552?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Byb3RvY29sLnB5) | `97.36% <100.00%> (+0.12%)` | :arrow_up: | | [bellows/ezsp/v4/config.py](https://app.codecov.io/gh/zigpy/bellows/pull/552?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Y0L2NvbmZpZy5weQ==) | `100.00% <100.00%> (ø)` | | | [bellows/zigbee/application.py](https://app.codecov.io/gh/zigpy/bellows/pull/552?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy96aWdiZWUvYXBwbGljYXRpb24ucHk=) | `100.00% <100.00%> (ø)` | |

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

MattWestb commented 1 year ago

May i being little critical of the description that is not important ? "RCP firmware" i think more correct is "zigbeed" then the RCP is only doing the data stream to RF converting with the logic and encoding if im not wrong (that can being the case ! ! ).

This is not important only that:

great work done P !!