Nuki V2.0 support

So as Athom on Slack wrote it works for those who have installed the Non-Athom-Nuki-App before they removed them.

Thnx for the replyā€™s, yes im using the bridge with fixed ip. It worked well with the community app. But the athom app says re-authorise

Interesting.
I am using the Nuki App by Athom and had no prob to pair the device. :thinking::man_shrugging:
That one has been updated latest on 18.01.19

Ok, iā€™ve updated the app and readded the lock, lets see what happens

1 Like

Nope, still the same issue.

Huhā€¦ I got v1.0.3 installed and the Nuki App on my iOS (of course).
Did you pair it in the iOS / android App before?

Jep ive got the 1.0.3 and paired it with the iOS app first with is working fine. i saw that 1.0.4 is availible so i will give that a try

For aynone that is interested. I have created an alternative Nuki app for my own use. If your are interested, it can be found here: https://github.com/jghaanstra/nuki.homey

Below are the reasons why I created it.

This is an alternative Homey app for the Nuki Smart Lock. The official app in the Homey app store created by Athom uses the web API for communication with your Nuki. This app polls your device for changes in the lockstate which reduces the battery life of your Nuki and depends on an internet connection between your Nuki Bridge and the Nuki cloud. This alternative app only requires internet access during pairing of your Nuki but relies completely on local communication between Homey and your Nuki for updates in lockstate changes. When your Nuki changes the lockstate it will notify Homey directly of the changed lockstate without the need to poll your Nuki. Another difference it that it brings back the other possible lockactions like ā€œLock n Goā€ which are missing in the official Homey app. So benefits from this app of the official app are:

  • no internet connection needed for communication between Homey and Nuki
  • no polling needed for lockstate updates
  • faster response times because direct communication
  • being able to set all possible lock actions

The app works similar to the previous community app (which was removed from the app store when Athom published their app) but has been completely rewritten with the following additions:

  • SDK2 and therefor future proof
  • auto discovery of Nuki Smart Locks during pairing (no manual entries)
  • better mechanism for adding the callback URL to Nuki (needed for sending lockstate changes from Nuki to Homey)
  • better icons
  • custom capabilities for lockstate and lockaction
  • less code, smaller footprint
6 Likes

Hey @Phuturist this is awesome! Thanks, I have already uninstall Athomā€™s Nuki app.
Very fast response indeed. It locks and unlocks almost instantly.

@PhilS check this out ^^^^

A couple of things:

  • when I try lock/unlock from the app (first page, the round button with the lock icon) I get ā€œError sending value (path is to defined)ā€ and no lock/unlock. It works from the second page, thought (Choose actionā€¦)
  • do you think you can get rid of the IP address on the main icon? It kinds of clogs the icon

EDIT: forget the second thing, of course I could have edited the nameā€¦ :roll_eyes:

1 Like

Iā€™ll look into that soon, is probably some small bug in the code somewhere.

1 Like

v1.0.1 - 2019-03-13

  • FIX: small fix for quick action

That was fast. The quick action works well now.
Thank you.

wow cool @Phuturist!
i will test when i am at home later this day!
thx @danone

@Phuturist Iā€™d say : publish it as ā€œNuki (local)ā€ or something like that. Iā€™m still planning to do that with the Lifx-app once I find time to rewrite it :+1:

I doubt it if Athom is gonna allow that. I assume the previous community app was taken out of the app store for a reason.

Mostly because they donā€™t want two apps doing the same thing. But also because their app was Homey2.0 ready and mine wasnā€™t yet. And I was busy enough so didnā€™t mind (Emile asked me if it was okay).

Hi Phuturist,

I really want to try to use your app but I am experiencing a problem adding my 2 Nuki locks (v2) to the app. I got timeouts, error 503, and auth failed, reason: connect EHOSTUNREACHā€¦

Can you help me adding my locks?

Thanks in advance

Eddy

This is what happens during the pairing process.

  1. The app calls https://api.nuki.io/discover/bridges which returns all registered bridges with the same IP from which the call is made.
  2. The app then calls http://ip-from-bridge:port/auth to enable (if not enabled yet) and retrieve a new or if already present an existing auth token.
  3. With the auth token the app then retrieves all registered locks from this bridge and adds it to the temporary list of devices for pairing

This all works fine when using one lock. Perhaps it does not when pairing two locks, Iā€™m unable to test this. Here are a couple of things to check:

  • Manually check the URL from step one and see if you bridge is discovered, if it cant you need to enable it in the bridge settings
  • Are you pushing the button on the bridge during pairing and does the led go from solid to blinking after that?
  • Disable any other app that also communicates with the bridge (error 503 is means the bridge can not be reached and I have noticed that if itā€™s busy with another task it will drop other requests)

And how many bridges do you have to control these two smart locks. Are they paired with the same bridge?

The 503 happened to me a lot, when the bridge is busy. Itā€™s a really slow device that canā€™t handle anythingā€¦ if you connect to it twice, it will probably timeout.

Had a lot of problems with that while developing my v1 Nuki app.

1 Like

v1.0.2 - 2019-03-13

  • FIX: small workaround for random 503 errors from Nuki Bridge