Roy van Kaathoven
Full Stack Developer

26 Apr

Opening gates with Slack and Twilio

At one of my clients there is an automated barrier blocking the private parking space.

The first day i arrived i had to call their office which they in turn would call a number which controlled the barrier. When the number is called it would sound a busy tone, hang up, and open the barrier.

When i wanted to head home i had to drive to the barrier, call the office number and they would call the gate number which would open the barrier.

Since opening the gate is triggered by calling a number i figured that this process could be automated. First there needs to be a way for trusted people to open the gate using something they are already familiar with and without installing any additional apps.

Luckily the company already uses Slack for their internal communication which offers an excellent API to add custom commands to a channel.

The next step would be to make a phonecall when someone runs the command in Slack. I used Twilio to make a phonecall and spoof an authorized number to call the number of the barrier.

The Result