Bed occupancy DIY sensor

Hi everyone,

I am glad that I found this topic there are a lot of good ideas. Let me share my experience with this bed occupancy sensor. It’s not the cheapest solution for sure but it’s very easy and reliable if you have z-wave integration. Also no continuous power supply required.

I ordered an inexpensive pressure mat for a few bucks and I also ordered a cheaper (used) Fibaro door/window sensor but the old version (FGK-101) which has input possibility. Detach the cover and connect the pressure mat wires to the terminals in the Fibaro using only a small screwdriver. That’s it.

It has to be positioned properly under the bed mat but for me it works perfectly in the middle. I also put a wooden plate on top to help on pressure distribution. The battery lasts for more than a year and it takes half a minute to replace. In home assistant it is visible as binary_sensor, no further setting is required.

I have to admit I had some problems with the initial setup. The first mat was very bad quality and released some air with time and became unreliable but I have no problem with the next version. I installed several of them. The sensitivity is not exactly the same with every mat, I had to play a lot to find the correct position for each and sometimes I use wooden plates to cover them or make a bottom cover as well.

You need two mats to monitor both sides of the bed, but if you don’t need to monitor who is sleeping then you may connect both mats to one Fibaro sensor.

fibaroCapture bos

3 Likes

@A320Peter, can you give an url for your using pressure mat? Also how it handles with large bed sleeping pad which has its own weight?

I don’t want to recommend any of them as these are all cheap chineese products and I had an issue with one of them. I guess they are sensitive to weight (long term) and pressure distribution. I used this and this and I am going to experiment with this.

I’m using one very similar to this with an Insteon window sensor with input… The two little contacts fit right into the input of the sensor perfectly.

It’s been rock solid for about 3 months now

Someone maybe create video for this DIY sensor?

1 Like

hay I did it this way

How did you make your chart so long? Mine is 1/6 of the screen

I’ve seen people using 3 different techniques here and I’m trying to figure out what would be best for me.

  1. Strain gauge (start of this thread) on slats
  2. Load cell + sensors (essentially turning your bed into a large weight scale)
  3. Pressure mats

Numbers 2 and 3 seem like they won’t work particularly well with a heavy foam mattress. Is that true?

Click in the title area of the chat, and it should fill up the screen

1 Like

wow thanks
don’t know why it doesn’t have cursor: pointer

can you put this in a chair?

@tom_l Can you share what regulated power supply you’re using?

I just got mine set up with your examples and also using a cheap 5V adapter, but would love to reduce the noise more.

When you say between bed frame do you mean between box springs and mattress? Thanks

no, between “slatted frame” and the bed frame, hope you can imagine what kind of bed I had… I just bought a new one without slatted frame and a 35cm Boxspring matress and don’t have any load cells implemented yet. no idea how…

1 Like

Thanks for the reply, I’m looking at the same problem. This bed is so heavy I would need a car jack to raise a corner to put in a load cell. By process of elimination I think I’m moving to FSR’s under the sheets. Maybe these https://www.adafruit.com/product/1071

Same here. I mounted 4 load cells between the slats and support frame - more info & discussion here (Slats are flipped up so you can see the sensors in the pic)

It’s been working flawlessly for months under a heavy foam mattress. It’s not getting actual scale numbers but if you adjust the sensor templates, you can set thresholds to tell you if there are one or two (or more) people or pets on the bed.

image

1 Like

i was thinking if this would be possible since most of the projects i’ve seen around were place underneath the bed posts. Thanks for this.

1 Like

@aaronpk, I’m very interested in if you were able to get this to work with multiple strain gauges and how. I purchased a few of these strain gauges and they just arrived today so I’m playing around with them. I’d like to be able to measure either side of a king bed but I’m worried that I might not have enough resolution in the slats to detect one person’s side of the bed vs. the other. My wife definitely doesn’t want me using load cells (because then I can see weight). :stuck_out_tongue:

Thanks,
-Greg

It’s been working reasonably well actually! For the most part it can tell the difference between both sides of the bed. It only gets that wrong if one of us is sprawled out. But I have it set up to report “number of people in bed” into HA, which I use to affect other automations, for example:

  • If the bedroom motion sensor detects motion, and nobody is in bed, turn on the lights
  • If the kitchen motion sensor detects motion, and one person is in bed, turn on only the countertop lights
  • If the kitchen motion sensor detects motion and nobody is in bed, turn on the overhead kitchen lights

That said, I’ve had a few problems with it over the last 6 months or so. Mainly the problem seems to be that the values tend to drift over time and I have to recalibrate the threshold for what “in bed” is. I wish I could figure out some way to trigger on the sharp change in value rather than looking for a simple cutoff, but I can’t figure out how to do that while also making it respond in under 0.5 seconds, which is my tolerance for whether it feels like it’s working correctly. So far, I’ve had to recalibrate it about 2-3 times in the last 6 months, so not too bad. And once it’s working, it works 99% of the time.

You can try the change rate attribute of the statistics sensor.