v0.5.0 — Working unlock
Unlock now works. This is the first release where lock.unlock has been confirmed against physical hardware.
What was wrong
Two fields in the BLE command frame were both incorrect, and both had to be right at once — which is why the earlier brute-force approach never stumbled onto it:
str3, the hub flag — was sent as00, should be01. Everysenddatacommand from the cloud is relayed through a hub.- the credential slot — was sent as
1, should be0. The host credential lives in slot 0.
What is tested
Unlock on a PGD628FN (lock firmware 4.03.15) behind a PGH220 Secure LINK, physically confirmed.
That is one lock model and one hub generation. Everything else in this release is implemented but unverified on other hardware.
Also in this release
- Per-model capability dispatch. Command codes and field layouts are selected from the lock's model and firmware rather than assumed, so other models take their correct code path instead of the PGD628FN one.
- Host password read from the lock via
QueryPwd147(0x93), so unlock no longer depends on a cached credential. - Lock-side BLE error codes are decoded instead of surfaced as raw bytes.
- Cloud error codes now come with an explanation. Previously an undocumented
cod=930was passed through bare. cachedstatusfailures are no longer hidden at debug level whilesenddatafailures logged at warning. Reports only ever showed half of what was failing.hubidis now logged on failures, and an emptyhubidis reported explicitly rather than as a generic error.
Known limitations
lock.lockis unverified. It differs from unlock by one byte and the app confirms these locks support an explicit lock command, but it is hard to observe on a lock with auto-lock enabled.- Silent polling needs hub firmware ≥ build 422 on major-version-2 hubs. Below that, state updates only at startup and after commands from HA.
- Locks with no hub are not supported.
senddatarelays through a hub, so WiFi-native locks need a different API path that is not implemented. - Real-time MQTT push does not work. The broker refuses the subscription.
rc=5lines in the log are expected and harmless.
If this does not fix your locks, please open or comment on an issue with your lock model, hub model and hub firmware version — and enable debug logging first:
logger:
default: warning
logs:
custom_components.lockly: debugFull protocol documentation is in docs/api.md.