I’m not quite ready to share my code, but I thought I’d share something that I completed yesterday.
Right now, I have a keypad outside my garage. Many friends know the code as I’ve let them borrow tools, vehicles, etc in the past. Rather than continually changing the code, I removed the keypad and instead put up a little sign with a phone number on it.
That phone number is a Twilio number (for those not familiar, check it out! It lets you interact with text messages, program your own voice response systems, etc).
To open my garage, you send a text message to the number saying ‘open garage’. When you do that, Twilio sends a HTTP POST with the from#, text message data, etc to a URL of my choice - in this case, a nodejs script that I have running on a server at home (although since everything is cloud based, it could run anywhere).
This nodejs script then queries the Google Contacts API and gets the person’s name and also looks at what contacts groups they are a part of. If they are a part of the GarageAccess group, it will open the garage for them using the SmartThings API. Of course it will also text me letting me know that they did so.
This all may be possible with just SmartThings… I was just more comfortable in Node than I was in groovy. I may try and port things over though :).