Hi,
I am trying to integrate Nuki with my home automation, and make it open the external gate once it detects my presence through the “Auto Unlock” function.
Essentially I’d like Nuki to perform Auto Unlock, and right after that to call an http url, which activates a Shelly relay that opens the external gate.
This way I could auto unlock both door and gate at the same time.
Is that possible?
I don’t know if this is a way for you, but with ifttt you can do this.
Hi Rose,
thank you for your reply, I actually did it by using a callback http call.
The only issue now is that a callback is triggered for ANY state change, whereas I’d need to make the http call only when the door opens, and not when it closes.
Does anybody know whether the different behavior could be detected?
Do you use just locks or also a opener?
I just have a lock and a bridge, not an opener, but so far as the callback triggers for any state change, it gets called for lock,unlock, door opening, door closing (these last two through the door magnetic sensor).
I just dont want my external gate to be opened when I close or lock my door…
Have you used the nuki ifttt service?
no, actually I just used the API callback. I am not very familiar with IFTTT protocol, but if it allowes me to invoke an http URI on a specific event basis, then I’d gladly try to adopt it
Yeah it does, it’s webhooks in ifttt. I use it for http requests.
Ok I have created an IFTTT routine upon the condition of door unlock, and used webhooks to specify the http shelly url, but it doesn’t work, saying: “timed out for response from http://192.168.0.3/relay/0?turn=on”
Does it need a pubblic ip address to work? Nuki and Shelly are on the same private network
Ah yeah, that can be a bit tricky! Have you set the get or post and json parameters?
Shelly evaluates only GET neglecting any further parameter, opening the URI http://192.168.0.3/relay/0?turn=on
from a browser works just fine
Do you think I could reach a local IP address from an IFTTT routine? Maybe I could invoke Alexa, through which I can already open the gate, is there a way?
In the IFTTT rule wizard I could find Alexa only as source of the event, not as the destination
I tried your http link (with get), but ifttt is not able to get it through, the Applet triggers, but is not accepted on your side
you mean you have a shelly or a device with the same private IP address in your local network?
I am not sure I got it right, but you can’t reach my http link as it is reachable only from my local network, not from the internet.
Uh sorry, in my case when I take 192 Pool for IP adresses in my modem, I can reach it from the internet, because I use the 10 pool. Can you say me what the log of the ifttt Applet say, when you try?
It just says:
“Action failure Message: timed out waiting for response from http://192.168.0.3/relay/0?turn=on”
Of course if IFTTT applet runs on internet and not locally, it doesn’t reach a local IP address, therefore it wouldn’t work…
Ah of course, you have to integrate it with your individual ifttt webhook datas, go into ifttt - push on your email Adress - push on my services - push on webhooks - and in this webhook screen now stands your ifttt Web URL, and push on it, what gets you to the ifttt webhook website, where you see your url, and where to implement yours, - it’s easy to understand! Please take a look, and let me know.
Okay I am on webhooks config page, it shows a link:
https://maker.ifttt.com/trigger/{event}/with/key/xxxxxx
(where xxxxxx is my key)
Shall I replace the “{event}” field (the only editable) with my own url?
http://192.168.0.3/relay/0?turn=on
Not there (later in the second step then), in the field you just give in a unique trigger word or number, what you use just for this exact Applet to trigger. The second step you choose webhook again, and there then you give in your url, and choose get, then save all and test it. Let me know.
Ok so let’s recap:
-
in my webhooks profile , under “my services” in the url events I put “gate” , so the url is now:
https://maker.ifttt.com/trigger/gate/with/key/xxxxx
-
I edit webhooks settings in my app, and I insert my uri:
http://192.168.0.3/relay/0?turn=on
Is that what you meant?
It’s just I am not invoking https://maker.ifttt.com/trigger/gate/with/key/xxxxx
anywhere, I just configured it, but I am not using it anywhere
Forget it, my mistake, the gate is good, but insert nothing else.