Internet of Things Toilet uploads flush events and toilet paper roll change out events to Google Drive spreadsheet.
How does it work? – An aquarium liquid level sensor float switch detects toilet tank level; flushing lowers the level closing the switch. A photo cell located in socket (blind hole) of the toilet paper holder spindle mounting arm detects when the spindle is removed to change out the toilet paper (letting light hits the photo cell, thus "closing the switch").
Signals from these two sensors are sent (wirelessly -despite what the intro photo implies) via a hacked two button key fob; that is, sensor switch closure effectively pushes a button. A 315 MHz receiver module connected to a Raspberry Pi receives switch closure signals.
The Raspberry Pi, using Python API gspread, transmits the event data to Google Drive spreadsheet.
See system layout image.
How hard and how much $ ? - Assuming you already have a Raspberry Pi, and you know how to load and run Python programs, and can build basic electronic circuits – this is pretty easy & quite inexpensive (< $40) IoT (Internet of Things) project.
Why do this? - (1) To explore IoT on the cheap, and (2) because I can.
Assuming you already have a Raspberry Pi, additional stuff you'll need ...
Keyfob 2-Button RF Remote Control - 315MHz (products/1391) PID: 1391 $6.95
Simple RF M4 Receiver - 315MHz Momentary Type (products/1096) PID: 1096 $4.95
Photo cell (CdS photoresistor) (products/161) PID: 161 $0.95
Stacking Header for Raspberry Pi - 2x13 Extra Tall (products/1112) PID: 1112 $1.95
Adafruit Half-size Perma-Proto Raspberry Pi Breadboard PCB Kit (products/1148) PID: 1148
Radio Shack 271-009 1/8-Watt 470 Ohm Carbon-Film Resistors (4 req'd, but 5 in the pack)
Amazon.com, 1 each:
Aquarium Wired Liquid Water Level Sensor Float Switch
(1 req'd) - 5mm Through-hole LEDs with Built-in 5V Resistor, Red # 604-WP7113ID5V
(1 req'd) -5mm Through-hole LEDs with Built-in 5V Resistor, Green # 604-WP7113SGD5V
(2 req'd) - 2 pin Female Headers # 517-929870-01-02-RB
(2 req'd) - 2 pin Male Headers # 571-4-103321-4
plus misc stuff like hookup wire, solder ...