This article explains, how to open a KleverKey lock via a WiFi button.
Requirements
- WiFi Button (we used a MyStom WiFi Button)
- KleverKey Lock
- Automation platform (optional)
Setup WiFi button
- Set up your WiFi button according to the user manual of the button manufacturer (most likely, you'll have to install their app and configure the button for your WiFi network).
Integrate WiFi Button directly
The WiFi button needs to support sending PUT requests with a body, else the direct integration doesn't work.
- Set the HTTP request method to PUT
- Set the HTTP request URL to https://api.kleverkey.com/api/v1/users/me/permissions/<LOCK-ID>/activate?apikey=<API-KEY>
- Set the HTTP request body to { "lockActivationMode" :1 }
- Use 2=Toggle, 3=Open, 4=Close for office modes
Integrate WiFi Button via automation platform IFTTT (or similar)
- Create an account at IFTTT (or similar). In this article, we'll show you how to setup the button for KleverKey with IFTTT.
- Sign into your KleverKey account and make sure that the KleverKey lock and gateway are already configured. Make sure that the user you want to use to activate the lock with the WiFi button needs a valid permission. Test, if the signed-in user is able to open the lock by doing a remote activation.
- Navigate to API Keys and create a new API key for the IFTTT service. Copy the API key to the clipboard.
- Start creating a new Applet in the IFTTT portal. Under "IF" search for MyStrom and define the action.
- Under "THEN" choose Webhook and enter the following values
- Which event type? --> Press
- Which Button? --> Choose your button
- URL --> https://api.kleverkey.com/api/v1/users/me/permissions/<LOCK-ID>/activate?apikey=<API-KEY>
- Replace <LOCK-ID> with the correct lock ID
- You'll find the lock ID in the details when you navigate to Hardware -> Locks in the KleverKey portal and select a lock (use the integer ID)
- Replace <API-KEY> with the API key that you have generated before and that should still be stored in your clipboard
- Method --> PUT
- Content Type --> application/json
- Body --> { "lockActivationMode" :1 }
- Use 2=Toggle, 3=Open, 4=Close for office modes
That's it!
Your WiFi button is now connected to KleverKey. Make sure, the applet is shown as connected in the IFTTT portal.
Test your WiFi button by pressing on it. After a short delay, your KleverKey lock should open.
Where to use?
You can open your apartment door when someone is ringing the door bell downstairs or your office door while you are sitting at the reception desk.
Comments
0 comments
Please sign in to leave a comment.