Hilarious yet 100% reliable and precise bed (slats) occupancy sensor

Looks like a cool solution to the problem. I wanted to go the pressure sensor and esp32 route but for me that has a problem: I want the sensor to be able to detect who is sleeping on which side. Sometimes when I go to bed late my wife sometimes sleeps on my side. I want to detect the weight to recognize if it is me or my wife on each side of the bed as I want to run different sleep automations than her.
AFAIK the pressure sensors just detect weight or no weight. I think this solution could work as I am significantly heavier the angle would be different between us. Has anyone tested this?

Also one caveat I see is that we have a box spring bed with a 25 cm thick mattress plus a topper. It does not have slats. Has anyone made it work on a box spring?

Hey! I am trying your method out currently, but I am using a Samsung contact sensor. I’m just not sure what you mean by “tune the zero point”. The y axis when the ruler is flat on my desk currently shows 43… so what would be your suggestion in terms of tuning your template? Thanks heaps! @Stooovie