This has nothing to do with Presence Plus. Please post this over on Life360 with States. Along with a real debug log (not just one line) and a screenshot of how you have the app setup.
Will do. Sorry for the miss-post. You have so much going on code wise.
I noticed I had Location Tracker installed as a driver for my presence and Presence Plus loaded but I didn't add the app yet. I think I was going to multiple sensors at one point but got distracted.
I've backed out to simple Life360 with States to avoid all this confusion.
Cheers!
I'm just transitioning to this app to see if it can give me better presence detection. My first instinct was to configure present if 2 out of the 4 presence sensors say I'm present and to configure "not present" if 2 out of the 4 presence sensors say I'm "not present". What has real-world experience suggested about the best setting here in terms of a majority vote for presence sensors?
I'm setting it up that way and will see if it pans out, but I would certainly appreciate any insight from others who have tinkered enough with this setting to know what works best. Might save me from some (additional) grief from the wife...
EDIT: Hmm. If I have 4 sensors, and use 2 sensors for both present and not present, perhaps that will cause ping-pongs...
Quick look at the code suggests the pCount2 variable isn't getting set. Strange because it seems like ArrPresenceSensors2 || ArrConPresenceSensors2 should evaluate to true given my settings. Perhaps you can track down the issue being more familiar with the code.
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.
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.
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: