Skip to content

zwave-lock: fix Yale Conexis tag unlocks, handle locks and tamper profile - #3338

Open
jimdrury wants to merge 1 commit into
SmartThingsCommunity:mainfrom
jimdrury:fix/yale-conexis-alarm-reports
Open

jimdrury wants to merge 1 commit into
SmartThingsCommunity:mainfrom
jimdrury:fix/yale-conexis-alarm-reports

Conversation

@jimdrury

@jimdrury jimdrury commented Nov 7, 2026

Copy link
Copy Markdown

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

These fixes are for the Yale Conexis L1/L2 with the Yale Z-Wave module (Yale/Conexis, 0x0129 / 0x6600 / 0x0002). The lock reports how it was operated with alarm v1 reports, which currently lose detail or are dropped:

  1. Tag unlocks are ignored. A key tag or card unlock is alarm type 144 with the tag slot in the alarm level (as in the Z-Wave JS config for this product). It's now reported as unlocked with method = "rfid" and the slot as codeId, for Yale locks only.
  2. Handle locks show as keypad. On the Conexis, alarm 21 level 1 is the handle being lifted; the lock has no keypad. It's now method = "manual" for the Conexis only, so other Yale locks keep the current behaviour.
  3. Detailed events are dropped. The lock sends a Door Lock Operation Report about 1 s before the alarm report. The plain event is emitted first, and the detailed alarm event with the same value is dropped as a repeat. The Notification handlers already feed the DELAY_LOCK_EVENT bookkeeping so the plain report is held and replaced. This applies the same bookkeeping (lock_utils.handle_alarm_lock_event_delay) to alarm v1 lock events from Yale locks. It's limited to Yale because that's what I could test; other alarm v1 locks may have the same problem.
  4. Tamper alerts never show. The Yale/Conexis fingerprint used base-lock, which has no tamperAlert, so the wrong-tag lockout (alarm 161) was never shown. It now uses base-lock-tamper. ⚠️ This is a fingerprint change, so it only affects newly joined devices; existing devices keep their profile.

Summary of Completed Tests

  • New tests: test_yale_conexis_alarms.lua has 6 tests:
    • tag unlock on both the legacy and migrated paths
    • alarm 144 ignored for other manufacturers
    • the Conexis handle-lock mapping, with other Yale locks keeping keypad
    • the held Operation Report being replaced by the detailed event
  • Mutation check: the replacement test fails when the bookkeeping hook is disabled.
  • Full suite: all 166 zwave-lock tests pass under Lua 5.3 with lua_libs apiv21_62, and luacheck reports 0 warnings and 0 errors on the changed files.
  • Device testing: on a real Conexis L2, using a personal driver built from this one with the same handling, I watched logcat for tag unlocks (alarm 144, slot 3), handle lock and unlock (21/22), remote lock and unlock (24/25) and auto-relock (27), and confirmed the resulting events in device History. This exact branch hasn't been deployed to the device.

🤖 Generated with Claude Code

…file

- Report Yale alarm v1 type 144 (key tag/card unlock) as an rfid unlock
  with the tag slot as codeId; previously it was ignored
- Map alarm 21 level 1 to a manual lock on the Conexis, which has no
  keypad (the handle is lifted); other Yale locks keep keypad
- Feed alarm v1 lock events from Yale locks into the existing lock event
  delay bookkeeping, as the Notification handlers already do. The lock
  sends a Door Lock Operation Report ~1s before the alarm, so the
  detailed event was dropped as a repeat of the current state
- Use base-lock-tamper for the Yale/Conexis fingerprint so the wrong-tag
  lockout alarm (161) is shown

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants