share
Super UserHow can we tell if the bathroom is occupied?
[+46] [18] thepaulpage
[2009-10-28 16:01:22]
[ state spare-parts room ]
[ http://superuser.com/questions/62055] [DELETED]

Where we work the bathroom is down one hall, around a corner, and at the end of another long hall. The walk to the bathroom isn't so bad, but too often one will walk all this way only to find the door locked and the facilities occupied.

I don't mind taking a necessary bathroom break every few hours. I even enjoy the exercise. But when coding is happening, and concentration is at it's peak, that nagging pain in the bladder can be quite an annoyance. At some point you decide that the customer's problems aren't as Pressing as that one and you decide to elevate it to the top of the workload and take care of it instantly. A walk down the hall and REJECTED! Now getting back to working requires a re-prioritizing of the workload again and by the time you're back into the right mode the facilities might be free...

Problem: The bathroom is sometimes full and the only way to tell is to physically get up from the computer and walk down the hall to check.

Situation:

Question: Is there a cheap (free) way that we can set up in order to determine that the bathroom is occupied before leaving the desk?

Are you able to install hardware on or near the door, like a button or camera, or is that prohibited by your boss/property manager/other authority person? - Lord Torgamus
(3) Certainly a novel question... - Mark
(23) Whatever you come up with to trigger the "occupied" state, I propose to use the water tap or soap dispenser as a means to trigger the "ready" state. Finally some way to make all your colleagues wash their hands. - Arjan
(9) +1 for two birds/one stone! That reminds me of a restaurant where the only sinks were outside the washroom doors, in view of diners. - Lord Torgamus
what about those of us with OCD who use water and soap to purify the toilet seat? - Nick
@ephilip Err, why? It's as valid a question as any, albeit slightly.. unique. I don't see how the questions or answers would benefit from community editing.. - dbr
(3) Voting to re-open -- computer-releated enough for my liking, and a nice combination of computer hardware and software. - Arjan
you're not looking for an excuse to install a CCTV camera in the bathroom, are you? :) +1 to reopen. - community_owned
[+26] [2009-10-28 16:40:53] tahdhaze09

The good 'ole bathroom pass! Hangs in clear view of all employees; take it with you when you need it. When it's not on the wall, someone's in the bathroom. Doubles as the key to open the door so you HAVE to take it.

Don't do what my elementary school did once: they attached it to a yardstick.


(5) What if they don't return the key, or someone hoards it? I know office girls are notorious for hoarding toilet keys, especially if they're red for the month. - caliban
(1) That's a good one... Hoarding you can't help. If they're in the bathroom, OK. If not, hit the PA system and ask for the key. Gotta set some rules, you know. Not returning the key would be almost impossible depending what it's attached to. I don't think someone would keep a key if it was attached to a Stop sign. - tahdhaze09
(5) @caliban - You have girls.....in your office? Whaaaaat? - MarkM
this certainly avoids the race condition that most/all? computerized solutions would suffer from - Pär Björklund
we are in several offices and we there isn't really one point where we can all see the key. some people would still not know the status of the bathroom occupancy. - thepaulpage
(1) So much for the analog solution. OK. The key is attached to a system that light up a board in the other rooms. When the key is removed the "occupied" light goes on. When it's replaced, the "Vacant" light goes back on. When the "occupied" light is on all day, you know someone has the key and either doesn't know it, or they pinched it. - tahdhaze09
I forgot to ask, is this a single-occupancy bathroom, or are there stalls? - tahdhaze09
Attach the key to a large bulky object. - Piku
(2) The trouble with this solution is that you're handling something that everyone in the office handles, before and after they've gone to the bathroom, no matter what they just did there, whether or not they washed their hands. Yuck. - Kyralessa
1
[+18] [2009-10-28 17:07:46] dbr

If you want to over-engineer a solution, perhaps MIT could provide some inspiration [1]:

$ finger @bathroom.mit.edu
[nw61-310-8.mit.edu]
Random Hall Bathroom Server v2.1

                         Bonfire Kitchen: vacant for 32 min
                         Bonfire  Lounge: vacant for 2 hr
                          Pecker  Lounge: vacant for 9 min
                          Pecker Kitchen: vacant for 33 min
   K 282  L  290 K          Clam Kitchen: vacant for 84 min
   ... ... ... ...          Clam  Lounge: vacant for 26 hr
  | o : o | o : o |          BMF  Lounge: *IN*USE* for 2 min
  | o : o | x : o |          BMF Kitchen: vacant for 38 min
  | o : o | o : o |         Loop Kitchen: vacant for 8 min
  | x : o | - : o |         Loop  Lounge: vacant for 5 min
 ~~~~~~~~~~~~~~~~~~~  Black Hole  Lounge: vacant for 71 sec
                      Black Hole Kitchen: vacant for 107 days
      o = vacant!        Destiny Kitchen: *IN*USE* for 79 days
      x = in use          Destiny Lounge: vacant for 8 min
                                     Foo: vacant for 38 hr

For more information finger help@bathroom.mit.edu

(They have a similar server for their laundry [2] too)

Or perhaps the more up-to-date fancy web2.0 method, a tweeting toilet [3]?

[1] http://bathroom.mit.edu/
[2] http://laundry.mit.edu/
[3] http://aculei.net/~shardy/hacklabtoilet/

(1) nice. Black hole kitchen must be really nasty, and someone better call a doctor to destiny kitchen. - bryanbcook
(6) What? All that and no statistical data? I want to see the usage patterns so I can plan my day around the lowest periods of bathroom usage. I think an MRTG script is in order ;-) - Mark Renouf
(2) Somebody get that poor guy in Destiny Kitchen a laxative. - Kyralessa
2
[+15] [2009-10-28 16:37:30] ephilip

If you don't mind a little coding, or can get someone else to do it for you, you might want to get some ideas from this [1] post on Coding4Fun on checking if a bathroom is occupied.

[1] http://blogs.msdn.com/coding4fun/archive/2008/08/13/8859880.aspx

(2) +1 for finding an exact match on the requirements... - Rob Cowell
3
[+9] [2009-10-28 16:07:28] Rob Cowell

Sounds like you need to investigate the X10 home automation protocol [1] which should allow you to hook something up to the door (door latches/locks tend to be metal, hence conductors, hence forming a complete circuit) and monitor from an X10 compliant console.

If installing hardware on the door is vetoed, maybe a webcam looking at it (but not the occupants!) ?

Another (manual) solution - have a little flippable sign in the office saying Occupied/Free - when someone leaves for the toilet, they flip it to Occupied, when they return flip it to Free. Free as in beer solution....

[1] http://en.wikipedia.org/wiki/X10%5F%28industry%5Fstandard%29

+1 for the manual solution, so long as the bathroom isn't shared by more than just your company. - paul
...or more than one office... - Arjan
4
[+6] [2009-10-28 16:47:40] caliban

+1 for NiceGuyUK's answer... but unfortunately the free solution of the flip-sign involves human interaction, and as any good SU will know - humans will simply screw things up. :)

"In Automation We Trust", is the motto of legions of geeks - if we could automate our entire lives we would, and just spend our lives playing MMORPGs :). It should not involve human interaction anything outside of what is the normal pattern of things - in this case, going to the WC and closing the door.

I used to work in an office that for some reason, everytime the toilet door was closed, a particular ceiling light would go off. We suspect it was because the closed door crimped a wiring along the door frame, but no one voiced it out to the management because it was so darn useful.

I recommend you isolate one wire that controls a lighting source that is visible preferably even before someone gets up to answer a call of nature - and try to get the door closing to trigger a turn-off.

P.S If you got an office electrician - i'm sure he can come up with something for free along these lines.


(2) It would work if the human was Jon Skeet. - Rob Cowell
(4) Does Jon Skeet even needs to go to the toilet? I thought he just needs to change his nuclear fusion cell every 1,000 years and that's the only waste he produces? - caliban
5
[+5] [2009-10-28 16:49:30] DaveParillo

Very cool question!

There is a paper that uses wireless occupancy sensors using the X10 protocol [1] to do essentially what you are looking for. You may need to free up some time to implement it though!

[1] http://www.kadtronix.com/x10%5Flan.htm

6
[+4] [2009-10-28 16:38:00] Arjan

Years ago, I investigated creating some stand-alone tiny web server that would show the state of a single switch. Just as a reference, some of the devices and articles I bookmarked then.

  • Icepick.com - a wired house [1] — a house in the Netherlands, since 1998 showing irrelevant data like who rang the doorbell, when the fridge was opened, when the toilet was flushed, and how cold the water is
  • Arduino [2] — a tool for making computers that can sense and control more of the physical world than your desktop computer. It's an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects can be stand-alone, or they can be communicate with software running on your computer. The microcontroller on the board is programmed using the Arduino programming language [3].
  • XPort Embedded Ethernet Device Server [4] — a web server in an ethernet connector
  • SitePlayer [5] — embedded Ethernet HTTP server
  • JStik [6] — compact, native Java module with on-board ethernet
  • uClinux [7] — embedded Linux/Microcontroller Project
  • webACE Server [8] — World's Smallest Web Server
  • Spud [9] — A Potato-Powered Web Server
  • The PicoWeb Server [10] — server with 16 digital I/O lines (but: last modified on March 05, 2001)
  • Ethernet Interfacing – Build your own web server [11] (published In Electronics World: October 2001)
[1] http://www.icepick.com/
[2] http://arduino.cc/
[3] http://arduino.cc/en/Reference/HomePage
[4] http://www.lantronix.com/device-networking/embedded-device-servers/xport.html
[5] http://www.netmedia.com/siteplayer/webserver/index.html
[6] http://jstik.systronix.com/
[7] http://www.uclinux.org/
[8] http://d116.com/ace/
[9] http://d116.com/spud/
[10] http://www.picoweb.net/prodpw1.html
[11] http://www.eix.co.uk/Ethernet/SitePlayer/Welcome.htm

7
[+4] [2009-12-16 01:23:13] rob

Here's a low-tech solution: set up a series of precisely-positioned mirrors so anyone can glance out their office door to see if the bathroom door is open. Run the mirrors about 7 feet high so they're less distracting and less likely to be blocked.

Going a step further, you could install a laser pointer on the bathroom door so a red dot is projected into each employee's office when the bathroom is occupied.


8
[+3] [2009-10-28 16:58:21] community_owned

You guys are complicating it too much. You can just put a doorbell switch where the door touches the door jamb. This can then switch on and off a light on the upper floor. Since it's a doorbeel switch (it is only "on" while held), when the bathroom user opens the door, the light will turn off.


(1) Of course, Super User questions (and answers?) need to be computer related... ;-) - Arjan
9
[+2] [2009-10-28 16:45:45] eleven81

Sounds like a third-grade science project to me:

  1. Install a microswitch in the doorjamb or at the end of the deadbolt's travel.
  2. Run a wire from the bathroom to a rather conspicuous location in your office.
  3. Install a red light and power supply suitable for the microswitch and light.
  4. Wire the light up such that it is lit when the bathroom door is shut/locked.

The only time you may have a problem is either when someone takes a leak with the door wide open, or on the rare occasion that the bulb burns out.


10
[+1] [2009-10-28 16:40:46] Kije

Install a web cam.

  • It doesn't have to intrusive
  • It works out of the box - no coding or messing about with custom hardware.

(1) That is how it got invented in the first place ... only it was the coffee machine if my memory serves me .. - ldigas
(4) Preferably outside the bathroom, not inside :) - emgee
(1) Install the webcam and put an occupied/unoccupied sign on the door that is automatically triggered by the bathroom door lock (just like on an airplane). This way, if someone closes the door when they leave the bathroom, you'll still be able to tell that it's unoccupied. Note: this will fail if someone goes to the bathroom while you are walking toward the bathroom. - DanM
11
[+1] [2009-10-28 16:36:02] Chris Nava

Sounds like you need to add you bathroom door to the List of Devices Connected to the Internet [1]. You could use something as simple as a web server on a chip to allow you to use a browser to get the status of the lavatory door.

[1] http://dir.yahoo.com/Computers%5Fand%5FInternet/Internet/Devices%5FConnected%5Fto%5Fthe%5FInternet/

"as simple as a web server on a chip" Remember. This is a bathroom door we are talking about - joshhunt
A quick google search found this. With a bit of additional hardware (lika a magnetic switch) it looks like it could do the trick. picoweb.net/prodpw1.html - Chris Nava
12
[0] [2009-12-16 20:23:48] Shawn

If the ceiling is high enough, a signal light can be placed there that all employees could see (or maybe you would need two or three to cover everyone). This light can be on when the bathroom is occupied, which can be detected in a number of ways: Something on the door hinge, a sonar, an infrared sensor, etc.


13
[0] [2010-02-16 17:35:46] Anish

Here is a cheap solution that can be made using off the shelf components...

You'll need these:

  1. A Light Dependent Resistor (or something to sense that the door is open/closed).
  2. An FM transmitter.
  3. An FM receiver (If you have a phone with an FM catcher, you won't need this).

All of the above things are easily available.

Now connect the door sensing circuit so as to switch on/off the FM transmitter (the input signal to which can be a beep generated through a 555 IC).

So, before answering nature's call, turn on the radio to check that you don't get REJECTED!

I can smell a nice DIY-bathroom-sensor in the works.

P.S. I don't think it would be an issue, but make sure that transmitting low power F.M. is legal in your country first.


14
[0] [2011-06-28 21:01:05] johnnywhoop

thepaulpage doesn’t work for our company anymore and about a month or two after he left we finally implemented our bathroom notification system. We ended up using:

NetDuino [1]

Ball Door Switch [2]

50ft of Cat5 cable.

We put the ball switch on the door and ran the cat5 to the server room. We programed the NetDuino to listen to the switch and then to report the status to a serial port.

v0.5: We then wrote a small app that listened to the serial port and wrote the result to a text file on the network and anyone could open the file and see the current status.

v1.0: We wrote an php page that checked the file every 2 seconds and reported the result to a company dashboard that a few people use.

V2.0: We wrote a service that checked the file and reported the results to a database. We then wrote a Silverlight client that checks the database and reports the status. This allowed us to add features like toast notification to let you know as soon as the bathroom was available.

V3.0: Yet to be written will include a queue, usage times, charts, the current weather, and a random lol cat.

It works pretty well but I have since moved to right across that hall from the bathroom so there is little incentive for me to continue adding features since I can see the bathroom. My colleges however now have to option of checking the bathroom status from their chairs.

Ps -I realize there is a lot of redundancy in the way the message gets to the end user but it was working and so I didn’t want to go back and rewrite something that worked.

[1] http://netduino.com/
[2] http://www.best-b2b.com/Products/545/561-1/recessed-magnetic-contact-switch_111397.html

15
[0] [2009-11-03 06:22:43] Christopher Mahan

A little on the complicated side:

Set up a directional mike in the cube of the guy closest to the bathroom, then hack a program to listen to the "click" of the door closing and opening. Then, upgrade an autoreloading web page's title page so it will show open or busy in the firefox/chrome tab. It could also display how long the room has been busy.


16
[0] [2009-12-16 00:26:21] DanM
  1. Install a wireless router or an Ethernet jack near the bathroom.
  2. Switch your work machine from a desktop machine to a laptop.
  3. When you go to the bathroom, bring your laptop with you.
  4. If someone is in the bathroom, read SuperUser or check Facebook until the bathroom is free.

17
[-1] [2009-12-16 00:11:22] Shawn

Shout out: "Can I take a wizz? Pass on!" The out-loud question should propagate towards the bathroom until its occupant sends a "No" back or the person nearest the bathroom send a "Yes" back. The answer can propagate back to the asker in a similar fashion.

Alternatively (and to make this more computer-ralated), that question could simply be an e-mail or IM to the person closest to the bathroom.


(2) This might be funny the first 2 or 3 times, but it would be an enormous waste of resources, and would ruin everyone's productivity. Even the e-mail or IM to the person closest to the bathroom would require paying someone full-time to be a bathroom monitor, which would be much more expensive than installing an elaborate electronic monitoring system or adding more bathroom stalls. - rob
I disagree, the guy's already paid to be working there, you just add a task to his task list. - Shawn
18