Introducing The Flusher, a Windows IoT app running on Raspberry Pi, SignalR and Xamarin.Forms project that uses AI to automatically flush a human toilet for my cat while I'm on vacation :)
For how I did this and more details, read my blog post Using Windows IoT, SignalR, Azure Custom Vision and Xamarin Forms to Flush a Toilet.
- Windows IoT (17763) on Raspberry Pi 3 (B+)
- 4 Tri-Color 5mm LEDs (Amazon link)
- Micro Servo 9g FS90 (Amazon link)
- Danco HydroStop Toilet flushing valve (Danco link)
- Push button (Normally open)
- Logitech HD Webcam C310 (Amazon link)
- 3D printed case See it in this Thingiverse project
- Azure Custom Vision
- Custom trained with at least 4 iterations and 8 hours of training time
- Accessed via API
- Offline inferencing capability via ONYX on Windows Machine Learning
- Azure Storage API (uses blob containers)
- ASP.NET Core 5.0 (MVC and SignalR)
- Xamarin.Forms for Android, iOS and PC desktop admin applications
The IoT client (a UWP app running on the Raspberry Pi) will take a photo of the toilet bowl and upload it to Azure blob. Once uploaded to the blob, the photo's URL is passed to Azure Custom Vision. I have trained the AI to detect and locate the position of any substance in the bowl, it will return the results of the analysis to the IoT client.
If the detection is 85% or higher probability that there is an undesirable substance, the servo angle will be changed from 0 degrees to 100 degrees for a duration of 5 seconds. This opens the toilet valve and flushes the toilet.
At all times, the IoT client is communicating information in real-time to all admin applications using SignalR.
The native admin apps have been compiled for Android, iOS and PC (UWP Desktop). There is also a web portal on the same SignalR server using MVC. The admin can manually take a photo or request an analysis at any time.