Project P tells the realtime status of the toilet.
What is Project P?
This project is a little bit different then the other ones you can find here. During my internship at Tjuna we came to the conclusion that we'd been spending way too much time waiting for the toilet to be free again. The toilet is located downstairs, so you'd never know whether it was occupied or not.
Introducing Project P: our genious and fun solution to this problem. Together with co-intern Steven Oud we began development early May 2016.
A dashboard was created where all the needed information is displayed: per-day visit counts, average toilet time and more.
We had to find a reliable way of knowing when the toilet is actually occupied or not, and we found that the door lock would be the best place to base our data off. A Raspberry Pi 3, hooked up to a reed (magnetic) switch positioned in the doorpost with a tiny magnet on the doorlock pin is how we pulled it off. The Raspberry Pi with a bit of Python software is connected to an API made by Steven. I use the API to show all the data in our progressive web app. Another neat thing is that we've implemented WebSockets. This means that you don't have to refresh the page to see whether the toilet status has changed.
A responsive progressive Angular Web App that works with a realtime API connected to a Raspberry Pi. It was a lot of fun building this web app, especially because we did everything ourselves. The hardware: soldering wires and making circuits, the backend: building robust sensor software and a well-documented API, and the frontend: the web app.
You can view the result and see the toilet stats of the Tjuna Toilet at http://project-p.xyz/