Can you check you have the latest version in HPM? There's been several updates -- mostly related to html tile and internal cleanup. But, there's nothing logged from what I see:
if (logEnable) log.trace "No change: lat:$latitude, long:$longitude, acc:$accuracy, bat:$battery, wifi:$wifiState"
return
} else {
if (logEnable) log.trace "There was a <strong>change</strong>: lat:$latitude, long:$longitude, acc:$accuracy, bat:$battery, wifi:$wifiState"
Piling on with more positive feedback! Ran both apps side by side for a couple days, and transitioned just myself over to the new one temporarily. After seeing similar performance, I ended up changing the rest of the users over and removing the old app! Very happy to have it update on actual changes, as sometimes when I arrive home there is a delay which freaks out my security. Hoping with the new app this delay will be reduced, though I think it is more related to Android deep sleep, and Life360 not pushing updates
It's not going to get Life360 updates from devices any faster.. at it's core this is the same app/driver as before but with some extra logic that doesn't send out Hubitat updates when nothing changes.
There's 2 ways this driver gets notified
When the user enters/exits one of your predefined 'places' (ie: Home/Work/School)
Every 30 seconds the app checks the device locations
I've thought about maybe making that 30 second check a little more dynamic.. such as making it a little more frequent when there's been a recent change and maybe less frequent when no changes in a while. But, I haven't done any of that yet (and not even sure it's worth it either)
More likely if you're seeing a delay (certainly one longer than 30 seconds) it's because the device itself isn't reporting it's location to Life360. This is typical with any background location apps like this.
FWIW Life360 is one of the better location apps I've used (even if it means it's one of the more aggressive/battery-draining)
Didn't the old app only update every 30 seconds, regardless of place changes? That was my understanding of how it worked, but I could be wrong.
But it does sound like this app is less 'chatty' in terms of pushing updates than the old one, which is a nice efficiency improvement in my opinion
In regards to the delay, I'm sure it's my phone. Even with unrestricted background access, it tends to get delayed every once in a while. I believe it is typically when I am arriving home and my phone has been in my pocket for a while leading up to arrival. If it is being used, or on the charger it tends to update correctly by the time I am actually at my house.
I do agree life360 is pretty good. I don't think it is a horrible battery drainer like some other locating apps I have tried. It's been the most successful presence detector for me, aside from the rare cloud outages, or oddball delays like I mentioned
it did the same thing -- I will say I never received 'push' notifications previously because there was an extra step you had to do with the "Life360 with states" driver which was go into the App section and enable OAUTH. Since this app is part of HPM now it should enable OAUTH automatically.
When the user enters/exits one of your predefined 'places' (ie: Home/Work/School)
I haven't tried using inTransit for anything but I like this rule idea so I might give it a shot.
I set values for transit and driving speeds to 8 and 16 respectively
Mine are set to 3 (transit) and 5 (driving). Btw if anyone else is wanting to try using inTransit or isDriving -- make sure you set these override values in the Life360+ driver. If you leave them as "0" Life360 always seems to pass false for isDriving/inTransit.
Can you try enabling logging on the Life360 device in question and then after a while doing a search in the logs for "inTransit"? I have logging enabled and here's what I get:
So, they appear to be set correctly for me anyway.
I do know these values are strings and not booleans -- maybe that's why your rule isn't working? I think @Matthew was trying to change them to boolean at one point but ran into an issue so he might have more insight into this
I can try that but my issue is not in the conditional but the fact that the rule never gets triggered. “Changes” shouldn’t be sensitive to argument type should it?
Ouch .. I didn't mean to delete my own post. That's what I get for trying to follow the discussion while driving. Repost below.
Meanwhile, logging on the person presence device never shows anything for inTransit or isDriving. Do you suppose using the free version of Life360 is the issue here?
What is the best practice for triggering actions when a person is "on the move" (preferably in transit outside of Home geofence)?
I set values for transit and driving speeds to 8 and 16 respectively, but the rule below never triggered. As a test, I changed the trigger to fire if latitude changes and that seems to work, but not necessarily the best way as it changes continually if person is moving, whereas I 'd expect in transit to stay in transit true as long as speed was over the threshhold.
Best to do a 'Repair' from HPM .... or open the code and re-import, to get the latest version.
I personally have never seen Life360 return a value other than "0" from polling their API for inTransit or IsDriving. If you key in value into the driver for those overrides, the driver will use them. The driver will change inTransit to "1" if your speed equals or exceeds the override amount you set. The driver will change isDriving to "1" if your speed equals or exceeds the override amount you set.