Adding capabilities to presence sensor (user awake/asleep)


( Cosmo) #1

So what I have now is:
presence - mobile device: present/away
Virtual switch - awake/asleep (off/on)

This is so I can run routines and change modes accordingly. With my job my wife and my sleep schedule are usually offset by a few hours. Therefore I have automations that I only want running for her, or only for me, if one user is asleep Vs awake, and some that I only want to run while a specific user is present vs away.

I’d like to Declutter and combine the present sensor with a nested tile for the on off switch.
It would still maintain present/away, and sleeping/awake separately within the device screen, so no custom mode would be required.
However, in the main things or rooms view, I would like it to display:
Away; present-awake; present-sleep
So:
if [user=present and switch=off] then display [present - awake]
if [user=present and switch=on] then display [present - sleeping]
if [user=Away and switch=Any] then display [away]

I have absolutely no idea how to code a DTH or a presence sensor that will nest a switch, and no idea how to code The output value.
Is there anybody with experience that could whip this up, I would imagine it shouldn’t be terribly difficult for somebody who knows how to code, because it is just a DTH with two default device capabilities, and a slightly modified output value for the things/rooms screen display.

I do realize this is not a native device type/capabilities of a native device that outside services will not recognize it. But it should have no problem being recognized with CORE, which is where I intend to control the virtual switch capability from and monitor.

It won’t be set to mirror a virtual switch, so it doesn’t require a smart app. Can anybody help?

I modified a few screenshots in order to physically demonstrate what I’m thinking of in my head. I hope these representations help to make it clear what I’m talking about and want

Also pardon any spelling mistakes or weird grammar, I had Siri dictating this, we all know she’s not perfect


#2

I was looking into adding this functionality into a mobile presence project I have been working on. I wasn’t seeing anywhere within the SmartThings app to use this functionality (No sleep sensor options in routines etc.)

Maybe I’m missing something but the only way I’m seeing to actually take advantage of this would be with WebCore. If you have any more information, I would appreciate it.


( Cosmo) #3

we actually integrated this functionality into the webcore mobile presence sensor (webcore app).

check it out.
https://community.webcore.co/t/webcore-presence-sensor-sleep-capability-what-is-it-how-to-use-it/1350/29