Skip to content

Commit de71047

Browse files
authored
Allow backup to complete on old FW versions (#268)
* Allow backup to complete on old FW versions * Fix unit test
1 parent 374c67d commit de71047

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/test_network_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ async def write_parameter(param, *args):
234234
command=None,
235235
)
236236
},
237-
{"network_key.tx_counter": 0},
237+
{"network_key.tx_counter": 1073741824},
238238
{},
239239
),
240240
(

zigpy_deconz/zigbee/application.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@ async def load_network_info(self, *, load_devices=False):
365365
)
366366
except zigpy_deconz.exception.CommandError as ex:
367367
assert ex.status == Status.UNSUPPORTED
368+
LOGGER.debug(
369+
"Conbee firmware is too old and does not support reading the frame"
370+
" counter, picking a large value instead"
371+
)
372+
network_info.network_key.tx_counter = 2**30
368373

369374
network_info.tc_link_key = zigpy.state.Key()
370375
network_info.tc_link_key.partner_ieee = await self._api.read_parameter(

0 commit comments

Comments
 (0)