[APP][Pro] Nuki Direct

Spend the day to do a redesign of the NUKI - Homey integration to adress three issues that I experienced with the “official” NUKI app:

  1. Delayed event messaging, which results in late triggering of flows (30 ~ 90 sec delay)
  2. Missing open door / unlatch event
  3. Missing username in events for logging and advanced flow triggering (if unlocked by person X, trigger flow Y)

To tackle these issues I ended up connecting three methods of integration:

  1. NUKI Direct app for ultra-fast response times. Standard app functionality is used for triggering lock / unlock actions and listen to lock / unlock events.
  2. HTTP API callback for catching the raw event data, including the “unlatch” event. Required me to use the HTTP request flowcards app to setup a webhook and register this URL withing the NUKI HTTP API on the bridge.
  3. WEB API calls to enrich the basic event data with the username info. Used HTTP request flowcards to enforce a NUKI WEB sync and retrieve the smartlock logfile. Username is extracted from the log and timestamp is used to ensure succesfull sync.

Advanced flow showing the lock / unlock / unlatch events including username:

End result in our private smarthome Slack channel:

Important closing notes:

  • Response times of this setup. The lock / unlock events (without username) are < 1 second. The unlatch event (without username) is ~10 seconds. The full event data including username takes 60 seconds due to the NUKI WEB log sync delay. Up to you to choose the right balance between speed and data enrichtment which suits your needs.
  • I found it is key to enable lock/unlock notifications in the NUKI app which promotes the WEB-log-sync to a higher priority (semi-real time instead of intervalled batch processing).
  • This setup is hacked together and I found it to be working stable. Nevertheless a more robust solution is desired and is currently in development by NUKI through the new MQTT implementation. This includes all of the required functionality and can’t wait for the release. Please find more info here.

If any additional info on the integrations, API-calls or Homeyscript is of use: let me know!

1 Like