Nuki lock setup

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

The family is really enthusiastic about the Nuki lock and the easy way to control the lock. Because of this I want to add another lock on the garage door. This second lock would still be in the range of the Nuki Bridge. Do I only need to buy another lock or is a second bridge required as well? Of course both locks needs to be controlled from Domoticz.
User avatar
heggink
Posts: 978
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Nuki lock setup

Post by heggink »

The plugin should support multiple locks per bridge but I haven't tested it myself since the distance between my 2 locks is too big for a single bridge.
Maybe someone else can report on multiple locks per bridge. If there were to be any issues, I am sure we can fix them.

Verstuurd vanaf mijn SM-G980F met Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

heggink wrote: ↑Monday 28 September 2020 23:28 The plugin should support multiple locks per bridge but I haven't tested it myself since the distance between my 2 locks is too big for a single bridge.
Maybe someone else can report on multiple locks per bridge. If there were to be any issues, I am sure we can fix them.

Verstuurd vanaf mijn SM-G980F met Tapatalk
Ok, thanks for the feedback. Good news. I will order an extra lock and do some testing. I will post the outcome in this forum. And if there are any issues, I will let you know. Thanks for the great support, really appreciated.
User avatar
heggink
Posts: 978
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Nuki lock setup

Post by heggink »

Not sure if you noticed but the app gives an option to register for the nuki family. When you do, you get sent a voucher of I think €20... Easy money...

Verstuurd vanaf mijn SM-G980F met Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

heggink wrote: ↑Wednesday 30 September 2020 13:38 Not sure if you noticed but the app gives an option to register for the nuki family. When you do, you get sent a voucher of I think €20... Easy money...

Verstuurd vanaf mijn SM-G980F met Tapatalk
Done already :-) Thanks for the tip. Expecting the 2nd lock tomorrow.
User avatar
heggink
Posts: 978
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Nuki lock setup

Post by heggink »

Exciting! Can't wait to hear if it works!

Verstuurd vanaf mijn SM-G980F met Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

2nd lock installed and seems to be working fine (only up and running for 4 hours).

What is unclear for me is the installation comment:
Multiple bridges REQUIRE SEPARATE PORTS!!!
If not then the messages from one bridge will be sent to the plugin of the other and vice versa
Not sure how this can be installed/configured. Do I need to create/install two Nuki HW's? Currently I've one and both locks are added.
Screenshot 2020-10-01 at 16.42.33.png
Screenshot 2020-10-01 at 16.42.33.png (365.48 KiB) Viewed 1530 times
User avatar
heggink
Posts: 978
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Nuki lock setup

Post by heggink »

This only applies if you have multiple bridges (eg one bridge or lock).

Basically, the bridge will send status updates for every lock to domoticz to the IP/port configured. When you have multiple bridges, you need to install multiple plugin instances with their own port to make sure that the messages all end up with the right plugin instance.

Verstuurd vanaf mijn SM-G980F met Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

heggink wrote: ↑Thursday 01 October 2020 17:06 This only applies if you have multiple bridges (eg one bridge or lock).

Basically, the bridge will send status updates for every lock to domoticz to the IP/port configured. When you have multiple bridges, you need to install multiple plugin instances with their own port to make sure that the messages all end up with the right plugin instance.

Verstuurd vanaf mijn SM-G980F met Tapatalk
Excellent, that clarifies it. Thanks. And well done for the good dev and support.
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

Sometime I see the following in my error log:

Code: Select all

2020-10-20 15:00:00.254 Error: (NukiFrontDoor) NUKI HTTPError code: 503
2020-10-20 15:00:00.350 Error: (NukiFrontDoor) NUKI HTTPError code: 503
Any idea what this is and where this error message is originating from? How can this be resolved?

Thanks.
User avatar
heggink
Posts: 978
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Nuki lock setup

Post by heggink »

These happen every now and then. The plugin polls the lock to make sure it doesn't get out of sync in case a message is lost from the lock to domoticz (if you press the button on the lock or use the app to switch).

Every now and then, the bridge returns a HTTP 503 - service unavailable. No idea why, it just does.

Since the lock gets polled again later, the status will eventually update IF the lock was changed at all.

There is also a small chance that this happens as a result of trying to switch the lock from domoticz. So far, I have never had that the lock didn't switch despite having seen a few 503's myself.

Ideally, I should build in a resend when getting the 503 but that has not happened so far since these messages are very rare and I have not experienced any real issues myself (and therefore just ignored them).

If you find that this (ignoring them) leads to unexpected behaviour then let me know and I will see if I can add a resend.

H
Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

heggink wrote: ↑Tuesday 20 October 2020 16:32 These happen every now and then. The plugin polls the lock to make sure it doesn't get out of sync in case a message is lost from the lock to domoticz (if you press the button on the lock or use the app to switch).

Every now and then, the bridge returns a HTTP 503 - service unavailable. No idea why, it just does.

Since the lock gets polled again later, the status will eventually update IF the lock was changed at all.

There is also a small chance that this happens as a result of trying to switch the lock from domoticz. So far, I have never had that the lock didn't switch despite having seen a few 503's myself.

Ideally, I should build in a resend when getting the 503 but that has not happened so far since these messages are very rare and I have not experienced any real issues myself (and therefore just ignored them).

If you find that this (ignoring them) leads to unexpected behaviour then let me know and I will see if I can add a resend.

H
Thanks for the feedback. the behaviour so far looks all ok. I was just wondering what it was and if it can be resolved. I will leave it for now. THanks.
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

I've another problem with the Nuki plugin after a power-failure in my house:

Code: Select all

2021-12-06 16:21:10.735 Error: NukiDoorLock: (NukiDoorLock) 'onCommand' failed 'IndexError':'list index out of range'.
2021-12-06 16:21:10.736 Error: NukiDoorLock: (NukiDoorLock) ----> Line 420 in '/home/pi/domoticz/plugins/domoticz-nuki/plugin.py', function onCommand
2021-12-06 16:21:10.736 Error: NukiDoorLock: (NukiDoorLock) ----> Line 299 in '/home/pi/domoticz/plugins/domoticz-nuki/plugin.py', function onCommand
2021-12-06 16:21:30.134 Error: NukiDoorLock: (NukiDoorLock) 'onStop' failed 'AttributeError':'httpServerConn'.
2021-12-06 16:21:30.134 Error: NukiDoorLock: (NukiDoorLock) ----> Line 407 in '/home/pi/domoticz/plugins/domoticz-nuki/plugin.py', function onStop
2021-12-06 16:21:30.135 Error: NukiDoorLock: (NukiDoorLock) ----> Line 246 in '/home/pi/domoticz/plugins/domoticz-nuki/plugin.py', function onStop
Any suggestion what is wrong?
User avatar
heggink
Posts: 978
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Nuki lock setup

Post by heggink »

Not really. This line retrieves the lock id.from the locks table but the number of locks is out of range. As if some data got corrupted with the power failure. If you dig deep, you may be able to find what's wrong but it's probably easiest to write down the settings for the nuki plugin, delete and recreate it.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

Thanks for the quick response.

I deleted the Niki Plugin and added it again to Domoticz. That solves some of the problem, I can control the lock again. But I'm missing some switches.

Previously I had two switches that showed the lock status, if the door was open or not. I don't have them now anymore! Did I do something wrong?
Screenshot 2021-12-06 at 17.05.41.png
Screenshot 2021-12-06 at 17.05.41.png (128.42 KiB) Viewed 1146 times
For each lock there were 3 switches created, 1) Door Status, 2) Lock/Unlock door, 3) Open the Door.
But I only have 2 now.
User avatar
heggink
Posts: 978
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Nuki lock setup

Post by heggink »

Is this using the same plugin version?
Remind me again which version of the lock you have: with or without door sensor?

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

heggink wrote: ↑Wednesday 08 December 2021 0:16 Is this using the same plugin version?
Remind me again which version of the lock you have: with or without door sensor?

Sent from my SM-G980F using Tapatalk
I've two Nuki door locks with the door sensors and the bridge of course.

The plugin I'm using is the same as from Github. From the config file: url = https://github.com/heggink/domoticz-nuki

Does this info helps?
xKingx
Posts: 15
Joined: Tuesday 03 June 2014 11:23
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Holland
Contact:

Re: Nuki lock setup

Post by xKingx »

Is there a way to get the status of the door operated by the Nuki device into Domoticz, i.e. if opened or closed? Would it work with a door sensor or is there something to be read from the lock or bridge directly?

Scenario wise, I would like to turn on lights in my hallway when the door is opened (wether just opened or really unlocked) so the person entering has a light the moment he/she enters. I can manage the scripts, but need to get a status somehow.
Raspberry Pi running Domoticz image
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nuki lock setup

Post by rgroothuis »

When you have added the Nuki plugin you get 3 switches into your Domoticz, one is for the door status (open or closed), the other one indicates if the lock itself is locked, unlocked and with the last switch you can open the door. So what you want is absolutely possible.
xKingx
Posts: 15
Joined: Tuesday 03 June 2014 11:23
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Holland
Contact:

Re: Nuki lock setup

Post by xKingx »

Thanks. It would mean I need a door sensor correct? At the moment I only have 2 switches (so not the openor closed switch) and am not in posession of a door sensor itself.
Raspberry Pi running Domoticz image
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest