[RELEASE] Presence Plus - Creates a combined presence device

Thanks, so you want a delay in setting in setting the 'Not Present'? I'll add it to the to-do list. :wink:

Well... an optional delay on both present and not present would be nice! Here's my use case but I am sure there are others...

I use an "agentless" approach to presence tracking via iPhone. Ihave four separate methods of detecting whether the iPhone is present or not. If all fail to detect presence for at least 4 min, I decide the person is not present. If all four register not present but then within that 4 min window one or more register present, I decide the person is present again.

Screen Shot 2022-01-13 at 1.23.25 PM

And yes I know Life360 or Geofency would probably be easier but S/PAF prevents my use of such apps.

2 Likes

Isn't that what this option does? I've been using it for a while now.

Hmmm is it? I assumed because they were in the failsafe section they applied to the failsafe ping... but not all rules.

Hi @bptworld -
Having a problem with a Presence Plus instance that uses only motion sensors as input. I have the app set to OR for arriving and "AND" for departing. However, when a motion sensor that is included in the Arriving group goes active, it doesn't seem to set the output device to Present. Delay field is blank.

Here's the log, let me know if you need to see settings as well. The output sensor was created by the app.

Here's an update. I did some debugging.
First, I created a disable switch (it was empty before). I tried it with that switch on and off (it isn't clear from the settings whether the switch enables when on or disables when on , as it's called an Enable/Disable switch. It would be good to clarify. From the logs, it appears that it's actually a disable switch - so I captured the log when the switch is off.

I also reduced the number of sensors being combined to make it easier to debug if the app was using an AND when it should be using an OR - but that doesn't appear to be the issue either.

I also enabled logging for the output device created by the app. The result is that the output device had no activity at all in the log. So it appears to me that the app is not talking to the device it created. (Note - I originally tried using a pre-existing device and then later switched to an app-created device when that didn't work. ).

Here's the latest log:

@bptworld not sure what's going on here with this instance. Any thoughts?

Neither do I, without a debug log and show me how you have it setup

@bptworld any thoughts on this?

You're going to have to show me more info. Screenshots of how you have it setup would help. Be sure you're on the latest version.

Hi @bptworld, I've just started using PP and so far so good (thanks for the app!). I did have a question though, I have 2 presence sensors and ping setup in the app. The departure is 'AND' and the arrival is 'OR'. Upon arrival the app fired twice almost immediately and created an arrival event twice (my rule triggered by an arrival fired twice). Is that expected or was this incident an anomaly since both presence sensors seemed to have been updated at the same time? Thanks!


EDIT: I noticed I accidentally clipped the 2nd ping handler completion during my screenshot. I don't think it matters, just wanted to be correct.

Can you show me how you have this setup (screenshots)?

Thanks

Sure... Note, the 30 minute poll happened about 6 or 7 minutes prior to this event.





Thanks, lemme know if you need anything else.

I see the issue, now I just need to think, think, think...

No worries, thanks for taking the time.

New bundle...

1.1.7 - 08/27/22 - Changing up the logic

Thanks, I'll keep an eye on it.

Hi @bptworld, again, thanks for all your work. This version appears to have a few copy/paste typos. Between lines 368 and 396 I was getting errors about can't act on a null...

EDIT: OK, after a couple of executions with debug logs, I noticed that it's a 'one', not an 'ell' (sorry the font makes it look the same) and that it should be in the astatus variable. So ultimately it looks like 3 locations 373, 380, 387 that should be state.a1status. Once I changed that, it looks like the app ran through OK and updated the correct presence.

Yup currently getting " errorjava.lang.NullPointerException: Cannot set property 'aStatus' on null object on line 373 (method statusUpdateHandler)"

After Update this morning I received my first error in ages

2022-08-27 10:00:17.181 am infoUpdating Bundle: https://github.com/bptworld/Hubitat/raw/master/Bundles/PresencePlus.zip

Received this when Presence was supposed to update
java.lang.NullPointerException: Cannot set property 'aStatus' on null object on line 373 (method statusUpdateHandler)