Skip to content

Comments

[zwavejs] Fix NullPointerException with ZUI 11.5.2#19500

Merged
lolodomo merged 2 commits intoopenhab:mainfrom
lsiepel:zwave-js-timeout
Nov 2, 2025
Merged

[zwavejs] Fix NullPointerException with ZUI 11.5.2#19500
lolodomo merged 2 commits intoopenhab:mainfrom
lsiepel:zwave-js-timeout

Conversation

@lsiepel
Copy link
Contributor

@lsiepel lsiepel commented Oct 18, 2025

Fixes: #19497

Should be backported to 5.0.x

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
@lsiepel lsiepel requested a review from Copilot October 18, 2025 08:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a NullPointerException that occurs in the Z-Wave JS binding when using ZUI version 11.5.2. The fix adds support for a new TIMEOUT metadata type that was introduced in the newer ZUI version but not handled by the binding.

  • Added support for the new TIMEOUT metadata type in the enum definition
  • Updated metadata processing to handle TIMEOUT types by treating them as time-based number items
  • Removed the automatic conversion of DURATION to NUMBER type and added explicit handling

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
MetadataType.java Added new TIMEOUT enum value with proper JSON serialization
ConfigMetadata.java Added TIMEOUT case to switch statement for type conversion
BaseMetadata.java Removed DURATION to NUMBER conversion and added explicit handling for both DURATION and TIMEOUT as time-based items

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lsiepel lsiepel added the bug An unexpected problem or unintended behavior of an add-on label Oct 18, 2025
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
@lsiepel lsiepel marked this pull request as ready for review October 21, 2025 11:52
@lsiepel lsiepel requested a review from a team October 21, 2025 11:53
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To the reviewer, there is no point in reviewing this json, as it is generated by ZUI

@lsiepel lsiepel marked this pull request as draft October 21, 2025 12:03
@lsiepel lsiepel marked this pull request as ready for review October 21, 2025 12:05
@miloit
Copy link
Contributor

miloit commented Oct 26, 2025

Is this already available in a snapshot?

@lsiepel
Copy link
Contributor Author

lsiepel commented Oct 26, 2025

Is this already available in a snapshot?

Unfortunately it was not yet merged, so it is not yet in the snapshots (or the just released milestone)

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@lolodomo lolodomo merged commit 7a02948 into openhab:main Nov 2, 2025
2 checks passed
@lolodomo lolodomo added this to the 5.1 milestone Nov 2, 2025
@lolodomo
Copy link
Contributor

lolodomo commented Nov 2, 2025

Should be backported to 5.0.x

Cherry-picking the change in 5.0.x is failing.

@lsiepel lsiepel deleted the zwave-js-timeout branch November 2, 2025 12:23
@webstr4711
Copy link

what does it mean, in which version is the fix included?

@lsiepel
Copy link
Contributor Author

lsiepel commented Nov 17, 2025

what does it mean, in which version is the fix included?

5.1.0 Snapshots (already available), 5.1.0 milestone 3 (due in about 2 weeks) and 5.1.0 stable (end of december)

@jlaur jlaur added the backported A PR that has been cherry-picked to a patch release branch label Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported A PR that has been cherry-picked to a patch release branch bug An unexpected problem or unintended behavior of an add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[zwave-js] Timeout type not supported

5 participants