mapero / ESPHome_nuki_lock

ESPHome lock platform for Nuki Smartlock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nuki Lock for ESPHome (ESP32)

This module builds an ESPHome lock platform for Nuki Smartlock (nuki_lock) that creates 4 new entities in Home Assistant:

  • Lock
  • Binary Sensor: Critical Battery
  • Sensor: Battery Level
  • Binary Sensor: Is Paired
  • Binary Sensor: Door Sensor
  • Text Sensor: Door Sensor State

The lock entity is updated whenever the look changes state (via Nuki App, HA, or manually) using Nuki BT advertisement mechanism.

screenshot

How to use

Add the following to the ESPHome yaml file:

esphome:

  libraries:
  - Preferences
  - https://github.com/nkolban/ESP32_BLE_Arduino/
  - https://github.com/uriyacovy/NukiBleEsp32

external_components:
  - source: github://uriyacovy/ESPHome_nuki_lock

lock:
  - platform: nuki_lock
    name: Nuki Lock
    is_paired: 
      name: "Nuki Paired"
    battery_critical:
      name: "Nuki Battery Critical"
    battery_level:
      name: "Nuki Battery Level"
    door_sensor:
      name: "Nuki Door Sensor"
    door_sensor_state:
      name: "Nuki Door Sensor State"

After running ESPHome (esphome run <yamlfile.yaml>), the module will actively try to pair to Nuki. To set Nuki for paring mode, press the button for 5 seconds until the led turns on. Once Nuki is paired, the new ESPHome entities will get the updated state.

Unparing Nuki

To unpair Nuki, add the following to ESPHome yaml file below platform: nuki_lock section and run ESPHome again:

    unpair: true

Dependencies

The module depends on the work done by I-Connect, https://github.com/I-Connect/NukiBleEsp32

This library requires also https://github.com/nkolban/ESP32_BLE_Arduino/ and Arduino library Preferences.

Tested Hardware

  • ESP32 wroom
  • Nuki smart lock v3

About

ESPHome lock platform for Nuki Smartlock

License:MIT License


Languages

Language:C++ 77.4%Language:Python 22.6%