jordenc / io.nuki.smartlock

Nuki Smartlock control for Homey
5 stars 0 forks source link

Trigger cards do not seem to work #12

Closed RaimondB closed 6 years ago

RaimondB commented 6 years ago

Hi,

I am able to send command to lock/unlock. However, if I use my phone to unlock, the trigger in homey does not fire. Is this intentional or a bug?

Thanks, Raimond

jordenc commented 6 years ago

That probably means that the webhook URL is not set correctly in the bridge. Sometimes the app fails to set it.

To check this, go into your browser and open:

http://[Nuki IP]:8084/callback/list?token=[Nuki token]

It should display something like this: {"callbacks": [{"id": 0, "url": "http://[Homey IP]/api/app/io.nuki.smartlock/webhook"}]}

If it shows: {"callbacks": []} then it is wrong.

You can fix it manually by opening: http://[Nuki IP]:8084/callback/add?token=[Nuki token]&url=http://[Homey IP]:80/api/app/io.nuki.smartlock/webhook

You need to fill in: [Nuki IP] [Nuki Token] [Homey IP]

Give them all a static IP in your router if you didn't have that already

RaimondB commented 6 years ago

This indeed was the issue, I needed to re-register the webhook. Would be nice to have a config page inside homey settings to fix the webhook when needed. Should it keep working automatically now? Or do I need to do this each time the Nuki bridge is being restarted?

jordenc commented 6 years ago

It should keep working now. A new version of Nuki will be available in a few weeks, this problem should then be gone.