Skip to content

[loqed] initial contribution for Loqed smart locks - #21357

Open
octa22 wants to merge 1 commit into
openhab:mainfrom
octa22:org.openhab.binding.loqed
Open

[loqed] initial contribution for Loqed smart locks#21357
octa22 wants to merge 1 commit into
openhab:mainfrom
octa22:org.openhab.binding.loqed

Conversation

@octa22

@octa22 octa22 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a new binding for LOQED Touch and LOQED Pure smart locks.

The binding supports two connection modes:

  • Cloud access through the LOQED Integrations API using a personal access token.
  • Direct local access through a LOQED Bridge using signed commands and signed outgoing webhooks.

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:

  • Lock control
  • Bolt state and latch opening
  • Battery level and battery type
  • Open House (party) mode
  • Guest access
  • Twist assist
  • Touch-to-Open configuration

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:

  • Signed local lock commands
  • Initial lock state retrieval
  • Signed webhook registration and state updates
  • Lock, unlock, and latch-open commands
  • Battery and configuration channel updates
  • Automatic callback URL detection

A complete local build was executed with Java 21:

./mvnw clean install

@octa22
octa22 requested a review from a team as a code owner August 10, 2026 19:58
@octa22 octa22 added the new binding If someone has started to work on a binding. For a new binding PR. label Aug 10, 2026

@lsiepel lsiepel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread bundles/org.openhab.binding.loqed/README.md Outdated
Comment thread bundles/org.openhab.binding.loqed/README.md Outdated
Comment thread bundles/org.openhab.binding.loqed/README.md Outdated
Comment thread bundles/org.openhab.binding.loqed/README.md Outdated
Comment thread bundles/org.openhab.binding.loqed/README.md
@octa22
octa22 force-pushed the org.openhab.binding.loqed branch from bccf601 to c5a14dd Compare August 11, 2026 17:58
@wborn
wborn requested a balanced review from Copilot August 14, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread bundles/org.openhab.binding.loqed/src/main/resources/OH-INF/thing/thing-types.xml Outdated

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@octa22
octa22 force-pushed the org.openhab.binding.loqed branch from c5a14dd to 5cf5d7f Compare August 15, 2026 06:36

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@octa22
octa22 force-pushed the org.openhab.binding.loqed branch 2 times, most recently from be52cef to b2631cb Compare August 15, 2026 13:05

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@octa22
octa22 force-pushed the org.openhab.binding.loqed branch from b2631cb to b0a0259 Compare August 20, 2026 18:46

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@octa22
octa22 force-pushed the org.openhab.binding.loqed branch from b0a0259 to b447647 Compare August 21, 2026 11:48

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Previous review concerns appear addressed. Two issues remain around local status polling and lifecycle management of asynchronous initialization.

This review was AI-assisted.

@wborn

wborn commented Aug 23, 2026

Copy link
Copy Markdown
Member

I think you still need to push the latest changes @octa22?

Signed-off-by: Ondrej Pecta <opecta@gmail.com>
@octa22
octa22 force-pushed the org.openhab.binding.loqed branch from b447647 to 2103965 Compare August 23, 2026 08:07
@octa22

octa22 commented Aug 23, 2026 via email

Copy link
Copy Markdown
Contributor Author

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

Labels

new binding If someone has started to work on a binding. For a new binding PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants