Are you a webmaster? Find out how to easily add Textise to your web site.


This page has been Textised!
The original page address was https://hackaday.com/2019/09/11/does-your-home-assistant-know-when-you-are-sleeping/?share=1

Skip to content
Does Your Home Assistant Know When You Are Sleeping?
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.

Posted in Arduino Hacks Tagged bed occupancy, home-assistant, load cell  Post navigation
18 thoughts on “Does Your Home Assistant Know When You Are Sleeping? ”
  1. Justin says: 
    We need a sensor as well we just call them eyes or ears.

    1. Shannon says: 
      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.

      1. James Newman says: 
        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?

  2. Stefan says: 
    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..

    1. Tim says: 
      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.

  3. mike says: 
    ” I found myself wanting a way to automatically switch everything off at night. ”
    Uhhh….. every try “Hey alexa, turn off lights.”

Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search Never miss a hack Follow on facebook Follow on twitter Follow on youtube Follow on rss Contact us Subscribe
If you missed it More from this category Categories Our Columns More from this category Recent commentsNow on Hackaday.io
By using our website and services, you expressly agree to the placement of our performance, functionality and advertising cookies. Learn more



Textise: Back to top

This text-only page was created by Textise (www.textise.net) © Textise - CPC LLC
To find out more about our product, visit Textise.org.