Compare Presence

So if I want to expand on this rule and include my wife's Life360 vs her App presence - can be done in same rule, or need second rule?

I simply cloned my Rule, and then edited the clone to use my wife’s presence devices.

This isn't exactly what you asked, but the Combined Presence community app can take two forms of presence and compare them to get a single output. It works quite well, and it has timeouts, logic, and everything built in. I use GPS, WiFi, and Smartthings presence sensors to get a picture of who is home.

The basic logic I use is if ALL of one person's sensors leave, they are AWAY. If ANY of the sensors are present, they are HOME. You can do ANY or ALL for away or arrived.

You could take this combined output and send notifications if you want to. If you are just looking to see if they are different and you are manually fixing the incorrect presence, this might help automate that for you so you don't have to manually reset things.

Combined Presence author here. I did put an advanced option in to have it send you notifications if any of the input sensors stay out of sync with the others for too long. However, I just realized I haven't seen one in a while (and I know my input sensors aren't THAT good.), so I might need to do some testing on it. It's unfortunately a cumbersome thing to test.

@bravenel

Ok, so I have had this working since the earlier post. What I have observed is Life360 is more accurate than the iPhone app. It seems if the iPhone trigger (entering/leaving geofence) is missed by the app - it stays out of sync. However, if Life360 misses an event - it eventually says "oh yeah, he's home (or gone).

I have found simply opening the iPhone app triggers a new geofence event and the status corrects. However, one time I found the app had "signed out" and I had to sign back in to correct - not cool.

Couple of thoughts. First, why is the app signing out - ever. If a person uses the app on rare occasions, but relies on it for geofence events, that is problematic.

Second, is there a way to "poll" the iPhone app and/or Life360. I know there is a "Refresh Life360" button and that seems to work - not sure how to tell an app to do that. What about the iPhone app - any way to trigger a refresh?

This would need to be like "while XOR do poll Life360 and iPhone app" and repeat every 5 minutes or such.

Here's what I have at this point:

Agreed. We will look into this -- it should not happen.

There is no polling mechanism for either that I'm aware of.

So Life360 app has a Refresh button that polls the service to check status of all devices - and pushing that button fixes incorrect location status.

I just tested with iPhone app and if I manually set myself as departed from HE device then either opening the app OR clicking "Send Geo Event" from settings page - either one will correct incorrect status.

We can send Device Notifications from HE to iPhone App devices, could we get a "button" that would trigger a "Send Geo Event" when pushed? That could solve this.

Where are you thinking this button would be?

Life360 has it here:

So likewise here:

Next to Device Notification

So you want to be able to do this when you don't know the actual geo-state of the phone? Because otherwise you could just press Arrived or Departed, right?

So if either status changes - and they don't match (xor) then I want to wait a minute (to catch up) then push both the Life360 refresh and iPhone App refresh button - once they poll they should then agree on location (inside or outside).

What I'm getting at is whether you could just know what state the iPhone app should be in, and put it in that state. Aren't you assuming after you refresh Life360 that it is authoritative? If so, why not at that point just force the iPhone into the same state.

Incidentally, we believe the issue that precipitated this is largely resolved in the current beta release of the iPhone app.

I don't want to force one or the other. I have seen cases where Life360 didn't update for 5-10 minutes but the iPhone app was correct. I want to ensure if either device triggers enter/exit then I give them a minute to match or poll both of them to either correct the one that is currently incorrect. So even if one says it exited (but really didn't) the delay gives pause to correct or poll them both - which should cause them both to sync.

@bravenel Is there still any reason why the android phone is not changing to present when a phone arrives. The wife's phone still does this. I have removed the app and reloaded it and signed in on her phone. Her version shows 1.27 and my phone shows 1.28. The phones are both the same. thanks

EDIT: I found the reason her phone was not showing the correct status of present. The geofence was not located at our home. But why does it show her phone on version 1.27 and mine 1.28?

This is an old thread but I seem to be having the same issue. Right now my wife and I are both away from the house. Her phone still shows as preset. She had been gone for over 10 minutes.

I have other presence sensors as well. One being Wi-Fi presence, but with the IPhone you can't depend on that for away as it will sleep, and show away when we are home. I also have a virtual presence sensor that detects activity that indicates we are home.

Both phones do this from time to time, sometimes in the reverse indicating they are away when they are home. This can be corrected easily enough due to the two other presence
sensors. In every case if we send a Geo event from our phone then it corrects itself.

My wife and I both have our phones set for locations services at all times. I had hoped maybe I could use RM to poll the devices based on my other presence sensors, If wi-fi presence, activity presence and the other phone show away then send a geo event to phone that is present and see if it really is. It could be, as I go to work early some days and my wife's phone will be there and there may be no activity or wi-fi presence at some point, she will still be in bed.

Maybe there is some setting I am missing but this a fairly common occurrence between our two phones.

My recommendation: [RELEASE] Combined Presence

2 Likes

I can second that recommendation, that app works very well.

1 Like

Okay, XOR has done me well for 2 years now! But now a new challenge - I want to compare presence of THREE devices and take action if all 3 are not the same. XOR on 3 is odd - so true and also on 1 is true - so that doesn't work.

If presence A NEQ presence B AND/OR NEQ presence C.... can someone write the logic for me on this?

OK, so I think I have it :thinking:

IF ((A XOR B) OR (B XOR C)) then...

Not sure how to get the parens in there - but just put in a xor b or b xor c and it seems to be working correctly. Time will tell - and thank you!

1 Like