Skip to main content

Open an electric door using Nuki smartlock status

Project description

Nuki Sesami

Open an electric door equipped with an Nuki 3.0 Pro smart lock.

Requirements

The following components are required when using this package:

Installation and setup

The package can be installed on the Raspberry PI board as per usual:

pip3 install nuki-sesami

Installation and configuration of the mosquitto broker:

sudo apt update
sudo apt install mosquitto
sudo systemctl enable mosquitto
mosquitto_passwd /etc/mosquitto/passwd nuki <secret1>
mosquitto_passwd /etc/mosquitto/passwd sesami <secret2>

Ensure mqtt is enabled and running on the Nuki Smart Lock using the smartphone app. Use the same credentials as above for the nuki user.

Activate nuki-sesami as systemd service:

sudo nuki-sesami-systemd %USER <nuki-device-id> -H <mqtt-broker-hostname> -U sesami -P <secret2>

In the BATS programming menu of the ERREKA door controller ensure the external switch for manual changing the operating mode is activated:

  • Function FC01 == OFF, the door will be in open/close mode when switch is in position I
  • Function FC07 == ON, the door will be in open and hold mode when switch is in position II

Use wiring connection as depicted in the diagram below:

nuki-sesami-wiring

Usage

Once the system has been setup as described above, the smartlock can be operated as per usual using the Nuki smartphone app and/or other Nuki peripherals; like for instance the Nuki Fob. As soon as the smartlock state changes from unlatching to unlatched the electric door will be opened by means of the relay board using a short on/off puls on Relay CH1.

The relay board can also be operated manually using a pushbutton. This is useful when the door needs to be opened without the Nuki app or Nuki peripherals and/or change the door operating mode. The pushbutton logic can be as follows:

  • pushbutton-openhold When pressing the pushbutton once the smartlock will be unlatched and the door will be opened and held open (openhold mode) until the pushbutton is pressed again (default logic).

  • pushbutton-open When pressing the pushbutton once the smartlock will be unlatched and the door will be opened. After a few seconds the door will automaticaly be closed again.

  • pushbutton-toggle When pressing the pushbutton once the smartlock will be unlatched and the door will be opened. If during the opening phase the pushbutton is pressed again, the door will be kept open (openhold mode) until the pushbutton is pressed again. Otherwise the door will be closed again after a few seconds.

Please note that when the system starts up, the door will be in open/close mode; i.e. Relay CH3 will be active and Relay CH2 will be inactive. This is to ensure the door can be opened and closed as per usual. When the system is in in openhold mode the relay states will be flipped; i.e. the Relay CH3 will be inactive and Relay CH2 will be active.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nuki_sesami-1.0.0.tar.gz (65.3 kB view hashes)

Uploaded Source

Built Distribution

nuki_sesami-1.0.0-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page