The Pardot Bathroom Stall Availability Monitor


Home

But why?

It's 10AM. Your second coffee is steaming on your desk when you feel a familiar gurgle. Just yesterday, this would have meant a cold coffee on your return, but today? Today is the first day the Bathroom Monitor is in service. You type `!poo` into hipchat. The handicap stall is open, and off you go.


the bathroom problem The number of men on the top floor of the Pardot Office had reached a critical point in 2016. With two bathroom stalls for over 100 men, there were several spans of time in which multiple floors needed to be traversed in order to find a stall to do ones buisiness in.

With the Ping Pong service in place, we decided to tackle this next great infrastructure project.

What it does

This is a service that relays real-time information about whether or not someone is using a bathroom stall. At a glance (or hipchat/slack command), coworkers know if now's a good time to let nature call, or if they should wait a minute.

How it works

This is an add-on service for the pingpong web server. We chose to have them be on the same server because we were lazy and didn't want to spin up another heroku instance.

Initial brainstorms for how to check for bathroom occupancy included fancy things like lasers, sonar, and even some sort of spring switch mechanism on the stall doors. In the end, here's what we went with:

We went back to our trusty Particle Photon development board and hooked up a couple of magnetic reed switches typically used for door alarm systems. When the magnets were close enough to activate, we considered the stall "in use". It helped that the doors we were hooking on to drifted open when not in use.
the device
architecture

This data was transfered to the rails app where it was stored for historical analysis, and also used for immediate real-time usage information. Coworkers could either use the web interface,
bathroom monitor web page
or use a hipchat commands "!bathroom status" or "!poo", or create their own api-based usage pattern.
bathroom monitor web page

Our Commercial

We presented this to the engineering org as our entry into a hack-a-thon that was being held. We made the following commercial and ended up winning people's choice!


Fate


the thing that got us caught
Unfortunately, the historical data ended up being this project's undoing. We were able to show days where the occupancy was over 70%, and decided that this should be actionable by the company. We posted the (as always with this project, completely anonymous) data to an internal "chatter" (similar to a forum post) to show that something needed to be done to free up bathroom availability.

Something was indeed done, as a couple of hours after that post was made, the HR department sent representatives to my desk to have the system taken down. As it turns out, they didn't like the perception that the company was monitoring bathroom usage. Appeals went no where, and the project was halted.

Credits

Please see https://github.com/jusroberts/pingpong-web-server/graphs/contributors for a full list of contributors and their contributions.