A custom Home Assistant integration for U-tec ULTRALOQ WiFi smart locks via the Xthings OpenAPI.
| Device | Handler Type | Features |
|---|---|---|
| U-Bolt Pro WiFi | utec-lock |
Lock/Unlock, Battery Level |
| U-Bolt WiFi | utec-lock |
Lock/Unlock, Battery Level |
| Locks with door sensor | utec-lock-sensor |
Lock/Unlock, Battery Level, Door Sensor |
Note: This integration has only been tested with the U-Bolt Pro WiFi and U-Bolt WiFi locks. Other U-tec WiFi devices may work but are untested.
- Lock Entity — Lock and unlock your U-tec locks from Home Assistant
- Battery Sensor — Monitor battery level as a percentage
- Online Status — Entity availability reflects device connectivity
- OAuth2 Authentication — Secure cloud authentication via the Xthings OpenAPI
- Automatic Token Refresh — Tokens are refreshed automatically when they expire
- Polling — Device state is polled every 60 seconds
- Push Notifications (Webhook) — Optional near-instant state updates via the Xthings notification API
- A U-tec WiFi lock connected to the Xthings or ULTRALOQ app
- OpenAPI activated in the app (Settings → OpenAPI) — this generates your personal API credentials
- Your Client ID, Client Secret, and Redirect URI configured in the app
Or manually:
- Open HACS in Home Assistant
- Click the ⋮ menu → Custom repositories
- Add
https://github.com/aljopro/ha-xthingswith category Integration - Click Download on the Xthings (U-tec) card
- Restart Home Assistant
- Copy the
custom_components/xthingsfolder to your Home Assistantconfig/custom_components/directory - Restart Home Assistant
Each user must generate their own API credentials from the Xthings / ULTRALOQ app. Do not share your Client ID or Client Secret — they are tied to your personal account and grant access to your locks.
- Open the Xthings (or ULTRALOQ) app on your phone
- Go to Settings → OpenAPI and activate it (see Xthings docs if on app version 3.5.5+)
- Note the Client ID and Client Secret shown — these are unique to your account
Still in the app's OpenAPI settings, set the Redirect URI to match your Home Assistant instance:
- If using Nabu Casa:
https://<your-id>.ui.nabu.casa/auth/external/callback - If using local access:
http://<your-ha-ip>:8123/auth/external/callback
Tip: You can find your exact redirect URL in Home Assistant at Settings → Devices & Services → Application Credentials — it's shown when you add credentials.
- Go to Settings → Devices & Services → Application Credentials
- Click Add Application Credentials
- Select Xthings (U-tec)
- Enter your Client ID and Client Secret from Step 1
- Go to Settings → Devices & Services → Add Integration
- Search for Xthings
- You'll be redirected to the Xthings OAuth2 login page — sign in with your U-tec account
- Authorize Home Assistant to access your devices
- Your locks will be discovered automatically
By default, the integration polls for state changes every 60 seconds. You can enable push notifications for near-instant updates when a lock is operated, a device goes offline, etc.
- Go to Settings → Devices & Services
- Find the Xthings (U-tec) integration and click Configure
- Toggle on Enable push notifications (webhook)
- Choose your URL method (see below)
- Click Update — the integration will reload automatically
If you have Nabu Casa Home Assistant Cloud, leave the External Home Assistant URL field blank. A secure cloudhook URL is created automatically — no port forwarding or DNS setup required.
If you don't have Nabu Casa but your Home Assistant instance is reachable from the internet, enter your external base URL in the text field. For example:
https://my-ha.duckdns.orghttps://ha.example.com
The integration appends the webhook path automatically (e.g. https://my-ha.duckdns.org/api/webhook/<id>).
Common ways to expose Home Assistant externally:
| Method | Example URL |
|---|---|
| DuckDNS + Let's Encrypt | https://myha.duckdns.org |
| Cloudflare Tunnel | https://ha.yourdomain.com |
| Reverse proxy (nginx, Caddy, Traefik) | https://ha.yourdomain.com |
| Router port forwarding + DDNS | https://myha.ddns.net:8123 |
Important: The URL must be reachable from the public internet (HTTPS recommended). The Xthings cloud servers will POST notifications to this URL. Local-only addresses (e.g.
http://192.168.1.x:8123) will not work.
When webhooks are enabled, the Xthings API sends HTTP POST notifications to your Home Assistant whenever:
- A device state changes (lock/unlock, battery level, online/offline)
- A device is added or removed from your account
- A device is deleted
The integration still polls as a safety net, but at a slower interval (every 5 minutes instead of 60 seconds).
For each discovered lock, the integration creates:
| Entity | Type | Description |
|---|---|---|
lock.<name> |
Lock | Lock/unlock control and state |
sensor.<name>_battery |
Sensor | Battery level (%) |
- All API calls go through
POST https://api.u-tec.com/action - Lock/unlock commands are asynchronous — the API returns a deferred response, and the integration polls for the updated state after a short delay
- Device discovery happens on first setup and when state queries return no devices
- The integration uses HA's
DataUpdateCoordinatorfor efficient polling - When webhooks are enabled, state changes are pushed instantly via HTTP POST and polling is reduced to a 5-minute safety net
- Verify your Client ID and Client Secret are correct
- Check that OpenAPI is still activated in the Xthings app
- Try removing and re-adding the integration
- The integration polls every 60 seconds by default (5 minutes when webhooks are active)
- After a lock/unlock command, rapid polling checks every 3 seconds for up to 30 seconds
- If you have webhooks enabled, verify your external URL is reachable from the internet
- Check the Home Assistant logs for API errors: Settings → System → Logs, filter for
xthings
- The lock may be offline (out of WiFi range, batteries dead)
- Check the lock's connectivity in the Xthings app
# Clone the repository
git clone https://github.com/aljopro/ha-xthings.git
cd ha-xthings
# Install dev dependencies
scripts/setup
# Run the linter
scripts/lint
# Start a local HA instance with the component
scripts/develop
# Or use Docker
docker compose upFor architecture details and Xthings API documentation, see the docs/ folder and .instructions.md.
See CONTRIBUTING.md for the full contribution workflow, branch strategy, and release process.
MIT License — see LICENSE for details.