[RELEASE ] Virtual Presence Sensor

I created this for my needs, but decided I should share it as others may be interested in it.

With the new app I was not able to easily see who was present at my home, and who was away (with the classic app I was able to do this easily). With the new app, I was originally using a virtual switch with automations to track everyone’s mobile device, but I never did like how it appeared (I may be a little OCD…).

So, I created a new virtual presence sensor device handler:

Once installed in the groovy IDE, you can create a new device. To track a person’s mobile device, setup an automation to turn on or off the device with a mobile device being present or away. You should also be able to use it in webCore, but I have not tested it out.

3 Likes

Or users can use the simulated presence sensor that is offered in IDE. Simply go to the devices section, click on add device and select the simulated presence sensor for device type and fill in the needed fields. :slight_smile:

It works with automations and webcore.

3 Likes

I have tried that, but nothing shows in the automations. This is why I quickly created this device handler.
Something I didn’t do correctly or its not working with me.

Have you tried this lately? I can get the virtual presence device to show up when configuring the automation, but after I save it and then open it back up, those devices just disappear from the IF condition section.

This is a known problem that started happening in late January or early February. #2 on the “broken features“ list. It doesn’t matter which DTH you use, they are all broken in this way, although it may depend on which operating system your phone uses and on exactly how you are using it. :disappointed_relieved:

Broken Features [Feb 2021]

There are multiple discussion threads about it.

1 Like

old post and things have changed since then :slight_smile:

2 Likes

Bummer. My searching of other topics failed me (thrown off track by all the complaints from people using phones and not virtual devices).

Guess I’m still stuck with doing it in SmartLighting (which seems to randomly just stop working) or WebCore.

Thanks for the reply.

1 Like

The simulated presence sensor never worked for me, so this is why I created my own virtual presence sensor.

Just tried adding it to an automation and saving it. Then went back and it was still there for IF condition. It seems to be working for me.

(what doesn’t work reliably for me is presence from my wife’s and my mobile devices, which ST has still to solve. But I’ve now moved all my automations to Home Assistant and no more issues)

I have no problem with virtual presence in Automations. I just tried it with two different handlers and it saves fine (Android).

One of the first things I tried was your DTH. It does not work for me either. I have iOS, though - maybe that’s part of the issue?

Ah, I see. It works if I use the on/off capability. If I switch it to presence capability, it vanishes once I save and re-open it.

1 Like

I’m not sure of all the details, but I know engineering has acknowledged there is a problem. It may only be certain operating systems or exactly how you’re using it, but it is an ongoing problem.

This is the sort of thing we really need to know more about to allow ourselves to avoid the problem.

The descriptions we’ve had of Automations and Rules make it sound like Automations are saved as Rules and then mapped back. That sounds like an unnecessary complication to me. Doing it one way sounds fiddly enough but at least it can be a one to one mapping. Backwards it can be many to one. Hopefully I’ve got the wrong end of the stick.

1 Like