[loqed] initial contribution for Loqed smart locks - #21357
Conversation
lsiepel
left a comment
There was a problem hiding this comment.
Thansk for contributing this new binding to openHAB. I left a detailed review so expect many smaller details. Overall the code is of good quality.
bccf601 to
c5a14dd
Compare
There was a problem hiding this comment.
Pull request overview
Adds a LOQED smart-lock binding with cloud and local bridge connectivity.
Changes:
- Adds cloud discovery, polling, and lock control.
- Adds signed local commands and webhook updates.
- Adds thing metadata, documentation, and protocol tests.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
CODEOWNERS |
Assigns LOQED ownership. |
bundles/pom.xml |
Registers the bundle module. |
bundles/org.openhab.binding.loqed/src/test/java/org/openhab/binding/loqed/internal/api/LoqedLocalApiClientTest.java |
Tests command signatures. |
bundles/org.openhab.binding.loqed/src/test/java/org/openhab/binding/loqed/internal/api/BoltStateTest.java |
Tests bolt-state conversion. |
bundles/org.openhab.binding.loqed/src/main/resources/OH-INF/thing/thing-types.xml |
Defines Things and channels. |
bundles/org.openhab.binding.loqed/src/main/resources/OH-INF/i18n/loqed.properties |
Provides localized metadata. |
bundles/org.openhab.binding.loqed/src/main/resources/OH-INF/addon/addon.xml |
Defines add-on metadata. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedWebhookServlet.java |
Receives signed webhooks. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedLockHandler.java |
Handles lock channels. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedLocalConfiguration.java |
Models local configuration. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedLocalBridgeHandler.java |
Manages local connectivity. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedHandlerFactory.java |
Creates handlers and servlet. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedConfiguration.java |
Models shared configuration. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedBridgeHandler.java |
Manages cloud polling. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedBridge.java |
Defines common bridge operations. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/LoqedBindingConstants.java |
Defines binding identifiers. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/discovery/LoqedDiscoveryService.java |
Discovers cloud locks. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/LoqedResponseException.java |
Represents response failures. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/LoqedLockData.java |
Models lock data. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/LoqedLocalApiClient.java |
Implements the local API. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/LoqedConfigurationException.java |
Represents configuration failures. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/LoqedCommunicationException.java |
Represents transport failures. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/LoqedAuthenticationException.java |
Represents authentication failures. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/LoqedApiException.java |
Defines the API exception base. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/LoqedApiClient.java |
Implements the cloud API. |
bundles/org.openhab.binding.loqed/src/main/java/org/openhab/binding/loqed/internal/api/BoltState.java |
Maps bolt states. |
bundles/org.openhab.binding.loqed/src/main/feature/feature.xml |
Defines the Karaf feature. |
bundles/org.openhab.binding.loqed/README.md |
Documents setup and usage. |
bundles/org.openhab.binding.loqed/pom.xml |
Defines the bundle build. |
bundles/org.openhab.binding.loqed/NOTICE |
Declares licensing. |
bom/openhab-addons/pom.xml |
Adds the bundle to the BOM. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wborn
left a comment
There was a problem hiding this comment.
Additional AI review of the current PR head.
Three additional functional/lifecycle issues were found that are not covered by the existing open review threads. The existing findings remain applicable and are not duplicated here.
A manual maintainer review is still required.
c5a14dd to
5cf5d7f
Compare
wborn
left a comment
There was a problem hiding this comment.
Additional AI re-review of the current PR head after the latest update.
The previously raised webhook event handling, asynchronous initialization, and webhook cleanup issues appear addressed. Four additional functional/lifecycle issues and one repository-guidance issue remain.
A manual maintainer review is still required.
be52cef to
b2631cb
Compare
wborn
left a comment
There was a problem hiding this comment.
The previously raised issues appear to have been addressed in the current revision. Two additional correctness/lifecycle issues remain in the local bridge implementation.
This review was AI-assisted.
b2631cb to
b0a0259
Compare
wborn
left a comment
There was a problem hiding this comment.
The two issues from the previous review are addressed in the current revision. A few local-bridge correctness issues remain around webhook event handling, fallback behavior, and webhook lifecycle.
This review was AI-assisted.
b0a0259 to
b447647
Compare
wborn
left a comment
There was a problem hiding this comment.
Previous review concerns appear addressed. Two issues remain around local status polling and lifecycle management of asynchronous initialization.
This review was AI-assisted.
|
I think you still need to push the latest changes @octa22? |
Signed-off-by: Ondrej Pecta <opecta@gmail.com>
b447647 to
2103965
Compare
|
Sorry, you are right, I forgot to push the latest changes. Pushed.
|
Description
This PR adds a new binding for LOQED Touch and LOQED Pure smart locks.
The binding supports two connection modes:
Cloud-connected locks can be discovered automatically. Local locks are configured manually with credentials obtained from the LOQED API configuration page.
The binding provides channels for:
For local connections, openHAB automatically determines the webhook callback address. A manual callback URL can be configured for installations with multiple network interfaces, VLANs, or container networking.
The README documents both connection modes, configuration parameters, channels, security considerations, and textual configuration examples.
Testing
The binding was tested with a physical LOQED lock using local bridge communication.
The following functionality was verified:
A complete local build was executed with Java 21: