[RELEASE] Presence Plus - Creates a combined presence device

New version on GitHub...

1.0.9 - 04/03/21 - Fixed error

1 Like

Still having issues, I'm afraid. Different null pointer exception. Although on its face it might be because the devices have still not populated with any state. Not getting any state at all, no presence, nothing.


I believe my nullPointer exception errors are attributable to the fact that I forgot to select the output sensor. Sent you a pull request to make that input field required.

With the ability to use ping on the hub now, could you possibly add a ping option for detecting presence? Kind of like the old iPhone Wifi Presence driver but with ping instead of an HTTP endpoint check.

hubitat.helper.NetworkUtils.PingData pingData = hubitat.helper.NetworkUtils.ping(ipAddress, numPings.toInteger())

if (pingData.packetLoss < 100) 
        updateAttr("presence","present")
    else 
        updateAttr("presence","not present")
1 Like

I've added it to the list. (I actually wrote it down so I don't forget! :wink:)

1 Like

Just wanted to update, I've added this to the app BUT there seems to be some issues with it. It only works with the C7 hub. I was pulling my hair out trying to figure out what I was doing wrong (my development hub is a C5), just couldn't get it to work. So I came back to the forums and did some searching, sure enough, a lot of people can't get it to work on their C5's. I then loaded PP on to my C7 hub and BINGO, worked right away!

So, I'm going to go forward and put the final touches on it but the option will only be available to C7 users. Hopefully this is addressed with the next release.

1 Like

New version... Tons of new code, Please make sure to check all of your existing child apps.

1.1.0 - 06/24/21 - Added IP Ping option, Added Motion to options, Reversed how Contacts work, upgraded device creation and logging options

1 Like

Having trouble with the app setting the correct presence. The app sets presence to Present even when ALL presence sensors report Not Present. Here’s the log:




I input “2” for the number of sensors needed to change to present or not present

I'll be looking into this. The thing that jumps out in your log is the "theArrNum: null". Needs to be a number for the app to work. ie. theArrNum: 1

Try recreating the child app.

Thanks

Thanks. Definitely throwing off my smart home!

I recreated the child app but get the exact same result:

1 Like

Don’t suppose you’ve had a chance to look into this yet? Not trying to rush you, but just making sure it’s still on your radar :slight_smile:

I looked at it once but didn't see anything. Gonna have to dive in again.

Take the new version for a spin and let me know how it goes...

1.1.1 - 08/03/21 - Many changes

2 Likes

New version...

1.1.2 - 08/05/21 - More changes

@bptworld can you take another look at the app? I have been having issues with the app ever since it was updated to 1.1.0. I feel like there is still something not right with the not present logic. I have 4 different types of presence sensors (ST presence sensor, BT sensor, WiFi and Hubitat app) aggregated by Presence Plus and have set the not present to trigger when two of the four sensors are not present. There can be two or even three sensors not present and it will not trigger. I know that @project003 has been having similar issue to me as well. Thank you.

Sure, but I need a debug log (screenshot - not from a cell phone. :wink:) to look at.

I will grab those tomorrow when my wife and I go to work. Just hanging at the house on a lazy Sunday.
Thanks for your help.

I have noticed it has not been triggering as well. If I do a single sensor it is more consistent but once I add the others in I very rarely register as leaving or arriving. I haven’t been able to pull any log yet but will next time I leave and arrive. It started for me after the last update. I even deleted my combined presence instance and added it back.

I want to clarify, the individual presence sensors register but just not the combined.

A question about the logic/flow. If I have the same 4 presence sensors aggregated together for both present and not present, the switch set to off(for or), and none of the other options chosen, then would I always be “present” as long as one of them shows present or does it evaluate on a change to/from present?