I’ve been thinking about making some sort of sensor to detect if I’m in bed or not.
I work out of town a lot, and on top of that I work nights, so my schedule is off the map. At 4am or 4pm I may or may not be home, I may be awake, asleep, just going to bed, or just getting up, so I can’t use calendars, alarms, time, bayesian, etc.
So I want to make a sensor I can put under my mattress or something to trigger going to bed/getting up automations, but I’m not sure the best way to go about it.
Would a FSR be the best way? Or load sensors under the frame? If I go with load sensors, could I wire up the ones out of a cheap bathroom scale? I’m not too familiar with tinkering with electronics but this little project would be as good a beginning as any.
Googling found some projects where people built sensors for a sofa using FSR’s to trigger a “watching tv” or whatever scene, but I’m not sure if it’s scalable to something queen bed sized.
from what i’ve seen after one night, the ifttt-connection is pretty responsive. it takes about 10 to 60 seconds until the ifttt-webhook triggers when i get into bed and about 2-10 seconds if i get out. setting the nokia sleep up seems pretty straightforward and simple and i like the app and how it shows the data it pulled out of my sleep phases.
nokia health offers a pretty well documented API, so there should also be a way to pull all kind of dfata out of it, once there’s a integration. for now, the ifttt-thing seems to work well, though the only triggers available now, are geting in and out of bed, which is fine for most automation purposes. once there’s an integration, one could get the actual time when one falls asleep or wakes up, which might also be nice.
For a simple (no bed modification) bed occupancy sensor I’m going to try putting an MS5611 Atmospheric Pressure Sensor in a drybag with headphone feed through. The headphone feed through allows power in and signal out to an ESP8266 board. Just slip the partially inflated sealed bag with the sensor inside between the mattress and one of the slats. Will let you know how it goes once the parts have arrived.