Occupied: Building A Restroom Vacancy App

Benjamin Smith
The Vector Blog
Published in
6 min readMar 6, 2017

Vector is a fast-growing company. I was the 9th employee to join, and we recently surpassed 40 full-timers. In that time, we’ve experienced the usual growing pains, including moving from a co-working space to an entire floor of a building in the Flatiron neighborhood of NYC.

One aspect of our company that was not scaling was right in front of us: the restrooms. We have two restrooms for forty people. We also have all you can drink coffee and beverages available at all times. I shouldn’t have to do the math for you. The restrooms are a busy place. What’s worse, the restrooms are off to the side, away from most people’s desks. This privacy comes at a cost: no one can tell when the restrooms are occupied!

After hundreds of fruitless trips from our desks to the restrooms, only to limp back to our desks with a full bladder, we decided to tackle this problem head on. We decided to do what we do best: we made a website.

Version 1.0

Anyone at Vector can visit bathrooms.vectormediagroup.com and see what’s up. (The link won’t work outside the office but be sure to check it when you next visit us.)

A website that shows the status is cool! I can just bookmark it and click it when I need to use the restroom. And if it’s occupied, I’ll just keep refreshing, endlessly!

That wasn’t good enough.

There’s an App for That!

The team took this one step further. On a suggestion from team member Arthur Ward, we decided a menubar app would be the most appropriate way to maximize restroom utilization, while minimizing hassle and wasted time walking about. Now anyone at Vector can install an app to their menubar which provides a helpful green/red status indicator for the restroom:

Sorry, red means no-go.

Drop dead simple #ux

There’s not a lot of bells and whistles here. Once you choose which restroom you are interested in, you get real-time updates on restroom availability.

How Does This Wizardry Work?

A few components come together to make the magic happen. No, there are no cameras involved (and in no way does it keep track of specific people). It’s all driven by checking if the lights are on or off, which is an almost perfect proxy for occupancy.

First, the light switches in each restroom are IoT (Internet of Things) enabled. We use GE 12722 in-wall light switches with Z-Wave technology. We also have a Raspberry Pi 3/B in our server closet which has a Z-Wave capable USB stick permanently lodged into one of its ports. On the Pi, we are running the Raspbian Linux distro and DomotiGa, open source home automation software. The software exposes a simple HTTP API which tells us if the light switches are on or off. The software receives updates from the light switches once per second, which strikes perfect balance between up to the second status updates and performance concerns of pinging too often.

From there, we utilized the awesome Menubar project, which allows for quickly building out cross-platform JavaScript based Electron apps. We’re big fans of utilizing web technologies (HTML, CSS, and JS) in non web-based applications, including Cordova iOS/Android apps (we recently launched a cross-platform app for Yoga International). Our app had to overcome some unique challenges, including reporting status in real-time, as well as publishing events between the main and renderer processes — a pattern that many Electron apps face.

We update and repackage our app regularly and publish the .app file to AWS S3 and our internal wiki. The app is referenced in our onboarding process as well, which means new hires can hit the ground running on day one.

A New Dawn at Vector

Long gone is the uncertainty of when your next restroom break would come. The anxiety of craning your neck, only to see a tightly shut door, is a distant memory.

With some back of the envelope calculations, we estimate that the restroom app has saved hundreds of thousands of dollars that would have otherwise been lost due to decreased productivity and interrupted train of thought. I don’t have the envelope handy at the moment, but trust me: this is an accurate figure.

Unknown Unknowns

With every software release there are lessons to be learned. When we had our full time remote staff into our offices for the holiday party and summer barbeque this past year, we did not adequately disseminate the app accordingly. People who have been at Vector for years were suddenly thrown into a situation with limited visibility into how they can avoid jiggling the restroom door handles every five minutes. We took note and have improved our software release strategy to include broadcasts to Slack for all new version releases, regardless of location. We take pride in the fact that some of our team members are spread across the country, and strive to include all. Via our VPN, the remote folks can run the app from home if interested.

Once the remote folks were brought up to speed and installed the app, we faced another potential issue: could our hardware handle the sudden burst in traffic when the remote team is in the office? Will a half dozen or more fresh installs break our setup and reduce us to the pandemonium of yesteryear? We survived previous traffic spikes without incident, but without some load testing, we can only guess how far our tiny restroom computer will take us if we allow the attendees of one of our public meetups to install the app.

What’s Next for Vector’s Restrooms?

As we always say, the launch is only the beginning. We’re already at version 1.1.0 for the VMG Restroom Menubar App, with some UI enhancements and bug fixes already logged. We’re busy at work planning the version 2 iteration (with some real magic planned).

One feature that is kicking around our backlog is the ability to “subscribe” to notifications for the restrooms. Too often are we in the zone doing what we do best, only to realize the restroom was freed up and then occupied again while we weren’t paying attention. The green/red indicator isn’t always enough.

Solution: a button that allows the user to be notified when the restroom is green again. This would be a one-time macOS/Growl notification that would be fired a single time, and subsequent changes to restroom status would not need to be reported (assuming you got in there before the next person).

The elevator is the second worst thing you can wait in line for.

We’d love your feedback on the app and any suggestions you might have for future releases. Leave us a comment below with your thoughts!

Originally published on 03.06.17 at www.vectormediagroup.com.

--

--

Benjamin Smith
The Vector Blog

Director of Technology at Vector Media Group, an NYC based digital agency.