MQTT integration

This article concerns:
  • Smart Lock Ultra
  • Smart Locks (4th Generation)
  • Smart Lock 3.0 Pro

MQTT offers a simple and stable option for integrating your Smart Lock into your home automation. Popular Smart Home hubs such as HomeBridge or Home Assistant can be connected via MQTT. This allows flexible integration into various application scenarios, from simple status updates of your Smart Lock to complete Smart Home automation.

MQTT at a glance

MQTT (Message Queuing Telemetry Transport) is a simple messaging protocol for communication between devices (machine-to-machine communication). In the Internet of Things (IoT), MQTT serves for the interconnectivity of various systems. Devices can be added flexibly to your Smart Home. And without the need of your own adapter or a certain integration being required.
As with other forms of interconnectivity, MQTT has a server (also called a “broker”) and multiple clients:

  • The broker (server) represents the central operating platform of the MQTT message exchange.
    It can be installed on a computer or dedicated device such as a Raspberry Pi. A widespread broker is Mosquitto.
  • A MQTT client is any device (e.g. your Smart Lock) that connects to the broker. Clients publish and/or subscribe messages via the broker via the so-called publish-subscribe-communication. In order to receive messages on a specific topic, the client must subscribe to the respective „topic”.
Note:

You can find the topics you can subscribe to in the specifications.
Nuki offers the Smart Lock ID as a topic to receive updates via messages. Additional sub-topics for subscription could be, for example, lock status, door status, battery status or even the last lock action.

Benefits of your MQTT integration

  • Easy integration into your local network
    MQTT is easy to implement and comprehensive. The number of devices that can be interconnected is very high. You don't need detailed, technical background knowledge to build small home automations yourself.
  • Minimal data transfer
    MQTT is an event-controlled protocol. A client publishes a message one time via the broker. The broker sends information again only to subscribers when new data is acquired. The data transfer is kept to a minimum.
  • Low power consumption
    With MQTT as a communication protocol no active information query takes place. This way MQTT saves significantly more power than the connection via HTTP-API, for example.