Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location reporting timeliness #44

Closed
jjpeet opened this issue Jul 17, 2017 · 34 comments
Closed

Location reporting timeliness #44

jjpeet opened this issue Jul 17, 2017 · 34 comments
Labels

Comments

@jjpeet
Copy link

jjpeet commented Jul 17, 2017

I remember reading Robbie's comments about the Apple code that controls when it reports location. Sounds a bit difficult to predict.

Have you had a look at Locative's code? It's open source, and Locative itself has now stopped development. But I used it for a year or so prior to moving to the iOS app and found it opened my garage door when I entered my home zone very reliably. Close to 100% of the time it worked, and it passed the wife test :)

That means it knew I had entered the home zone, and reported my location to HASS within about 20sec of entering the zone every time.

I'm finding that the iOS app is nowhere near as quick (sometimes 10min later). Is it worth having a look into the Locative code to see why it reported so much more reliably?
https://github.com/LocativeHQ

Thx
James

@riemers
Copy link

riemers commented Oct 14, 2017

Would be a nice addition, i know that sometimes the location stays several 100 meters away from my house. Only to update after a long long time. Adding bluetooth/nmap/unify access points etc does solve the issue for "home" but not the other way around.

@jjpeet
Copy link
Author

jjpeet commented Oct 27, 2017

Hi @robbiet480 any thoughts on this one?
Thx
JP

@cmsimike
Copy link

I feel like the current app's ability to report its location is fairly spot on, for me. The hass ios app, for me, works just as good as tracks does with ibeacons. Owntracks without ibeacons was like you explain here - would take minutes for my location to update.

@riemers
Copy link

riemers commented Oct 27, 2017

Well i know the app works based on how apple does it on the background, so say if you just moved from 1 gps tower to another it sends its coordinates towards hass. That is good, but if you don't move enough after that it can stay on that location sometimes. Every xx minutes it will report to hass and it will correct that, but that can take a long time. You cannot use it to act quickly on something. (so i don't use that) For the things i use it with, it indeed works fine, but i cannot use it for fine tuned locations sort of speak.

@jjpeet
Copy link
Author

jjpeet commented Oct 27, 2017

My main automation that relies on timely location reporting is an automatic garage door opener for myself and my wife. Sometimes the garage door will randomly open 30min after we got home because my phone finally decided to report it's location.

Maybe I need to use beacons to improve this? How configure them, I've never used them?
Thx
JP

@arsaboo
Copy link

arsaboo commented Oct 27, 2017

@jjpeet You should use multiple presence detection methods. In this case, you can combine it with a router based presence detection.

@riemers
Copy link

riemers commented Oct 27, 2017

I use a the unifi api to see if my phone is on the network, that helps a lot. You could at some point say that once you reach a certain zone, poll faster? The difficulty here lies in that a app (ios) has certain limits when it comes to background processing. I am sure Robbie is more then aware, but since he was swamped with worked it takes some time before he can catch up i presume. Lets just wait and see :)

@arsaboo
Copy link

arsaboo commented Oct 27, 2017

The iOS app uses significant location change (in addition to wifi and other data points) for location. AFAIK we cannot force an update in the background.

@cmsimike
Copy link

The only alternative (I could see) would be to have a selectable option which uses actual location updates (like google maps/apple maps, owntrack when configured in move mode or whatever) instead of significant change updates. This will take a huge toll on battery life, but would give better update times for those needing it.

@riemers
Copy link

riemers commented Oct 30, 2017

Can't we have the best from both worlds? If xx meters away from home zone, then do significant updates. Once home, turn off those quick updates. For that same reason, i don't mind if the app uses more power if i am in the car and its in the charger as example.

@cmsimike
Copy link

cmsimike commented Oct 30, 2017

@riemers There are a couple issues with what you'd like:

  1. If your significant change updates were quick enough to detect "if within xx meters" then we wouldn't need another option, so I don't think that would work.
  2. Even if there was a desire for something like that, it would force users who don't want to drain battery into draining their battery. I would not want this feature since the ios significant change is very good for me. Just as good as owntracks + ibeacons.

Any issues with proximity to home zones should be augmented with ibeacons https://community.home-assistant.io/t/ios-app-ibeacon-issue/18802

@arsaboo
Copy link

arsaboo commented Oct 30, 2017

In addition to what @cmsimike mentioned, Apple is unlikely to allow anything like that as it will make the experience significantly worse for most users.

@cmsimike
Copy link

Thanks @arsaboo! Agreed on that - apple is very picky about the sort of stuff they'd allow.

@jjpeet
Copy link
Author

jjpeet commented Oct 30, 2017

I've just ordered an iBeacon and will give it a go. Sounds like it's exactly what I need.
JP

@riemers
Copy link

riemers commented Oct 31, 2017

@cmsimike @arsaboo it is what it is, i was just pointing out some ideas. Don't know all Apple's playground rules :-) i'll order an ibeacon too. Seen plenty of those around, but the bottom line is that it doesn't really matter which one you get. (with the exception of say battery life/powered)

@robbiet480
Copy link
Member

Hi all, I should've posted it here but I was on a roll in this other issue. Anyway, check out my big comment about location and how to improve it on #43

@robbiet480
Copy link
Member

Oh and also, my goal (especially once theres an iOS device tracker platform) is to not have to use router detection (unless you really want to).

@jjpeet
Copy link
Author

jjpeet commented Feb 4, 2018

Hi @robbiet480, I haven't gotten back to this in a while so here's an update.
I did buy the beacon (two in fact), and neither have helped.
I have turned on ibeacon zone entry in the app so I can see if it's working, and it has never alerted me that it has entered the home zone because of a beacon - ever. It did work for exit once or twize though - not that that is helpful for my purposes.

I've obviously verified that the entries in customize.yaml are correct; and they appear in the app zone page. So I'm pretty confident about that.
Additionally, I've sat on my driveway within 5m of the beacon and used a beacon scanning app to see if I can see the beacon - and the beacon comes up straight away.

The issue with where I live is that I only see a single tower - so significant change doesn't work so well (assume).

Unless my assumptions are plain wrong, I think there's still a bug in there somewhere.....

Anyway - I'll also have a read of #43 and update this comment if I realise anything from that discussion.

Thx
James

@walthowd
Copy link

Can also confirm the behaviour that @jjpeet is seeing -- I have an iBeacon setup in my mailbox and I will only get an iBeacon notification from the HA IOS app maybe one of out of every twenty or thirty exits.

Even if I sit in the car right next to the beacon, and verify with the beacon app that I can see the beacon with a strong signal, I still won't get an update from the HA app.

For what it's worth, my major/minor on the beacon is 10/10 so I don't think I'm hitting the 0/0 bug.

@cmsimike
Copy link

@jjpeet I think there was a bug (not sure if it has been fixed/released) where the app would get enter/leave beacon messages, but only notify and say "exit" even if it was an enter

@walthowd
Copy link

@cmsimike I believe it's been fixed, but not pushed to production yet. However, I think in my case and @jjpeet we are not getting any notification at all from the beacons.

7ca200c

@walthowd
Copy link

walthowd commented Mar 5, 2018

I believe I tracked this down to the HA IOS app not having the check marks in the Settings - Status section.

It seems if IOS closes the app in the background, you have to manually restart the app, and then go into Settings and hit Save before iBeacon events will be processed.

@robbiet480
Copy link
Member

Can everyone here please retest with 1.5.0 and report back? Thanks!

@jjpeet
Copy link
Author

jjpeet commented Oct 10, 2018

@robbiet480 In relation to location in general, I'm seeing improvements, and I'm also seeing my iBeacon working. I listened to your recent podcast and it seems plenty has been done here.

What I am noticing is that it takes longer to leave a zone than it used to. I see this when I leave home in the morning, or work int he evening; now it takes about 5min longer than it used to (driving). Previously leaving a zone was pretty much straight away. It's certainly different behaviour but doesn't really impact my various use cases though...

I'm keenly awaiting the release so I can get it onto the rest of the family's iPhones...

(Oh, and that's on previous betas not today's so I'll keep an eye out on the behaviour of this new one)

JP

@jjpeet
Copy link
Author

jjpeet commented Oct 10, 2018

Hi @robbiet480 So I’ve tried the new version driving home from work yesterday and I can report that it takes another 5min at 60km/h to report I’ve left the zone - this is pretty consistent. This happens for all zones I’m regularly in.

(I have an automation that looks for all device trackers zone change, and sends me a notification of who, and what zone that exited or entered) Situational awareness thing :).

Thx
JP

@jjpeet
Copy link
Author

jjpeet commented Oct 22, 2018

Hi @robbiet480 it looks like location is working very well now. Zone entry and exit is working well (no delay like my previous report) and generally, the app is pretty solid. I am now running the beta on my phone and my son's iPhone 8 and both seems pretty solid.

It feels like it's ready for prime time... Any ETA for release?

Also - bluetooth for zone entry only looks to be working well.

Thx
James

@robbiet480
Copy link
Member

@blackgold9 should take a look at the positive encouragement here, thanks for that @jjpeet.

I've had some family issues to deal with for the last few weeks now, I expect we will get this out the door in the next week or two.

@jjpeet
Copy link
Author

jjpeet commented Nov 5, 2018

Hi @robbiet480 and @blackgold9 I'm noticing quite a bit of GPS location flapping lately. I use an automation to report on zone state changes for my family and then send a notification to my phone (which includes the GPS accuracy attribute).

I've uploaded a screenshot which is what I woke to this morning. Further down the same screen, my son's phone which is also running the beta is doing the same. Normally I'd be happy enough to simply condition them out (anything with accuracy above 900), but then I'd still get lots of arrivals.... (which are only 65).

Thought I better let you know...!
JP

img_0537

@jjpeet
Copy link
Author

jjpeet commented Nov 9, 2018

Hi @robbiet480 and @blackgold9 I updated to 24 but this is what I'm still seeing - this is the morning after the update;

img_0541

@blackgold9
Copy link
Contributor

blackgold9 commented Nov 9, 2018 via email

@blackgold9
Copy link
Contributor

blackgold9 commented Nov 9, 2018 via email

@jjpeet
Copy link
Author

jjpeet commented Nov 22, 2018

Sorry @blackgold9 I only saw your comment now. Those extra numbers are gps accuracy attribute I add to the notification.
Since the update this morning my time the bouncing has completely stopped!!!! Great pickup on the app crashing.
JP

@jjpeet
Copy link
Author

jjpeet commented Nov 22, 2018

And I’ve turned off the iBeacon and moved to Nmap instead.

@robbiet480
Copy link
Member

@jjpeet I believe i've heard that all your location issues have now been resolved? If not, let me know and we can re-open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants