Book conference rooms in a flash with Amazon Dash (buttons)

When One Design moved offices this January we decided to hand roll our own conference room displays for two reasons:

  1. We could.
  2. We liked the idea of leaving them open to custom integrations.

We built all sorts of nifty little tricks into them like on demand weather/transit/news updates, Slack triggered sound effects, and the ability to play a person's theme song when they entered the room (patent pending).

The displays worked great, You could book a room, end a booking, jump in the associated Hangout, and even monitor how much the meeting cost in real time.

Another bit of technology we have in the space are Amazon Dash buttons. We have a button for when you start a pot of coffee timed to alert slack when it finishes. One on the kegerator that invites the team to join you for a pint. One in the kitchen to signify the arrival of treats. So we're pretty big fans of simple "one" button interfaces.

After using the displays for a couple months we started thinking about how they could work together. Then it hit us, What if we could book rooms via a Dash button? Brilliant! We can build it. We have the technology.

So I went about updating my dashgong library to fire HTTP requests to our existing API. About 30 minutes of work later and viola! The Instant Gratification Room Booking Button was born.

via GIPHY

I'm not going to get into the details of the room booking API, that's a whole different post. But let me walk you through setting up dashgong to fire off to an API when you press your Amazon Dash button.

You'll need:

  • A Dash button
  • A machine running git and Nodejs
  • An API endpoint you want to hit

Start off by installing dashgong.

Bash

$ cd /path/where/you/want/to/install $ git clone git@github.com:danboy/dashgong.git $ cd dashgong $ npm install

Now copy config.json.sample to config.json

Bash

$ cp config.json.sample config.json

Edit it to point to your API. I stripped this down to as simple as possible.

Javascript

{ "settings": { }, "buttons": [ { "name": "Post to a url", "id": "da:sh:bu:tt🔛id", "action": "post", "post": { "url": "http://site.com/to/post/to", "auth": { "user": "username", "pass": "password" } } } ] }

Make sure to replace the id, URL and auth with your info. If you don't know your Dash button's ID you can find it by the following commands.

Bash

$ cd node_modules/node-dash-button/bin/ $ sudo ./findbutton

Give your button a press and watch for the string that says "Amazon Technologies".

Once that's all done you should be good to go. Pop back into the dashgong directory and run.

Bash

$ sudo node index.js

You're now listening for button presses and firing off to an API when one occurs.

Pretty nifty eh?

If you use the dashgong code, share your project on Twitter and tag @onedesignco or shoot me an email at dan[at]onedesigncompany[dot]com. I'd love to see what folks are doing with it.

Dan is a web developer via the world of design and user experience. He’s knowledgeable across multiple programming languages and frameworks including Ruby on Rails, JavaScript, Backbone, Node.js, PHP, and more.

Most Recent Issue