It always gives us a sense of wonder when we realize that what would be a simple task for a human child is a big deal for a computer. For example, if you asked someone if you or someone else was in bed, that’s a pretty simple thing to check. For you, that is. For a computer, it requires some sort of sensor. [Lewis] used load cells to tell if someone is in a particular bed or not. He uses Home Assistant and has a great post about how he created and interfaced the sensors. Of course, the sensors really only tell you if something heavy is in the bed. It doesn’t know who it is or even that it isn’t an overstuffed suitcase.
Load cells aren’t exactly high tech. There are several different types that use hydraulic pressure or pneumatics to measure force. However, the most common that we encounter use strain gauges. A strain gauge is a resistor that changes value when it deformed and a load cell usually has several strain gauges wired in a bridge configuration so that small forces create larger output changes.
Although a bridge circuit is good for sensitivity, it can be a challenge to measure. [Lewis] used a breakout board with an HX711 amplifier and converter made especially for this purpose. With calibration, the load cells can measure weight accurately, but they are subject to some drift. We suppose if the people usually in your bed have very different weights, you might be able to identify who exactly is in the bed.
The software was simple since the HX711 has an Arduino library available. The hardest part might have been successfully creating a caster for the bed legs to push against the load cells. We saw a bathroom scale built in much the same way a few years ago. Of course, weight isn’t the only force you can measure with a load cell. For example, check out [sbkirby’s] bandsaw.
19 thoughts on “Does Your Home Assistant Know When You Are Sleeping?”
Somethin’ heavy could be jigging in that bed…you don’t really wanna get on that resonant frequency…it just ain’t decent!
I was thinking to same thing.
We need a sensor as well we just call them eyes or ears.
We can give the robots sensors but it’s really not the sensor that’s the tricky thing, is it? Understanding the sensor data is the problem.
Even then, a ‘child’ requires years of growth to make sense of those sensors enough to ‘understand’. I could maybe understand the comparison if we’re talking about learning… but there’s no AI involved here… so it just seems unrelated imo.
Since the correlation from the sensor to ‘someone is in bed’ is a pretty simple voltage comparison…. I’d say robots do this much much easier, and with far fewer senses… so I just really don’t understand the comparison.
Circle jerk about humans being soooo amazing, maybe?
I was planning on having Tasker or equivalent hook into my sleep tracker on my phone, and pushing the status to home assistant to turn off lights, and also pause my audio book reader. But alas, no time yet..
I believe my smart watch knows when I’m sleeping based on my heart rate and movement. It has wifi and bluetooth and an SDK to create apps for it. It’d be a little more in-depth but totally feasible and seems like it’d be the most accurate.
” I found myself wanting a way to automatically switch everything off at night. ”
Uhhh….. every try “Hey alexa, turn off lights.”
That’s not what automatic means…
but how do you turn off Alexa and all the devices that are still on and awaiting for its command?
Lucas circuit breaker?
“Now I can finally keep up with all of those different people in my bed”, said me never.
How do you know what your partner is up to when you aren’t there?
I want to use my sleep number bed with sleep IQ to do this. I have the bed already setup in home assistant, just need to setup the node red side to make it happen.
how do you plan to route the data to sleep IQ?
Does it know if I’ve been bad or good?
See comment regarding resonant frequencies, above. :)
Lol! Yeah, I thought of that after posting.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)