I like the idea of knowing if the bathroom is available or not. I’m not quite sold on broadcasting how long someone has been in there. Either way, this looks like a practical project via the Hackster.io blog:
Redditor “notbookies” had a small issue at his place of work in that a dozen people share a single bathroom. While probably sufficient on a macro level, walking there only to find it occupied over and over was getting to be a bit of a nuisance. Naturally, he turned to electronic monitoring to solve this problem!
His solution comes in the form of an ESP8266 module, along with a magnetic sensor. When the door is open, it sends a signal to the module which can then generate a webpage, showing whether or not someone is in the bathroom based on if the door is open or closed. It also displays how long the door has been in a certain state, as well as stats on occupancy and vacancy.