Skip to content

Nuki Bridge Firmware Arduino Framework

This configuration inherits all features from the Stock Firmware and adds a Nuki Bridge component via BLE. Note that it does not support Improv via Bluetooth LE, as the BLE stack is used by the Nuki Bridge component.

Update Firmware

There are several ways to update the firmware:

  • ESPHome OTA Requires ESPHome Dashboard
  • HTTP OTA Latest release build, no customization
  • Web Serial Latest release build, no customization

You can connect your Doorman via USB-C and click the button below to install the latest Doorman Nuki Bridge Firmware directly through Web Serial.

Firmware YAML

This is the minimal ESPHome configuration YAML file. Be sure to update the API key.

Minimal Nuki Bridge Firmware
yaml
# Doorman S3 Nuki Bridge Firmware

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  # log_level: "ERROR"
  # led_pin: "GPIO1"
  # rgb_led_pin: "GPIO2"
  # relay_pin: "GPIO42"
  # external_button_pin: "GPIO41"

# Import Doorman Nuki Bridge Firmware Config
packages:
  AzonInc.Doorman-Nuki-Bridge: github://AzonInc/doorman/firmware/doorman-nuki-bridge.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

Pairing your Nuki Lock

Depending on the PCB revision, either press the FLASH or PRG button on the Doorman PCB for 5 seconds until the status LED starts flashing purple, or enable the Nuki Pairing Mode switch in Home Assistant. Then, press the button on your Nuki Lock for 5 seconds until the light ring turns on.

After a successful pairing, the status LED will remain steadily on for 3 seconds.

WARNING

If your Nuki Lock is already paired, this process will unpair it!

Unpairing your Nuki Lock

You can unpair your device using either the Nuki Unpair Device button in Home Assistant or the physical FLASH or PRG button on the Doorman PCB.

Physical Button

If your lock is already paired with Doorman, press the FLASH or PRG button on the Doorman PCB for 5 seconds until the RGB status LED starts flashing purple. Your Nuki Lock will then be unpaired. Note that the pairing mode will time out after 30 seconds.

Examples

Create a simple TC Command Binary Sensor

You can easily add additional binary sensors for any TC Command, alongside the preconfigured ones.

Command Builder:

yaml
# Doorman S3 Firmware
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"

# Import Doorman Stock Firmware Config
packages:
  AzonInc.Doorman: github://AzonInc/doorman/firmware/doorman-stock.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

binary_sensor: 
  - platform: tc_bus
    name: "Custom Command"
    type: open_door
    address: 0
    web_server: 
      sorting_group_id: sorting_group_listeners

32-Bit Commands:

yaml
# Doorman S3 Firmware
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"

# Import Doorman Stock Firmware Config
packages:
  AzonInc.Doorman: github://AzonInc/doorman/firmware/doorman-stock.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

binary_sensor: 
  - platform: tc_bus
    name: "Custom Command"
    command: 0x00001100
    web_server: 
      sorting_group_id: sorting_group_listeners
Controlling the internal RGB Status LED

If you want to control the onboard RGB LED with a button (for example), simply use the Light ID: doorman_rgb_status_led.

yaml
# Doorman S3 Firmware
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"

# Import Doorman Stock Firmware Config
packages:
  AzonInc.Doorman: github://AzonInc/doorman/firmware/doorman-stock.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

button: 
  - platform: template
    name: "Turn on Status RGB LED to red"
    on_press: 
      - light.turn_on: 
          id: doorman_rgb_status_led
          red: 100%
          green: 0%
          blue: 0%
Use the External Hardware Button

If you want to use the external button to trigger automations, you can simply extend your YAML configuration.

yaml
# Doorman S3 Firmware
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"

# Import Doorman Stock Firmware Config
packages:
  AzonInc.Doorman: github://AzonInc/doorman/firmware/doorman-stock.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

binary_sensor: 
  - id: !extend doorman_external_button
    on_press: 
      - logger.log: "External button pressed!"
Use I²C Sensors

If you want to add sensors via the I²C bus, you can use the two available GPIO pins and add the I²C component to your configuration. You can then attach your sensors to these two I²C GPIO pins.

yaml
# Doorman S3 Firmware
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"

# Import Doorman Stock Firmware Config
packages:
  AzonInc.Doorman: github://AzonInc/doorman/firmware/doorman-stock.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

i2c: 
  sda: GPIO40
  scl: GPIO48
  scan: true
  id: i2c_bus

Advanced Examples

Home Assistant

Sending Bus commands

You can use Home Assistant actions (formerly known as services) to send commands on the bus. Either use the command to send raw commands or type, address, payload and serial_number to send commands via the command builder.

INFO

Remember to include the leading 0x when calling the action with the command property. If you omit it, you'll need to convert the HEX command to a decimal number first.

Command Builder:

yaml
service: esphome.doorman_s3_send_tc_command
data:
  type: open_door
  address: 0
  payload: 0
  serial_number: 123456

32-Bit Commands via command:

yaml
service: esphome.doorman_s3_send_tc_command_raw
data:
  command: 0x11E24080
Listening for ESPHome events

Doorman will send esphome.doorman events to Home Assistant every time a command is received.

Each event is structured as follows:

yaml
event_type: esphome.doorman
data:
  device_id: 373c62d6788cf81d322763235513310e
  command: "00001100"
  type: "open_door"
  address: "0"
  payload: "0"
  serial_number: "0"
origin: LOCAL
time_fired: "2024-08-12T12:34:13.718317+00:00"
context:
  id: 01J5399Y2PP2XS2VRYKBT3H3AV
  parent_id: null
  user_id: null

Automation Example (HEX Command):

yaml
alias: Trigger on Doorman TC Open Door Command
description: ""
trigger:
  - platform: event
    event_type: esphome.doorman
    event_data:
      command: "00001100"
condition: []
action: []
mode: single

Automation Example (Command Builder):

yaml
alias: Trigger on Doorman TC Open Door Command
description: ""
trigger:
  - platform: event
    event_type: esphome.doorman
    event_data:
      type: "open_door"
condition: []
action: []
mode: single

ESPHome

Create Your Own Doorbell Pattern

If you want to create a custom doorbell pattern, you can easily extend the existing doorbell entities. For more information about patterns, refer to the ESPHome Docs.

yaml
# Doorman S3 Firmware
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"

# Import Doorman Stock Firmware Config
packages:
  AzonInc.Doorman: github://AzonInc/doorman/firmware/doorman-stock.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Extend the doorbell_pattern event entity
# Add a new apartment_special event type
event: 
  - id: !extend doorbell_pattern
    event_types: 
      - "apartment_special"

# Extend the apartment_doorbell / entrance_doorbell entity
# and add your new special pattern
binary_sensor: 
  - id: !extend apartment_doorbell
    on_multi_click: 
      # Special Pattern
      - timing: 
          # Press twice with no more than one second between each press.
          - ON for at most 0.5s
          - OFF for at most 1s
          - ON for at most 0.5s
          - OFF for at least 2s
        then: 
          - logger.log: "Special pattern detected!"
          - event.trigger: 
              id: doorbell_pattern
              # Use the previously defined new event type here
              event_type: apartment_special
Turn on the light when someone rings the entrance doorbell

You can turn on the light when someone rings the entrance doorbell.

yaml
# Doorman S3 Firmware
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"

# Import Doorman Stock Firmware Config
packages:
  AzonInc.Doorman: github://AzonInc/doorman/firmware/doorman-stock.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

binary_sensor: 
  - id: !extend entrance_doorbell
    on_press: 
      - tc_bus.send: 
          type: "light"

If you want to account for the sun's elevation as well, you can adjust it accordingly.

yaml
# Doorman S3 Firmware
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"

# Import Doorman Stock Firmware Config
packages:
  AzonInc.Doorman: github://AzonInc/doorman/firmware/doorman-stock.yaml@master

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Import the Home Assistant sun elevation sensor
sensor: 
  - platform: homeassistant
    id: sun_elevation
    entity_id: sun.sun
    attribute: elevation

# Extend the entrance doorbell sensor
binary_sensor: 
  - id: !extend entrance_doorbell
    on_press: 
      # Sun elevation is <= 0 (dark)
      - if: 
          condition: 
            sensor.in_range: 
              id: sun_elevation
              below: 1
          then: 
            # Turn on the light
            - tc_bus.send: 
                type: "light"

Released under the GPL 3.0 License.