Toilet occupancy indicator built using ESP32

Reading time: 3 min.

The toilet is one of the most important rooms supporting a person in difficult and unusual situations, to which trouble-free access significantly improves the comfort of work. Unfortunately, for some time in Botland, we had to deal with the problem of toilets being always occupied, while the number of toilets remained unchanged, which caused growing frustration with every subsequent attempt to get to the desired place and time wasted to break away from work only to bounce several times through closed doors. The number of available toilets was out of our control, so the question came up: how to improve the traffic on the frequently used desk-toilet communication line?

For a long time the topic was hanging without an idea for its solution and here the idea appeared, we have no influence on when the toilet is closed, but we can easily present when it is open.

The whole system is made up of two types of devices. The main one, which is placed above the toilet door, and wireless indicators placed in most of the rooms in the company. The heart of the whole project is Raspberry Pi, on which Home Assistant is placed, with which all devices are connected via WiFi network. Modules built on ESP32 connect to the network and, thanks to an add-on for HA called ESPHome, have been integrated into the whole system.

Main module

Elements used for construction

Filaments

* – depending on the need a socket or mounting power supply can be used, it depends on accessibility to the socket, aesthetics and size of the printed enclosure.

There are two springs mounted in the door frame, when the door is locked, the door lock closes the circuit, which is communicated to the ESP, when it receives the signal from the sensor, it sends the information to the Home Assistant and activates a relay hidden in the housing to switch the powerlights from green to red.






Indicator

Elements used for construction

Filaments

* – depending on the need a socket or mounting power supply can be used, it depends on accessibility to the socket, aesthetics and size of the printed enclosure.

After the master modules mounted above the toilet doors send a signal to the Home Assistants, the appropriate automation is triggered to control the ESP32s hidden in the sirens. There are 2 signal pins coming out of it which trigger the appropriate relays. Unlike the main modules, when the toilet is unoccupied no light is lit, only when the door in one of the two toilets is turned off, the LEDs located in the appropriate segment of the notifier come on, indicating that the toilet is occupied.

– red – mens room

– blue – ladies’ room




We’ve had the system up and running since November and it has improved our working comfort significantly, allowing us to move freely between the workplace and the toilet without a futile trip to the door and pressing the door handle – we do everything comfortably from behind the desk without being distracted from our duties (it’s all about checking whether the toilet is occupied, of course  ).

And what does it look like at your work?

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Share:

Picture of Maciej Figiel

Maciej Figiel

Versatile, he is eager to take on challenges because he thinks it is the fastest way to progress. He values contact with nature and an active rest. Automotive and new technologies enthusiast.

See more:

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.