2022-06-18 13:02:21 +02:00
2022-04-30 09:14:53 +02:00
2022-06-18 12:37:04 +02:00
2022-06-17 22:22:54 +02:00
2022-06-18 13:02:21 +02:00
2022-03-22 21:10:43 +01:00
2022-03-22 21:10:43 +01:00
2022-04-24 22:51:38 +02:00
2022-03-22 21:10:43 +01:00
2022-06-14 22:50:14 +02:00
2022-06-15 10:36:27 +00:00
2022-06-12 10:52:01 +02:00
2022-06-06 15:55:26 +02:00
2022-06-06 15:55:26 +02:00
2022-06-05 21:46:21 +02:00
2022-06-05 21:46:21 +02:00
2022-06-17 23:25:15 +02:00
2022-06-17 23:25:15 +02:00
2022-04-26 22:12:52 +02:00
2022-06-15 10:36:27 +00:00
2022-06-08 22:50:57 +02:00
2022-05-04 22:54:36 +02:00
2022-06-18 13:01:17 +02:00
2022-06-18 13:01:17 +02:00

About

The NUKI Hub software acts as a bridge between a NUKI Lock and a smart home system. Exposes the lock state (and more) via MQTT, and allows to execute commands like locking and unlocking. Optionally, a NUKI Opener is also supported.

Installation

Flash the firmware to an ESP32. The easiest way to install is to use the web installer:
https://technyon.github.io/nuki_hub/
(Needs a web serial compatible browser like Chrome/Opera/Edge).

As an alternative, download a release:
https://github.com/technyon/nuki_hub/releases
Read the included readme.txt for installation instructions for either Espressif Flash Download Tools or esptool.

Setup

The firmware uses the Wifi Manager to configure the WiFi network. Power up the ESP32, a new Access Point should appear. Connect to this access point and in a browser navigate to "192.168.4.1". Use the web interface configure your Wifi network.

After configuring the Wifi, the ESP should automatically connect to your network. Use the web interface to setup the MQTT broker; just navigate to the IP-Address assigned to the ESP32 via DHCP (often found in the web interface of the internet router).
To configure MQTT, enter the adress of your MQTT broker and eventually a username and a password if required. The firmware supports SSL encryption for MQTT, however most people and especially home users don't use this. In that case leave all fields about "MQTT SSL" blank.

Paring

Just enable pairing mode on the NUKI lock (press button for a few seconds) and power on the ESP32. Pairing should be automatic. When pairing is successful, the web interface should show "Paired: Yes" (reload page in browser). MQTT nodes like lock state and battery level should now reflect the reported values from the lock.

MQTT Interface

Lock

  • lock/action: Allows to execute lock actions. After receiving the action, the value is set to "ack". Possible actions: unlock, lock, unlatch, lockNgo, lockNgoUnlatch, fullLock, fobAction1, fobAction2, fobAction3

  • lock/state: Reports the current lock state as a string. Possible values are: uncalibrated, locked, unlocked, unlatched, unlockedLnga, unlatching, bootRun, motorBlocked

  • lock/trigger: The trigger of the last action: autoLock, automatic, button, manual, system

  • lock/completionStatus: Status of the last action as reported by NUKI lock (needs bluetooth connection): success, motorBlocked, canceled, tooRecent, busy, lowMotorVoltage, clutchFailure, motorPowerFailure, incompleteFailure, invalidCode, otherError, unknown

  • lock/authorizationId: If enabled in the web interface, this node returns the authorization id of the last lock action

  • lock/authorizationName: If enabled in the web interface, this node returns the authorization name of the last lock action

  • lock/commandResult: Result of the last action as reported by NUKI library: success, failed, timeOut, working, notPaired, error, undefined

  • lock/doorSensorState: State of the door sensor: unavailable, deactivated, doorClosed, doorOpened, doorStateUnknown, calibrating

  • battery/level: Battery level in percent

  • battery/critical: 1 if battery level is critical, otherwise 0

  • battery/charging: 1 if charging, otherwise 0

  • battery/voltage: Current Battery voltage (V)

  • battery/drain: The drain of the last lock action in Milliwattseconds (mWs)

  • battery/maxTurnCurrent: The highest current of the turn motor during the last lock action (A)

Opener

  • lock/action: Allows to execute lock actions. After receiving the action, the value is set to "ack". Possible actions: activateRTO, deactivateRTO, electricStrikeActuation, activateCM, deactivateCM, fobAction1, fobAction2, fobAction3

  • lock/state: Reports the current lock state as a string. Possible values are: locked, RTOactive, open, opening, uncalibrated

  • lock/trigger: The trigger of the last action: autoLock, automatic, button, manual, system

  • lock/completionStatus: Status of the last action as reported by NUKI lock (needs bluetooth connection): success, motorBlocked, canceled, tooRecent, busy, lowMotorVoltage, clutchFailure, motorPowerFailure, incompleteFailure, invalidCode, otherError, unknown

  • lock/authorizationId: If enabled in the web interface, this node returns the authorization id of the last lock action

  • lock/authorizationName: If enabled in the web interface, this node returns the authorization name of the last lock action

  • lock/commandResult: Result of the last action as reported by NUKI library: success, failed, timeOut, working, notPaired, error, undefined

  • lock/doorSensorState: State of the door sensor: unavailable, deactivated, doorClosed, doorOpened, doorStateUnknown, calibrating

  • battery/voltage: Reports the current battery voltage in Volts.

  • battery/critical: 1 if battery level is critical, otherwise 0

Misc

  • presence/devices: List of detected bluetooth devices as CSV. Can be used for presence detection

MQTT Encryption

The communication via MQTT can be SSL encrypted. To enable SSL encryption, supply the necessary information in the MQTT Configuration page. The following configurations are supported:

CA, CERT and KEY are empty -> No encryption
CA is filled but CERT and KEY are empty -> Encrypted MQTT
CA, CERT and KEY are filled -> Encrypted MQTT with client vaildation

Connecting via LAN (Optional)

If you prefer to connect to the MQTT Broker via LAN instead of WiFi, you can use a Wiznet W5x00 Module (W5100, W5200, W5500 are supported). To connect, just wire the module and connect the LAN cable:

  • Connect W5x00 to ESP32 SPI0:
    W5x00 SCK to GPIO18
    W5x00 MISO to GPIOGPIO19
    W5x00 MOSI to GPIO23
    W5x00 CS/SS to GPIO5
  • Additionally connect:
    W5x00 reset to GPIO33
  • Last but not least, on the ESP32 bridge GPIO26 and GND. This let's the firmware know that a LAN Module is connected

Wifi is now disabled, and the module doesn't boot into WifiManager anymore.

Disclaimer

This is a third party software for NUKI smart door locks. This project or any of it's authors aren't associated with Nuki Home Solutions GmbH. Please refer for official products and offical support to their website:

https://nuki.io/

For further license details, check the included LICENSE file.

Description
No description provided
Readme MIT 109 MiB
Languages
C++ 91.6%
C 4.3%
HTML 2%
CMake 0.7%
Python 0.5%
Other 0.8%