So my company recently moved to a new office, and it’s huge, and awesome! The only problem is, no one sits by the front door; design flaw or conspiracy? No one knows for sure. When people come to the door, whether visiting someone or delivering a package, they need to ring a good ‘ole fashion doorbell to get someone’s attention to come and let them in. As you can imagine, hearing a doorbell ringing throughout the day can be quite annoying, so I thought, “I can make this better! With Arduino!”
Here’s the basic idea:
- iPad outside the office door, where visitors can state their intentions
- Using Slack, alert the Office Manager for deliveries, or whoever the visitor is there to see
- Provide everyone an ability to unlock the door directly from Slack
The first two were easily accomplished. One of our UI engineers whipped up an awesome interface, the iPad went up without a hitch, and utilizing the Slack API’s were easy enough.
Now, how to go about letting people unlock the door from Slack? I took a look at how the front door is wired up (which includes a “Request to Exit” button, a keypad, and a motion sensor, all of which unlock the door by releasing the magnetic lock). I found the panel which controls the door lock, and saw that it had a simple relay board inside. I realized that I could take an Arduino (I chose a Particle Photon) and wire it into the relay board to remotely trigger the relay, and unlock the door.
The benefit of the Photon is that you can define a function in the Arduino code which can be called via the REST API provided by Particle. Utilizing the Slack API, I added a command which was sent to a NodeJS server, which in turn made the REST API call to Particle, which in turn sent a LOW signal to the relay, and voila! the door is unlocked!
The project all came together very nicely, and it’s always awesome to find ways in which micro-controllers can be introduced into everyday life!
Next up, adding a camera that will snap a picture of the visitor to include in the Slack message.
PS – Here’s some pictures of the project: