I need some ideas for a way to detect when the toilet paper roll is changed.
My idea was to use the orientation from a aqara vibration sensor mounted on a part of the holder that pushes on the roll. The sensor detect how much is on the roll by its orientation but the changes are to small for the sensor to update orientation value even if it detect vibrations.
You’ll probably have an easier time measuring the weight of the spare rolls of toilet paper. When the weight of all spare rolls is zero, that means you are now using the last available roll and it’s time to buy more.
In your strategy, when you re-order you will have enter the count of spare rolls. Each time you change a roll, the count is decremented. In my proposal, there’s no need to update the count for each re-order. Just dump them in a bin that rests on the load sensor(s). When the bin is empty (total weight is now just the bin) it can serve as a trigger to re-order more toilet-paper.
If you still want to pursue your strategy, is the shaft that holds the roll a traditional, hollow, spring-loaded design? If it is, then I have an idea that employs a contact sensor to detect when the shaft is removed from its holder (such as when the roll is being changed). Insert a magnet inside the shaft at each end. Install a magnetic contact sensor on one of the two arms that form the holder. Now when the shaft is in place, the contact sensor’s switch is closed. When the shaft is removed from the holder, the contact switch is open. The reason there are two magnets (one at each end) is so that the shaft’s orientation is unimportant (either end will activate the contact sensor).
My initial idea would be to somehow extend this tactical toilet paper holder with a sensor that modifies a counter on each swap. But I have to admit, that visually it’s probably more suited for bachelors.
put a micro switch in the holder to detect when the rod is removed or…
Use the dry contact sensor of a Aeotec Door/Window sensor (an example or a flood sensor) run the wires so they are not directly next to each other but do contact the roll when inserted. Make sure the roll is conductive, if not add a little aluminum tape.
I do not have the removable rod style holder. See image for the kind I have.
I like the idea of measuring spare rolls, unfortunately the area is not dedicated enough for only toilet paper for that to be practically possible.
I have considered to do a esphome custom thing but it gets too big or ugly quickly. Since as far as I understand the esp32 can not be run on a coin cell?
I’m not familiar with that style of holder. It’s basically a metal bin with a hinged lid? Open the lid, drop in the roll, let some of it hang out the front then close the lid?
If that’s how it works then you can use a contact sensor (magnet on edge of lid and sensor mounted on the bin). Alternately, your vibration sensor should work if positioned on the lid (acts as a ‘tip sensor’).
i measure toilet paper usage indirectly, through a virtual sensor.
i have a toilet occupancy sensor (via a tof distance sensor mounted above the toilet), that reports when someone is sitting on the bowl. it assumes toilet paper is being used, if the occupancy lasts longer than 1½ minutes.
HA increments a counter each time the toilet is occupied longer than 1½ minutes and if that counter reaches 13, it assume that one toilet paper roll has been used. 13 is of course variable, but it works pretty well for us. my indirect toilet paper count has not been off for over 4 month.
What about a very small wheel on a spring rod, connected to a switch to the side of the paper roll? The small wheel has to be placed just above the cardboard center, so when the paper is out after some threshold, the wheel will strip from the paper and make the spring rod connected switch off. Argh, hard to write in words instead of drawing. I will draw something when i access my paper ipad at home…
It is a fixed center rod, that is open to one end. The thing on top is spring loaded and have sides to make the roll not fall out.
That is interesting. I have a vibration sensor on the holder and I could measure how many times that is triggered on a roll.
But I would like something direkt, or at least that not require resetting. If I should reset it manually I could just as well just add a button to press.
I ended up using an ESP32 with esphome and a MPU6050, that wakes up once every 3 hours and check the angle of the part pushing down of the roll. Works great so far, had some power issues in the beginning but are soon ready to integrate it into Grocy