This project is no longer maintained. Please use the highly reliable https://github.com/technyon/nuki_hub project
Use this instead of the Nuki Bridge device.
Important - if you are experiencing delays using RPI, it is advised to use a bluetooth dongle instead of the builtin bluetooth hardware. TP-LINK UB400 is verified to be working.
- This is heavily inspired by the work of Jandebeule.
- Forked from dauden1184 's RaspiNukiBridge
- Similar project here
- Nuki documentation
There are 2 methods:
- As a Home Assistant Addon
- Use this if your Home Assistant is nearby the Nuki Smart Lock
- Outside of Home Assistant
- Use this if your Home Assistant too far from the Nuki Smart Lock
DOWNGRADE Bluez. See comment.
wget http://ftp.hk.debian.org/debian/pool/main/b/bluez/bluez_5.50-1.2~deb10u2_armhf.deb sudo apt install ./bluez_5.50-1.2~deb10u2_armhf.deb
Reboot the Raspberry Pi
-
Clone the repository.
git clone https://github.com/dauden1184/RaspiNukiBridge.git
-
Go to the addon directoy.
cd nuki_bridge
-
Install the requirements.
pip install -r requirements.txt
-
Go to pairing
Create a new systemd service:
sudo nano /etc/systemd/system/nukibridge.service
Put this content in the file (change 'user' and 'WorkingDirectory' to your needs):
[Unit]
Description=Nuki bridge
After=network-online.target
[Service]
Type=simple
Restart=always
RestartSec=1
User=pi
WorkingDirectory=/home/pi/RaspiNukiBridge/nuki_bridge
ExecStart=python .
[Install]
WantedBy=multi-user.target
Enable the service and start it:
sudo systemctl daemon-reload
sudo systemctl enable nukibridge.service
sudo systemctl start nukibridge.service
If you want to do add the repository manually, please follow the procedure highlighted in the Home Assistant website. Use the following URL to add this repository: https://github.com/regevbr/RaspiNukiBridge
-
Go to Home Assistant -> Configuration -> Add-ons, backups & Supervisor -> add-on store (in the bottom right corner)
-
On the top right overflow menu ⋮ click the "Check for updates" button
-
Install the addon. It takes a few minutes.
-
Don't start it yet!
-
Press the button of the Nuki Smart Lock for 6 seconds. It should light up.
-
Run
-
If installed as addon, click
start
-
If installed outside HA, run
python .
-
-
Look in logs for:
******************************************************************** * * * Pairing completed! * * Access Token * * abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca * * * ********************************************************************
-
Copy the
Access Token
for a following step.In case you missed it, restart the service and check again.
-
Before moving on, you might need to restart the addon. First run is less stable.
- Install either
- Configure the Nuki Addon:
- Paste your token from the log above
- Address is
127.0.0.1