5e213759d6
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
33 lines
1.5 KiB
Markdown
33 lines
1.5 KiB
Markdown
# Door Locks & Codes
|
||
|
||
<overview>
|
||
Two Z-Wave (zwave_js) keypad locks: `lock.lodge_front_door_lock` (node 3) and
|
||
`lock.bunkhouse_frontdoor_lock`. 8 shared code slots, managed from the
|
||
"Lock Management" Lovelace view via helpers:
|
||
`input_text.lock_slotN_user`, `input_text.lock_slotN_code`,
|
||
`input_boolean.lock_slotN_enabled` (N = 1–8).
|
||
Slot 1 = Fritz family, 2 = cleaner, 4 = carpenter, 5 = backup.
|
||
</overview>
|
||
|
||
<sync>
|
||
`script.lock_sync_all_codes` (mode: queued) walks slots 1–8; for each slot it
|
||
calls `zwave_js.set_lock_usercode` on BOTH locks — the slot's code if its
|
||
`_enabled` boolean is on, otherwise the slot-1 family code (hardcoded in the
|
||
script's default branches). `automation.lock_slot_N_sync_both_locks` (per slot)
|
||
also pushes on helper change. An error on any step ABORTS the script — later
|
||
slots and the second lock do not sync.
|
||
|
||
The `input_boolean.lock_code_slot_N_*` / `input_text.lock_code_slot_N_*` /
|
||
`input_boolean.lock_slotN_lodge/bunkhouse_enabled` entities are unavailable
|
||
leftovers from earlier schemes — ignore.
|
||
</sync>
|
||
|
||
<troubleshooting>
|
||
Error `userCode for code slot N not found` from `zwave_js.set_lock_usercode`
|
||
= Z-Wave JS value cache has no userCode value for that slot (never
|
||
queried/interviewed), NOT a lock or code problem. Fix by forcing a UserCode CC
|
||
read to repopulate the cache, then re-run the sync script:
|
||
`zwave_js.invoke_cc_api {device_id, command_class: "99", method_name: "get", parameters: [N]}`.
|
||
(2026-07-05: lodge slot 3 hit this; gets were run for slots 1–8 on both locks.)
|
||
</troubleshooting>
|