zwave-lock: Add missing DATE_GET handler to Time CC - #3102
Merged
hcarter-775 merged 1 commit intoJul 10, 2026
Conversation
|
@pachuho Thanks for picking this up and for the fix! You're absolutely right about the year - os.date("*t").year returns the full year. Your version is correct. |
|
Channel deleted. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 8ca1717 |
Contributor
The driver only handled TIME_GET, so a lock requesting the date during a Time CC sync never got an answer (the hub ACKs at the MAC layer but no DATE_REPORT is sent). Add a DATE_GET handler that reports the current date, following the reworked lock_handlers structure. Fixes SmartThingsCommunity#3076
pachuho
force-pushed
the
fix/zwave-lock-date-get
branch
from
July 10, 2026 02:03
c4a2bb4 to
8ca1717
Compare
Contributor
Author
|
Hi @hcarter-775, Done — moved the handler to |
cjswedes
approved these changes
Jul 10, 2026
cbaumler
approved these changes
Jul 10, 2026
hcarter-775
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! I came across #3076 while digging around the Z-Wave lock driver and noticed nobody had picked it up yet, so here's a fix.
The driver registers a handler for
TIME_GETbut notDATE_GET, so a lock doing a full Time CC sync gets its date request silently dropped — the hub ACKs at the MAC layer but never answers. This PR adds aDATE_GEThandler that responds with the current date, mirroring the existingTIME_GEThandler.Credit to @maksymzdzitowiecki for the root cause analysis in the issue. One small correction from the proposed snippet there:
os.date("*t").yearalready returns the full year (e.g. 2026), andDateReportserializes it as a 16-bit value (write_be_u16), so the year should be passed through as-is — adding 1900 would put us in the year 3926 :)Added a test next to the existing
TIME_GETone intest_lock_battery.lua. All zwave-lock tests pass locally againstlua_libs-api_v20(51/51).Fixes #3076