Homey Community Forum

Good way to detect if we are sleeping

Hey all,

I’m struggling with the following : I have a “sleep” mode virtual switch, if that is turned on, behavior of lights, temperature and alarms is changed. I’ve now configured that it listens to a Hue Tap sensor, if you tap it it switches between on/off on the virtual switch. Works fine, but sometimes someone forgets to tap te button and it stays in sleeping mode, or the other way around and then lights/temps etc are not working as expected.

What do you guys use to determine if everyone is sleeping or not?

Dennis

Put a plug with energy meter before your phone charger.

If - energy is greater than 0
And - nobody is sleeping
Then - Mark as sleeping

If - energy is exactly 0
And - someone is sleeping
Then - Start countdown timer of 8 hours

If - Motion is detected in stairway
And - Countdown timer is running
Then - Mark as Awake and stop countdown timer.

The trick with motion sensor and countdown timer is needed because your phone charges faster then you get your rest.

2 Likes

Ok, and what if countdown is running and for some reasson you walk the stairway and its still in the middle of night?

not really a night-peeing person myself but I think that is easily overcome by:

  • add an extra condition. e.g. it’s after 4:30 AM
  • change the motion sensor in the stairway by e.g. a contact sensor in your sock drawer or something else that is part of your daily morning routine.
2 Likes

Just was curious :+1:

And another thing, probably you already have that tackled. But what about the Phone charger thats plug in whole day? or do you manuely plug it in for the night.

Just because of safety reassons (we al know the risk of leaving the charger in) Do you let it be switch off when homey sets you awake!!!

1 Like

Actually the charger is now ON all day long (build in Qi-charger in nightstand). But your comment makes me think about expanding the flow a little further. Thanks for that.

2 Likes

Yw, i let switch on, at 21.30 uur and when at home. And let it switch of again when the alarm clock goes or if i dont have set a alarm, when my daily routine start with making coffee

1 Like

I’m thinking of using my indoor Netatmo base unit for the same purpose.

It measure co2 and noise.

When time

And co2 < 600

and
noise < 40 db

Then sleep.

2 Likes

I am using an Aqara vibration sensor and an Aqara motion sensor. Those are really cheap.

I’ve got the vibration sensor under the mattres. It is not perfect as it is not possible to change the sensitivty of the alarm with the zigbee protocol in Homey. But I am using change of vibration strength as trigger. (must be above 3, to avoid false triggers).

The montion sensor is placed under the bed. When it is triggered it marks me as awake. It also turns on lights under the bed that lightens the floor just enough to walk around. It also disables the flow for the vibration sensor for like 8 minutes for cases like “I get in the bedroom sit down on the bed to put on socks.”

Just curious, and thinking… whats happend when got out of bed in the night for going to the toilet or whatever reasson?

The motion sensor under the bed detects me getting out of bed. Turning on ligths that is needed. When I get back in bed the vibration sensor detecs that I am back in the bed.

But I am using change of vibration strength as trigger. (must be above 3, to avoid false triggers).

Good Day. How it is possible?

I am using withings sleep through ifttt for this.
This is working really well. A bit expensive though :cry:

1 Like

We have to nightstand lamps by our bed that turns on when someone enters the bedroom. On the bedstand there is a double-button that turns the lights off when you are about to sleep. This also activates sleep-mode.

I use two flic buttons on our bedside tables that put us to asleep and awake. I also use ‘reset flows’ that configure my apartment to default settings. I use this to mark everyone as awake, reset my light scenes to ‘normal’ etc. This flow just fires at 14:00.

Power consumption on plug

Related: https://hackaday.com/2019/09/11/does-your-home-assistant-know-when-you-are-sleeping/

I recently found this:
https://www.robbshop.nl/drukmat-aanwezigheids-sensor?sqr=druk&

and this:
https://www.robbshop.nl/drukmat-aanwezigheids-sensor-rond?sqr=druk&