How can I handle wake/sleep status automatically?

How do you guys handle automatic change of sleep / awake status of family?

Is there a way to do this without requiring them to go to the Homey app to change the status and without having a flow based on fixed times like “at 9pm, set Julian to status=sleeping” ?

1 Like

So I did this via an automation with the iPhone. When a certain focus is activated on the iPhone, I am automatically set to sleep. If this is deactivated again then wake up. And I then tied this to the condition that I am at home.

2 Likes

I use the Withings Sleep Pad, but it’s an expensive option if that’s all you want it for :slight_smile:

3 Likes

I actually DID look at that earlier (before getting the Homey) because I’m pretty interested in my sleep, so maybe I should try it out. I didn’t get it at the time because it was my impression that my Apple Watch already does this (and more) sleep tracking?

They’re very good and helped me find I have sleep apnea, which I then went to the Dr about and now have a CPAP machine. I now get a much better night’s sleep :sleeping: :zzz:

2 Likes

I have been using/trying out two methods:

  • A pressure mat (+/- €20) connected to an Aqara T1 water leak sensor;
  • A car seat occupancy sensor (+/- €10) connected to an Aqara T1 water leak sensor.

I placed them under my mattress. Both options work ok-ish, but are not perfect. There is no option in Homey to configure pressure thresholds. So you need to handle false positives/negatives in your flows to get a ‘good enough’ result. The occupancy sensor option gives better results in my experience and is also the more affordable option.

1 Like

But this is very cumbersome. Why don’t you do that with a focus on your phone or the alarm clock on your phone?

1 Like

Me and my partner have the Withings Sleep and it works quite well. But it doesn’t tell who is sleeping there like some times our dog likes to slep on the bed while we are away.

1 Like

Because it detects when someone goes to bed or gets out of bed and then sets the awake/asleep status automatically.

So you don’t have to perform a manual action, like setting your phone to a focus mode or via a fixed schedule.

Just for context: it’s just a matter of connecting the two wires of the pressure mat/seat presence sensor to the two screw terminals on the outside of the Aqara sensor. You only need a screwdriver.

1 Like

What do the 2 screwterminals do ? You ‘fake’ a leak by short wire these ?

1 Like

The two terminals are normally used to detect water: in case of a leak the water completes the circuit between the two terminals (located at the bottom of the sensor).

Since these screw terminals are easily accessible, you can also connect other things to it. The water sensor basically acts as a binary sensor: completed circuit = alarm on; incomplete circuit = alarm off.

Both the pressure mat and seat occupancy sensor have two wires that you can connect to the terminals. Then, when you apply pressure to the mat/occupancy sensor, the circuit completes and the alarm of the water sensor goes on. When you release pressure, the circuit is not complete anymore and the water sensor’s alarm goes off.

4 Likes

Thanks! Nice to know, could potentially open up a range of applications!

1 Like

Currently working on this right now. I use a hold-click on a Flic switch on my nightstand that tells Homey I’m going to sleep. I use the same switch to turn off my alarm that I set in my Sonos (single-click). The click runs a flow that turns off the alarm and switches my status to Awake.
It’s still s work in progress but so far so good.

1 Like

@SunBeech whats about the max current you can apply to the terminals ?
Probably only low voltage ?

It is the Aqara water sensor that is powering the terminals. The attached peripheral is only an extension of its circuit, like a switch. The Aqara uses a standard 3V CR2032 battery.

1 Like

Ok, so it’s a ‘dry’ contact.

Thanks !

Might be mis-useing this setup sometime :smiley:

No, it doesn’t switch, it can’t switch things on/off.
It only starts an internal action by connecting the contacts with a wire. Or by using a dry contact from any other device.

Sorry, that’s what I ment, you need a device with a dry contact.

Still, it creates possibilities…

Hello, I have a less direct approach, I use all of my house devices to detect activity, and when my house zone is inactive since 10 minute, and I’m at home, then I’m sleeping.

I simulate my house activity as soon as one of my lights or computers are on.
Each 5 minutes, I check if my lights or computers are off, then I stop the simulated activity.

To simulate the activity, I use a “Virtual Device” from Arie J. Godschalk, with device class: Home Alarm, configured as a motion sensor.
That allow me to switch activity on or off in flows

1 Like

I used 2 Withings Sleep mats for last 3 years, but recently one of them stopped working properly (keeps inflating, doesn’t properly recognize presence). As I’ve read on the net, it’s a trash now, not able to repair… So I found much cheaper alternative: Bed Presence for ESPHome — Elevated Sensors
Waiting for it to arrive, ordered a week ago. :slight_smile: