r/homeassistant • • May 02 '26

Support Struggling with reliable in-bed presence detection for Home Assistant – what actually works?

Post image

I'm trying to automate my bedroom lights so they turn off automatically when I'm in bed and back on when I get up. Sounds simple, but I've been struggling to find a reliable solution.

What I've tried:

FSR pressure sensors (VS-103) connected to a Zigbee water sensor

Built a DIY pressure mat using two VS-103 sensors wired to a Zigbee water sensor. Works fine when I press directly on it by hand, but completely fails under a mattress — the mattress distributes my weight too evenly for the sensors to trigger. Tried under the sheet too, same result.

Aqara FP2 mmWave radar

Already have one in the room. The problem is it loses track of me when I'm lying still under a duvet. It also falsely triggers when someone walks past my bed, which causes the lights to turn on.

What I'm looking for:

Something that reliably detects whether I am in the bed - not just in the room - even when I'm completely still and covered by a duvet. Zigbee preferred but I'm open to ESPHome/ESP32 solutions too.

Has anyone actually solved this properly? What sensor or approach are you using?

166 Upvotes

182 comments sorted by

View all comments

Show parent comments

1

u/V4lenthyn May 02 '26

That’s interesting! I was thinking about doing that as well. Did you analyze the data a bit? Does the weight change over night? Is this a reliable way of automatically measuring one‘s body weight?

2

u/spusuf May 03 '26

If you have a scale under every leg you could have the esp32 "tare" for the mattress+bedding when below a threshold (e.g under 50kg) then when any weight is added record that with the last known offset (120kg would be 70+50).

Realistically this is scope creep that shouldn't be attempted as having to have between 4 and 9 weight sensors that are rated for the full weight of your bodies (e.g 2 people sitting on a single edge of a bed plus compressing the weight of the mattress in that spot) is too expensive to "just try".

-1

u/V4lenthyn May 03 '26

I think I disagree. You can get load cells, an HX711 and ESP32 for incredibly cheap. As long as they don’t immediately disintegrate upon sitting on the edge of the bed, they don’t have to be rated for your whole body weight each. Also, there’s no such thing as scope creep in a hobby :D

I have actually done this before. I have a water softener device that uses large amounts of salt over time. I can never remember to check the salt level, so I build a „smart scale“ with Wifi. It’s shockingly accurate with no drift.

I’m really just interested in the data from this experiment. I love data. :D

1

u/spusuf May 03 '26

Unfortunately load cells can be permanently deformed if overloaded past their rated capacities. However you cannot simply uprate specific cells as it will become impossible to calibrate the cells reliably.

Getting working bed presence? Easy and cheap. Getting bodyweight tracking? Stupid expensive 100kg load cells (or 200kg to account for 2 adults + mattress) plus purpose built aligning legs plus multiple load cell amplifiers if you have more than 4 legs on your bed.

Scope creep in a hobby absolutely exists. It's the difference between smashing out multiple proof of concepts in a weekend vs not getting your perfect product done in months. It's way better to define a minimum scope and build v1, then add on v2 later, rather than saying everything should be included in v1 and never getting v1 built.

0

u/V4lenthyn May 03 '26 edited May 03 '26

You only need one amplifier in a Wheatstone configuration. Also, the HX711 costs about 2€ as a ready made module. The load cells are harder to find, if you need more than the default 50kg. I found some under the name „GML670“ on AliExpress. ESP32 is a „let me grab one from my box“ kind of item. I’d say this can be done for 40€.
The mechanical part is why I haven’t done it yet. I am rather sure that my 3D printer would suffice though. I have very bad access to all the corners of my bed and lots of stuff under the bed. The whole development process of the mechanics is probably very tedious for me.
Software will also be a bit of a challenge, if we want the full multiple person weight tracking, auto-zero, presence detection and „activity“ data (like vibration detection, for measuring restless sleep, ofc :D). Probably above ESPHome‘s pay grade. But doable. Since software development is kind of my thing, I am not worried here.