Nuki Smart Lock — KNX Integration via Home Assistant
Local API, sub-100ms response time, guest codes via automation, and full audit logging — how to connect Nuki locks to your KNX system without cloud dependency.
Nuki product line — which model for which project
Nuki manufactures retrofit smart locks — they mount over the existing door cylinder thumbturn without replacing the cylinder. The correct model depends on connectivity requirements and whether you have a door opener (entry intercom) to integrate as well.
Nuki Smart Lock 4.0 Pro
Recommended for KNX integration- • Built-in Wi-Fi (2.4 GHz) and Thread — no Bridge needed for LAN access
- • Nuki Bridge still required for local HTTP API (Wi-Fi direct mode uses cloud only)
- • Matter over Thread — future-proof protocol support
- • Auto-lock, activity log, DoorSense (door open/closed sensor)
- • Battery: 8× AA alkaline, ~6 months typical use
Nuki Smart Lock 3.0
Budget option — Bridge required- • Bluetooth only — requires Nuki Bridge for LAN/local API access
- • Bridge connects via Wi-Fi and bridges Bluetooth to LAN
- • Proven reliability — large install base across EU integrators
- • Slightly lower cost than 4.0 Pro when Bridge is already present
- • Battery: 4× AA alkaline
Nuki Combo (Lock + Opener)
For intercom-equipped buildings- • Includes Nuki Opener — mounts on intercom unit, opens building entrance
- • Opener communicates over Bluetooth with Smart Lock
- • Supports ring-to-open: doorbell → opener buzzes entrance automatically
- • Compatible with most analog intercom systems (BUS and 2-wire)
- • Ideal for apartment entry: single button opens both building door and flat door
Nuki Bridge — the local API gateway
The Nuki Bridge is a small device (plug-in, Wi-Fi) that bridges Bluetooth from the Nuki lock to the LAN. It exposes an HTTP API on the local network, enabling direct control from Home Assistant or any LAN client — no internet connection required for lock/unlock commands.
The Bridge must be within Bluetooth range of the lock. For large floor plans, plan the Bridge location carefully — walls and metal doors attenuate Bluetooth signal significantly. The Bridge maintains a persistent Bluetooth connection to the lock, so commands are relayed near-instantly without re-pairing overhead.
Local API vs cloud API — response time comparison
| Method | Path | Typical latency | Offline resilience |
|---|---|---|---|
| Local Bridge HTTP API | HA → Bridge (LAN) → Bluetooth → Lock | ~50–100 ms | Full — no internet needed |
| Nuki cloud API | HA → cloud → internet → Bridge → Bluetooth → Lock | ~1.5–4 s | None — fails if internet down |
| Nuki app (manual) | Smartphone → Bluetooth → Lock | ~200–500 ms | Full — direct Bluetooth |
| Matter (4.0 Pro) | HA → Thread border router → Lock | ~80–150 ms | Full — local Thread mesh |
Always use local Bridge API for KNX integration
Cloud API integration means any internet outage (router reboot, ISP downtime, Nuki server maintenance) breaks your KNX access control scenes. Local Bridge API keeps everything on-site — the KNX panel and HA server control the lock independently of internet connectivity.
Home Assistant Nuki integration — setup and configuration
The official Home Assistant Nuki integration connects via the local Bridge HTTP API. It provides real-time state updates using webhooks — the Bridge POSTs to HA immediately on any lock state change, without polling.
Home Assistant — Nuki Bridge local integration
# Settings → Devices & Services → Add Integration → Nuki # (or configuration.yaml for manual setup) nuki: host: 192.168.1.90 # Nuki Bridge LAN IP (set static in router) token: !secret nuki_bridge_token port: 8080 # Bridge webhook registration (auto by HA integration) # Bridge will POST to http://HA_IP:8123/api/webhook/nuki_<id> # on every lock/unlock/door_open event # Resulting entities in HA: # lock.front_door — lock/unlock service # binary_sensor.front_door_door — door open/closed (DoorSense) # sensor.front_door_battery — battery level % # sensor.front_door_last_action — last action description
After adding the integration, HA creates a lock entity, a door sensor (if DoorSense is installed on the lock), and a battery sensor. The lock entity supports lock, unlock, and unlatch services. State updates arrive via webhook within ~100ms of the physical lock actuation.
KNX integration path — bidirectional control
Home Assistant with the KNX integration installed acts as the bridge between KNX group addresses and Nuki lock services. Both directions work: KNX controls Nuki, and Nuki state changes update KNX group addresses.
automations.yaml — KNX ↔ Nuki bidirectional bridge
# KNX scene → Nuki lock
automation:
- alias: "KNX Departure Scene → Nuki lock"
trigger:
platform: state
entity_id: binary_sensor.knx_departure_scene # GA 3/0/1
to: "on"
action:
- service: lock.lock
entity_id: lock.front_door
- service: knx.send
data:
address: "6/1/0" # lock status feedback GA
payload: [1]
type: "binary"
- alias: "KNX Arrival Pushbutton → Nuki unlock"
trigger:
platform: state
entity_id: binary_sensor.knx_arrival_button # GA 3/0/2
to: "on"
action:
- service: lock.unlock
entity_id: lock.front_door
# Nuki state change → update KNX group address
- alias: "Nuki state → KNX feedback"
trigger:
platform: state
entity_id: lock.front_door
action:
- service: knx.send
data:
address: "6/1/0"
payload: >
{{ [1] if trigger.to_state.state == 'locked' else [0] }}
type: "binary"
# configuration.yaml — expose KNX GAs for lock control
knx:
binary_sensor:
- name: "KNX Departure Scene"
address: "3/0/1"
- name: "KNX Arrival Button"
address: "3/0/2"
switch:
- name: "Nuki Lock Status KNX"
address: "6/1/0"
state_address: "6/1/1"KNX → Nuki
Any KNX telegram on the designated group address triggers HA automation which calls lock.lock or lock.unlock service on the Nuki entity. Works from KNX pushbutton, scene, time schedule, or logic block.
Nuki → KNX
Any Nuki state change (lock/unlock from app, keypad, or physical key) triggers HA automation which sends a KNX telegram to the status group address. This keeps KNX visualization and logic in sync with actual lock state.
Guest access — time-limited codes via REST API
Nuki supports time-limited access codes (keypad or app-based). Home Assistant can create these automatically via the Nuki Bridge REST API — useful for rental properties, service technicians, or temporary staff.
HA automation — create time-limited Nuki access code
# rest_command to create Nuki auth (requires Nuki Web API token)
rest_command:
nuki_create_auth:
url: "https://api.nuki.io/smartlock/{{ nukiId }}/auth"
method: POST
headers:
Authorization: "Bearer {{ secrets.nuki_web_token }}"
Content-Type: "application/json"
payload: >
{
"name": "{{ name }}",
"type": 13,
"allowedFromDate": "{{ from_date }}",
"allowedUntilDate": "{{ until_date }}",
"allowedWeekDays": 127,
"code": {{ code }}
}
# Trigger from HA script called by KNX or calendar event
script:
create_guest_code:
sequence:
- service: rest_command.nuki_create_auth
data:
nukiId: "{{ states('sensor.nuki_lock_id') }}"
name: "Guest {{ now().strftime('%Y-%m-%d') }}"
from_date: "{{ now().isoformat() }}"
until_date: "{{ (now() + timedelta(days=3)).isoformat() }}"
code: "{{ range(1000, 9999) | random }}"
- service: notify.mobile_app
data:
message: "Guest code created for 3 days"For local-only installations without Nuki Web API, guest codes can be managed directly in the Nuki app by the homeowner. The HA integration does not expose local keypad code management — this requires the Nuki cloud API. For fully local operation, use time-limited KNX relay outputs or access schedules at the KNX panel level instead.
Use case examples
"Departure" KNX scene — lock + arm Ajax alarm
Resident presses "Departure" KNX pushbutton at exit. KNX logic simultaneously: (1) sends telegram to HA → HA locks Nuki, (2) sends KNX telegram to Ajax alarm integration → alarm armed. Confirmation: Nuki state telegram returns locked → KNX display indicator turns red. Total sequence time: ~300ms.
Arrival pushbutton — unlock and welcome scene
KNX pushbutton at apartment door (or fingerprint reader) sends unlock telegram → HA unlocks Nuki in ~100ms. Simultaneously KNX activates Welcome scene: hallway lights on, HVAC setpoint to comfort mode, window blinds to last position. Door opens, DoorSense confirms → HA logs entry event.
Hotel room RFID card → KNX → HA → Nuki unlock
Guest inserts RFID card in KNX card reader at room door. KNX telegram on room GA → HA automation checks time validity (automation logic) → unlocks Nuki on room door (mounted inside). Welcome scene activates via KNX: lights on at 80%, temperature to 22°C, welcome music starts. Card removal after 30s triggers lock after delay.
Access logging — InfluxDB and HA Logbook
Every Nuki lock action (who, what, when) is available in Home Assistant as sensor state with attributes. For security audit purposes, log all events to InfluxDB for long-term retention and query capability.
configuration.yaml — InfluxDB logging for Nuki events
influxdb:
host: 192.168.1.100
port: 8086
database: home_assistant
username: !secret influx_user
password: !secret influx_pass
include:
entities:
- lock.front_door
- binary_sensor.front_door_door
- sensor.front_door_last_action
- sensor.front_door_battery
# HA Logbook also records all lock state changes automatically
# Access via HA → Logbook → filter by lock.front_door
# Query example in InfluxDB / Grafana:
# SELECT "value" FROM "lock.front_door"
# WHERE time > now() - 30d
# GROUP BY "action"
# → shows lock/unlock count per day over 30 daysThe HA Logbook provides a human-readable event log accessible via the web UI. For compliance or insurance purposes, InfluxDB with Grafana provides query-able historical data — you can answer questions like "who unlocked the apartment door on Tuesday at 14:30?" or "how many times was the lock accessed last month?". Nuki also retains the last 100 events in its own activity log (visible in the Nuki app).
Access control integration in your KNX panel
We pre-wire door controller outputs, RFID reader bus, and video intercom relay contacts into CE-certified panels ready for on-site connection.
Request a quote →