I am still very happy with @ogiewon’s Hubduino bed presence solution using FSRs. All documented here:
I have a heavy foam Tempur-pedic mattress and it works fine there. I had to tweak the settings to get things right and also you will see a post where I added cardboard strips on either side of the FSR to prevent the mattress from always pushing down on it.