# Good way to detect if we are sleeping

**URL:** <https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000>\
**Category:** Flows\
**Created:** [June 3, 2019, 2:17pm UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000 "2019-06-03T14:17:21Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Russell\_S](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/russell_s/32/45779_2.png) [@Russell\_S](https://community.homey.app/u/Russell_S)\
**Post date:** [October 2, 2021, 8:47am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/25 "2021-10-02T08:47:27Z")

</div>

> [@Edwin\_D](#):
>
> Google Nest Hub 2nd gen

That’s the one I was thinking of.. Got mixed up with the echo..

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 2, 2021, 9:08am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/26 "2021-10-02T09:08:46Z")

</div>

I’m not sure which version as I didn’t realise there is more than one. I have had one of mine for about 18 months and the other for about 6 months if that helps.

It has its own connection. The phone is just required for setup, after that it uses WiFi.

I have one under my side of the bed and the other under my wife’s side, so it even knows which of us is in bed (provided my wife stays on her side).

---

<div class="post-metadata">

**Author:** ![Daniel\_Pointer-Tax](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daniel_pointer-tax/32/25357_2.png) [@Daniel\_Pointer-Tax](https://community.homey.app/u/Daniel_Pointer-Tax)\
**Post date:** [October 3, 2021, 7:20am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/27 "2021-10-03T07:20:28Z")

</div>

I use these mats too, for my partner & I. Works very well. You do get a lot of data about how much deep sleep you get, how often you woke up and even if you snored or had apnea. It’s not great for using in Flows though as if I get out of bed and Homey marks me awake, to maybe switch on some lights & turn off the House Alarm for example, and then my partner rolls over to my side of the bed, Homey will mark me as asleep again and so could then trigger other flows which I don’t want. Haven’t worked out yet how to refine this, but will keep trying.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 3, 2021, 8:08am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/28 "2021-10-03T08:08:41Z")

</div>

> [@Daniel\_Pointer-Tax](#):
>
> and then my partner rolls over to my side of the bed, Homey will mark me as asleep again

I have the same problem and the only solutions I can think of is to get separate beds or put a barrier down the middle of the bed 😁

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [October 3, 2021, 8:14am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/29 "2021-10-03T08:14:22Z")

</div>

You can use a logic card in the And… section to prevent turning on „Asleep“ again. In addition you can also use time cards. But it depends all on your and your wife’s behavior. So it’s not easy to give you a clear answer or an example.

---

<div class="post-metadata">

**Author:** ![Daniel\_Pointer-Tax](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daniel_pointer-tax/32/25357_2.png) [@Daniel\_Pointer-Tax](https://community.homey.app/u/Daniel_Pointer-Tax)\
**Post date:** [October 3, 2021, 8:40am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/30 "2021-10-03T08:40:33Z")

</div>

Ah Logic cards, that’s something I haven’t delved into yet. I guess I need to start experimenting with them. Thanks for the tip! Here’s a little tip for you: ‘Partner’ can mean Male or Female 😉

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [October 3, 2021, 9:48am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/31 "2021-10-03T09:48:50Z")

</div>

Oh, excuse me! It wasn’t intentional… 🏳️‍🌈

---

<div class="post-metadata">

**Author:** ![Wout-1976](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wout-1976/32/175413_2.png) [@Wout-1976](https://community.homey.app/u/Wout-1976)\
**Post date:** [October 3, 2021, 8:36pm UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/32 "2021-10-03T20:36:49Z")

</div>

Can u share your flows with us?

---

<div class="post-metadata">

**Author:** ![Otter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/otter/32/11467_2.png) [@Otter](https://community.homey.app/u/Otter)\
**Post date:** [October 4, 2021, 10:43am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/33 "2021-10-04T10:43:40Z")

</div>

I use this too, mainly for my apnea but also acts as a pressure mat for homey

---

<div class="post-metadata">

**Author:** ![Otter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/otter/32/11467_2.png) [@Otter](https://community.homey.app/u/Otter)\
**Post date:** [October 6, 2021, 6:40am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/34 "2021-10-06T06:40:48Z")

</div>

You could use a series of flows

Flow 1

IF withings detects pressure  
AND the time is after sunset  
THEN mark me as asleep  
AND enable flow 2

Flow 2

IF Withings went out of bed  
AND the time is between 07:00 and 08:00  
THEN mark me as awake  
AND disable this flow

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [October 6, 2021, 8:01am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/35 "2021-10-06T08:01:12Z")

</div>

> [@Otter](#):
>
> AND **start** flow 1  
> AND **stop** flow 2

I guess you mean enable and disable (resp. activate/deactivate, I don’t know the right englisch wording in the Homey app). “Start a flow” is something else, and “Stop a flow” doesn’t exist.

> [@Otter](#):
>
> Flow 2
> 
> IF Withings went out of bed  
> AND the time is between 07:00 and 08:00  
> THEN mark me as awake  
> **AND start flow 1**

There is no need to anable flow 1 because flow 1 has not been disabled at all.

---

<div class="post-metadata">

**Author:** ![Otter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/otter/32/11467_2.png) [@Otter](https://community.homey.app/u/Otter)\
**Post date:** [October 6, 2021, 8:13am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/36 "2021-10-06T08:13:08Z")

</div>

Yes disable is what I meant 😉 thanks

Indeed enabling flow 1 is not needed it wil activate by sundown. I’ll edit it

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [October 6, 2021, 1:37pm UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/37 "2021-10-06T13:37:28Z")

</div>

> [@Adrian\_Rockall](#):
>
> I use the withings sleep mats

I also use and can recommend these mats, they are fantastic and responsive.

I turn on night lights when I get out of bed in the middle of the night - and then off again when I get back in.

---

<div class="post-metadata">

**Author:** ![Shakesbeard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/shakesbeard/32/15112_2.png) [@Shakesbeard](https://community.homey.app/u/Shakesbeard)\
**Post date:** [October 6, 2021, 7:37pm UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/38 "2021-10-06T19:37:38Z")

</div>

> [@Remco\_Hendriksen](#):
>
> I am using withings sleep through ifttt for this.

Works very well with the Withings App itself too and now supports multiple users too.

---

<div class="post-metadata">

**Author:** ![Daniel\_Pointer-Tax](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daniel_pointer-tax/32/25357_2.png) [@Daniel\_Pointer-Tax](https://community.homey.app/u/Daniel_Pointer-Tax)\
**Post date:** [October 8, 2021, 5:33am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/39 "2021-10-08T05:33:25Z")

</div>

Thank you, I’m going to try this!

---

<div class="post-metadata">

**Author:** ![Otter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/otter/32/11467_2.png) [@Otter](https://community.homey.app/u/Otter)\
**Post date:** [October 8, 2021, 6:23am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/40 "2021-10-08T06:23:32Z")

</div>

Tweak it after your own wakeup time ofcourse but this should do the trick. When your partner rolls over to your side the flow was already disabled.

---

<div class="post-metadata">

**Author:** ![Daniel\_Pointer-Tax](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daniel_pointer-tax/32/25357_2.png) [@Daniel\_Pointer-Tax](https://community.homey.app/u/Daniel_Pointer-Tax)\
**Post date:** [October 8, 2021, 8:46am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/41 "2021-10-08T08:46:48Z")

</div>

Yes, I can see how it would work. I never thought of using 1 Flow to enable or disable another Flow before - this opens up a whole new set of possibilities!

---

<div class="post-metadata">

**Author:** ![Jan.Erling.Sagen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan.erling.sagen/32/9257_2.png) [@Jan.Erling.Sagen](https://community.homey.app/u/Jan.Erling.Sagen)\
**Post date:** [October 8, 2021, 1:11pm UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/42 "2021-10-08T13:11:00Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/7/a74aeabf1d8760fd96f10f9e91a07bd63fdfce3c.png)  
And a second one where the motion sensor sets me as awake if it is triggered

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [October 11, 2021, 7:43am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/43 "2021-10-11T07:43:13Z")

</div>

Can you share how reliable this works for you ? I’m having recently issues with Aqara Vibration sensors not updating their Vibration strength values…

---

<div class="post-metadata">

**Author:** ![Jan.Erling.Sagen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan.erling.sagen/32/9257_2.png) [@Jan.Erling.Sagen](https://community.homey.app/u/Jan.Erling.Sagen)\
**Post date:** [October 11, 2021, 10:25am UTC](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000/44 "2021-10-11T10:25:55Z")

</div>

It works very well. Except once this summer when battery level probably got to low and since I away on 3 week leave, I had to re-add the device.

[Previous page](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000.md?page=1)

[Next page](https://community.homey.app/t/good-way-to-detect-if-we-are-sleeping/14000.md?page=3)
