Nuki Opener + Lock + Sonos | ring suppression issues workaround

Hello everyone,

Here is a little tutorial about my problem with the Nuki Opener and Lock. Again a problem that could be solved by openHAB.

devices:

  • Nuki Opener
  • Nuki Smart Lock 2.0
  • Sonos Beam, Sonos One
  • intercom STR HT2002/2 (Analog intercom)

Problem:

  1. Ringer suppression on the opener didn’t work. With Ring to Open or the continuous mode, the doorbell rang in the apartment anyway. Even increasing the time how long it is suppressed did not help.
    Nuki support informed me that the intercom system is not supported. So there is nothing that can be done and an openHAB solution is needed.

  2. With ring to open or permanent mode, the lock should also open the door, so that you don’t have to take a key or similar with you if you only go outside the door for a short time.

Solution 1:
The ringing signal is not forwarded to the intercom. When someone rings, a sound is played through the Sonos boxes. The ring suppression is enabled by the rules. Intercom ringtone recorded with the mobile phone and saved as mp3 on openHAB in the folder /etc/openhab/sounds. Ring suppression works with the Ring to Open solution and the always-on mode.

Hardware:
The opener is connected to the intercom normally according to the instructions. The only difference is that the green wire from the opener is not connected to the intercom. As a result, the ring signal is not forwarded to the intercom. Let the line hang freely in the intercom with another Wago clamp or insulating tape.

Software:

Things:

Bridge nuki:bridge:NB1 "Bridge" [ ip="192.168.1.89", port=8080, apiToken="xxxxxxxxx", manageCallbacks=true, secureToken=true ] {
    Thing smartlock SL1 "door" [ nukiId="1234abcd", deviceType=0, unlatch=false ]
    Thing opener OP1 "frontdoor" [ nukiId="abcd1234" ]
}

Items:

//Lock
Number I_door_LockState     "door"    <door>    { channel="nuki:smartlock:NB2:SL1:lockState" }

//Opener
Number I_frontdoor_openerState       "frontdoor" <frontdoor>  { channel="nuki:opener:NB2:OP1:openerState" } 
Number I_frontdoor_openerMode       "frontdoor" <frontdoor>   { channel="nuki:opener:NB2:OP1:openerMode" }

//Switch for Delay
Switch I_frontdoor_RingtoOpenState

Rule:

// Delay | Necessary, because otherwise the opener changes status too quickly for the following rules
rule "Ring to Open state ON"
when 
    Item I_frontdoor_openerState changed to 3
then
sendCommand(I_frontdoor_RingtoOpenState,ON)
end

rule "Ring to Open state OFF"
when 
    Item I_frontdoor_openerState changed to 1   
then
Thread::sleep(2000)
sendCommand(I_frontdoor_RingtoOpenState,OFF)
end

//ring suppression | each box has its own rule, otherwise the sound will be played one after the other.
rule "ring sound office"
when 
    Channel "nuki:opener:NB2:OP1:ringActionState" triggered RINGING
then
if(I_frontdoor_RingtoOpenState.state!=ON && I_frontdoor_openerMode.state!=3){
    playSound("sonos:zoneplayer:RINCON_XXXXXXXXXXXXXXXXX","doorbell.mp3")
}
end
rule "ring sound livingroom"
when 
    Channel "nuki:opener:NB2:OP1:ringActionState" triggered RINGING
then
if(I_frontdoor_RingtoOpenState.state!=ON && I_frontdoor_openerMode.state!=3){
    playSound("sonos:Beam:RINCON_XXXXXXXXXXXXXXXXX","doorbell.mp3")
}
end

Solution 2:
If the doorbell rings and the ring to open or continuous mode is active, the lock should also open the apartment door.

Items and things are the same as in the first solution. The delay rule from the 1st solution is required.

Rule:

rule "ring to open"
when 
    Channel "nuki:opener:NB2:OP1:ringActionState" triggered RINGING
then
if(I_frontdoor_RingtoOpenState.state==ON || I_frontdoor_openerMode.state==3){
    sendCommand(I_door_LockState,3)
}
end