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


#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.