This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
doorlock

Nuki doorlock

12357

Comments

  • Just released a new version to the app store (not yet approved) which removes the "polling" every 30 or 60 seconds, and instead sets a webhook into the Nuki API. This means, faster triggers and no more battery intense checking.
  • jorden said:
    Just released a new version to the app store (not yet approved) which removes the "polling" every 30 or 60 seconds, and instead sets a webhook into the Nuki API. This means, faster triggers and no more battery intense checking.
    Wow, that's fast!  :) you are the best!
  • I paid 400 euros today to get an SSD disk in my Imac at home, so I thought I'd better use this new speed for a good cause ;)
  • LJSVVLJSVV Member
    I added my Nuki to Homey today, unfortunately Homey does not update the lock state when operating the Nuki manually / auto unlock via app.

    What am I doing wrong??

    Locking and Unlocking works when controlling via Homey.
  • jordenjorden Member
    Can you try to stop and start the Nuki app on Homey, to see if that fixes it?

    And see if you can open http://<ip of Nuki bridge>:<port of Nuki bridge>/callback/list?token=<token here> to see if it lists the IP of your Homey there. Otherwise you can fix it manually and I might have to fix the app :)
  • LJSVVLJSVV Member

    Thanks,

    Stopping and starting the app does refresh the actual lockstate. But after that the status isn't refreshed anymore.

    Opening the callback list returns:

    {"callbacks": [ ] }


  • jordenjorden Member
    Ah then I have something to fix in the app. You can, for now, manually fix it by calling the following URL in your browser (just once):

    http://<ip of Nuki bridge>:<port of Nuki bridge>/callback/add?url=http://<HOMEY IP>/api/app/io.nuki.smartlock/webhook&token=<token here>

    Hope that works for you :)
  • LJSVVLJSVV Member

    Added this manually, still doesn't work.

    I've added the token which I found after going to maintain bridge in the Nuki app. So this is correct?

    When I navigate to the url http://<HOMEY IP>/api/app/io.nuki.smartlock/webhook&token=<token here> it returns an error 404.

  • jordenjorden Member
    The &token part should be part of the URL of the Nuki Bridge, not of the Homey path.

    I will try to fix the Nuki app ASAP but will have to do that at home, I don't have a Nuki here at the office.
  • LJSVVLJSVV Member

    Yes I know, but tried wat happens when I navigate to the api url itself.

    How can I delete the token from the callback page of the bridge?

    I will temporarily delete the smartlock from Homey because I don't want unplanned actions ;-)

  • jordenjorden Member
    If you don't make any flows in Homey, Homey will not do anything to your Nuki so it's safe to keep it running. But ofcourse you can always wait until I have the update ready.
  • jordenjorden Member
    @LJSVV I have added an update to this app which fixes the bug you experience. It also is a lot more "battery friendly" for your Nuki lock.... I had to replace my batteries for the third time already. 

    The app is not yet approved in the appstore, but it is coming (version 0.1.8)
  • LJSVVLJSVV Member
    edited July 2017
    jorden said:
    @LJSVV I have added an update to this app which fixes the bug you experience. It also is a lot more "battery friendly" for your Nuki lock.... I had to replace my batteries for the third time already. 

    The app is not yet approved in the appstore, but it is coming (version 0.1.8)
    Thanks! As soon as it will land in the AppStore I will give it a try.
  • Hi @jorden.
    I've have version 0.1.8 installed on Homey but I have the same problem that @LJSVV had.
    Only restarting the app in Homey will refresh the lock status.

    Could you help me?
  • HuipriHuipri Member
    edited July 2017
    Hello @jorden
    Since you changed polling to callbacks I have not been able to get any notifications from my Nuki lock to Homey anymore.
    When I check the callback entries-list in Nuki, I see 3, all to my Homey.
    And each time I restart the Nuki app, 1 entry is added.
    But no notifications when the lock state changes.
    When I change the lock state in the Homey device, my flows run, but I don't know how these notifications get to my flows (directly from Homey because it changed the state itself? or?)

    Do you have any hints as to why it does not work for me?
    Thx

    Forgot to mention: sometimes Homey executes the flows that says that 'the door is locked/unlocked' while there is no action on the lock at all - very strange; seems like a very delayed action? I don't understand why this happens
  • jordenjorden Member
    @gnaaktgeboren and @Huipri I will try to test as soon as I can and if I have the same problem, I can provide a fix.
  • @jorden.
    Great to hear...
  • jordenjorden Member
    I found a bug (once again) on setting the callback URL. The app keeps on setting it. Version 0.1.9 (not yet published in the app store)

    You need to check:
    http://192.168.1.xxx:8080/callback/list?token=<token>;

    Make sure to input the IP of the Nuki bridge, as well as your token in the end.

    It should show something like:
    {"callbacks": [{"id": 0, "url": "http://192.168.1.238:80/api/app/io.nuki.smartlock/webhook"}]}
    
    If it shows the io.nuki.smartlock/webhook URL more than once, for each ID run:
    http://192.168.1.xxx:8080/callback/remove?id=<id>&token=<token>;

    Make sure to only leave the first entry.

    I have tested it and it now works with the webhook.
  • HuipriHuipri Member
    @jorden Ok, looking forward to the update.

    FYI: just a few minutes ago Homey said out of the blue: 'De voordeur is open' (frontdoor is open) while nothing happened at the lock at all, it is still locked.

  • swtttswttt Member
    Github version isn't working for me...paired the lock again. Made sure the callback url is there (like you suggested) but the homey device isn't in sync with the lock. 
  • New version just got published (or will be in a few minutes).

    @swttt I guess I need to adjust some code so it gets updated inside Homey 'realtime'. Will try to do that next weekend.
  • @jorden
    Latest app version installed, even updated the lock's firmware on the go.
    Nuki reports a single callback url, but still nothing happens in Homey when lock is operated.
    Only when I restart the Nuki app in Homey I get a triggered flow that says 'The door is locked' while it is unlocked in reality
    I can operate the lock from within Homey and also get feedback then.
    Hope you get this fixed soon.

  • That is really strange. Mine reports back to Homey without a problem. 


  • @jorden

    I've also installed the latest app version and removed callback entry but one.
    Now if I check the device status in Homey it says that it's locked but actually Nuki is unlocked.


    Could please fix this?
  • @gnaaktgeboren You are correct, I've managed to fix this (thanks to @swttt for your help!) in version 0.2.0 which is submitted to the appstore for approval.
  • @jorden Great to hear. As soon as the app is updated on my Homey I'll let know if the problem is solved.
  • Not a big issue but when I call the status of the lock, it returns 3 times
  • @Steveos please check the following URL:
    http://192.168.1.xxx:8080/callback/list?token=<token>;
    Please make sure it is the IP of your Nuki bridge and the correct token. Probably, the Nuki lock is listed 3 times in there because of a bug in the previous version.
    If you then run:
    http://192.168.1.xxx:8080/callback/remove?id=1&token=<token>;
    and
    http://192.168.1.xxx:8080/callback/remove?id=2&token=<token>;

    Then it should only return the status once.

    Sorry for the inconvenience!
  • StevosStevos Member
    edited August 2017
    @jorden It works now. And even faster too! Thanks :)
    The status is returned in Englsh when for example adding the tag to a speech card, but I use an extra flow for translation
  • jorden said:
    @gnaaktgeboren You are correct, I've managed to fix this (thanks to @swttt for your help!) in version 0.2.0 which is submitted to the appstore for approval.
    @jorden The problem is solved. Thank you.
Sign In or Register to comment.