Making a sensor to detect if I'm in bed


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.

Any ideas? Thanks!


what about some like
weight sensor off ebay


Check this one:

I think it covers your needs.


Related thread on electronics forum with some ideas.


Awesome, lots of great ideas in there. Thanks, now I have something to do this weekend!


For an off-the-shelf solution the IFTTT capable Nokia Sleep should be released soon,


Ok, that Nokia thing is cool … Super cool … :slight_smile:


According to TechCrunch it should be released “ first quarter of 2018 for $100.”


US only? Or something for the rest of the humanity? :stuck_out_tongue:


Should be available online from the UK store.


Will be shipping in 1 - 2 weeks and currently 2 are available for 169€… sounds like a good deal if it works as intended :slight_smile:


Hi everybody,

I’ve got a solution which is cheaper than Nokia Sleep but more expensive than a made-self hardware !

I placed a Fibaro Door Sensor under each side of the bed (under each person) !

This solution depends on kind of bed you have !

When it well placed, if a person is on the bed, the contact is done:


My bed slats aren’t that flexible but it’s an ingenious solution.


That Nokia Sleep seems nice! Anyone got experience of IFTTT, is the delay acceptable?


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.


Just ordered a Nokia Sleep. The API link is here. Will take a look when mine arrives :slight_smile:

Nokia Sleep senor support

Have a look at this, I made one for approx $30 with parts from China and is working fantastic.



Using eight sleep component for that, combined with a power usage sensor (zwave) to detect if my phone is charging.


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.