webCoRE presence sensor: Sleep Capability (What is it; how to use it)


#12

It’s a great tool. use this to trigger the sleep capability in the DTH if you want to!


#13

I already do, see my example piston I posted :slight_smile: https://community.webcore.co/t/start-good-night-routine-with-motion-and-sleep-on-android-app/


#14

What would be cool is for the iOS app, is to tap into HealthKit. The iPhone seems to be able to track my sleep pretty well (not sure how it knows when i go to sleep…i do have ‘Bedtime’ configured but don’t actually follow it rigorously). That way, the sleep toggle for on/off does not need to only rely on pistons firing or events happening…just getting the data from the phone itself to sleep and wake. :slight_smile:


#15

@ady624 can the mobile app tap healthkit?


#16

Sleep doesn’t seem to work anymore :slight_smile: On the ST app, hit Sleep and when you refresh it’s back to awake. Tried using a piston to set it to asleep and doesn’t as well. Is this happening for everyone else?


#17

No. But I’m on the road a couple more days. I’ll try when home


#18

I’m having no problems with any of my pistons that sets the WebCore DTH to Sleep or Awake. It works great for me:

I trigger it using the piston I posted above and have a few other pistons as well that triggers it with my good night (set to sleeping) and good morning pistons (set to not sleeping)


#19

Found out the issue. I was testing it while i was out from home. It only stays asleep if you’re at home - which makes sense!


#20

My current setup is pretty basic in terms of devices, so this isn’t something I can test myself. So far I just have contact sensors on the exterior doors and ground floor windows, no motion sensors. I’m also still (slowly) adding smart switches, so my light control ability is limited (I have two hallways that are both 5-way circuits, so that adds up quickly). But I was wondering how well this works with pets. Do you have to rely on the motion sensor’s ability to ignore pets (which I never really trust)?


#21

I don’t get how this feature is accessed. I think I am missing something. Is there a tutorial on this? Or how do I get this ability in webCoRE?


#22

@Cozdabuch

I click “Asleep” tile, being at “Home”, but nothing happens.

In live logs I see error:
“java.lang.NullPointerException: Cannot invoke method sort() on null object”

I am using Android phone. Am I missing something?


#23

@pcgirl65

Ok, first, the capibility is nested within the webcore presence sensor that is part of the webcore app for your smartphone.
Second, think of the sleep status similarly to a virtual switch with on/off capability.

In and of itself it doesn’t do anything. It’s not an actually a physical device, nor is it automatically triggered.

That said, it is a separate capibility within the presence sensor DH, (again, the same as if a virtual switch was nested within the DH).

The ways I use it:

I use Alexa/IFTTT to trigger my sleep and wake routines:

Alexa:
“Alexa, trigger Goodnight”

IFTTT:
when alexa triggers “goodnight”, send webhook(a)

Webcore:
when IFTTT webhook(a) runs, set 'Presence sensor - cozdabuch' to sleeping
when 'Presence sensor - cozdabuch' changes to sleeping: [goodnight actions run]

and

Alexa:
“Alexa, trigger Good Morning”

IFTTT:
when alexa triggers “good morning”, send webhook(b)

Webcore:

  • when IFTTT webhook(b) runs, set 'Presence sensor - cozdabuch' to not sleeping

  • when 'Presence sensor - cozdabuch' changes to sleeping: [good morning actions run]

I also have certain things happen/not ‘only when’

_ONLY WHEN: _
'Presence sensor - cozdabuch' is not sleeping
'Presence sensor - wife' is not sleeping

  • if master bathroom door opens
    – then turn on master bathroom lights

or

_ONLY WHEN: _
'Presence sensor - cozdabuch' is sleeping AND 'Presence sensor - wife' is sleeping

if any of 'Presence sensor - cozdabuch' or 'Presence sensor - wife' change to awake

  • Thermostat: Downstairs set to heat
  • Thermostat: Downstairs set to 72

Hopefully this helps getting some idea what the sleep capability is and good ways to make use of it.


#24

You can trigger it to sleeping or not sleeping any way you want, I simply use alexa.
But you could have it set to

if time is between say 9pm-1am,
if user 1’s nightstand lamp turns off
or maybe bedroom lights turn off
or whatever you want.

same goes in the morning. have it by a preset action like the bathroom door opens, bathroom lights come on, motion in the hallway, alarm turns off, or maybe even a specific time every morning (say on the weekdays only), etc.

basically whether you trigger it manually or automatically, it doesn’t matter, it’s simply there to “track” whether a user is asleep or awake. almost like having a mode for a user rather than the entire hub itself


#25

@btrial

Double check that your WC smartapp is the lastest version.
Then check your device handler (WC presence sensor) is the latest version
Also, if using iOS, you can DL the WC iOS app directly from the appstore.

Let us know if you’re still having issues


#26

Can you do the same thing with Modes? ie: Goodnight, Good morning?


#27

I suppose you could but unless you’re living alone, or you and other people in the house are on the exact same schedule, you have to start having multiple modes to cover for who is awake or asleep.

What happens when you control or restrict your automations based on modes when one person is awake and the other is asleep.

The sleep feature Really shines in multi user households.


#28

Could you integrate this with Fitbit?


#29

you can use it with anything compatible with ST.

it’s just a ST device that you can trigger.

Say:

if FITBIT changes to sleeping
then WebcorePresence:sleep change to sleeping

if FITBIT changes to awake
then WebcorePresence:sleep change to not sleeping

I don’t know if fitbit integrates with ST directly or not. If it doesn’t you can use IFTTT.

IFTTT:
IF FITBIT changes to sleeping
THEN send webhook A

Webcore:
IF webhook A is received
then WebcorePresence:sleep change to sleeping

IFTTT:
IF FITBIT changes to not sleeping
THEN send webhook B

Webcore:
IF webhook B is received
then WebcorePresence:sleep change to not sleeping


#30

Is there a way to turn this into a virtual presence sensor for those that don’t have phones? If not is there a virtual presence sensor with sleep capabilities or other capabilities. I can’t find one.When I try to just create one it won’t let me manually change the presence.

Also how can I use what floor someone is on I see it on the app? That would really be helpful as well for things like waking and security sense everyone sleeps on the top floor of my house.

Also I use the sleep capability with this Withings/Nokia Sleep - Sleep Tracking Pad IFTTT throws a virtual switch in ST which then sets my presence to sleep. Very useful for bedroom motion detectors that turn on lights.


#31

Sure.
Create a generic device in IDE, then reassign DH to this one.