zha-toolkit
zha-toolkit copied to clipboard
Backup Coordinator Data fails (AttributeError: getKey not found in COMMANDS)
For over a month, all 3 of the Coordinator Backup commands return error: "getKey not found in Commands". It worked in an earlier version of HAOS, but I don't know the exact version when the error first occurred.
My system: ZHA Toolkit: v1.1.8 Core 2024.1.3 Supervisor 2023.12.1 Operating System 11.4 Frontend 20240104.0
Than you for the report.
I pudated from 2023.11.X or 2023.12.X to 2023.1.X about a week ago and it seems the backups for the EZSP/bellows radio stopped at that time.
Something changed in bellows/cli/backup.py:
File "/config/custom_components/zha_toolkit/ezsp.py", line 345, in ezsp_backup
await bellows_backup._backup(app._ezsp)
File "/usr/local/lib/python3.11/site-packages/bellows/cli/backup.py", line 114, in _backup
(status, key) = await ezsp.getKey(key_type)
^^^^^^^^^^^
What radio are you using?
Possibly the cli backup is broken:
https://github.com/zigpy/bellows/blob/d3ba62eca9a758090089086ff5db088d72f19c19/bellows/cli/backup.py#L114
My guess is that this is why getKey is not found:
https://github.com/zigpy/bellows/blob/d3ba62eca9a758090089086ff5db088d72f19c19/bellows/ezsp/v13/commands.py#L119
However, from the HA UI I can still download a backup, so there is still a way to get the key, etc.
Currently zha-toolkit triggered the backup method that is used with zigpy from the CLI. As I do not have the time to dig into another method, I hope that this will become functionnal in a next update.
Is there an issue opened on the bellows side for this, I can't find it.