Garadget supports REST API which means it can be controlled with the specially formed web requests.
Here’s the example on how to use that capability in IFTTT recipe.
First you’ll need to find:
- device ID - a string that uniquely identifies each Garadget unit.
- authentication token - a secret string your app receives to use instead of the username/password after you successfully log in.
The simplest way is to login into the web interface and use the document inspector to pick at the background requests it sends:
- In Google Chrome click anywhere in blank space of the page and select “Inspect” from the context menu
- Navigate to the Network Tab
- Filter by text: setState and resource type XHR
- Use web interface to open and close the door
- See the requests appearing in the list, you can find the details under Headers tab
Now let’s create recipe starting with IF part of your choosing. There are numerous choices including the geofencing, messeging system etc. I used trigger by email with the subject - not a good idea from the security standpoint, but this is something that I can easily test.
In THEN part select Maker Channel -> Make a web request.
- URL: https://api.particle.io/v1/devices/XXXXXXXX/setState
- METHOD: POST
- Content-Type: application/x-www-form-urlencoded
- Body: access_token=YYYYYYYY&arg=open
Replace XXXXXXXX with your device ID and YYYYYYYY with your access token. Replace open with close if needed.
That’s it. My kids jumped up and down when I demonstrated opening garage via email to them.
Next, I’ll look into using door status as the event trigger (IF) part. This will require custom scripting.