2.0 Release Update

Yeah most GPS apps seem to ignore the location provided by iOS when iOS reports the accuracy as low (unknown threshold — probably app driven). Whatever iOS apps do to get a more accurate reading from the iOS location built in (I believe Apple hides the raw GPS data and apps have to ask Location Services, but I haven’t looked into it in a long time on the coding side of things) they wait and get one within a few seconds.

Companion beta app also reports that it’s ignoring the location in the app event log, but seems to really not ignoring it and sending it to HA. That’s my best guess from the event log and the HA log.

One of the accuracy ignore statements says its greater than 8000m which is total insanity. That has to be just thrown out. But here’s my phone saying it’s at least that far away occasionally while just sitting here. Haha.

Entertaining at least. I don’t rely on it for presence at home, that’s for sure. Person for both of us is configured to also use the WiFi router integration (Netgear) so my false night time “away” count is very low and only happens if the iPhones drop off of WiFi and sleep. Which since they’re doing WiFi calling at home is nearly never. The constant traffic to Verizon’s VoIP servers and various other notifications and such, keep them both active on WiFi nearly all the time.

I haven’t had time to correlate 100% that the “ignored” updates in the App event log are exactly what HA is getting. I’ll see if I can make some time tomorrow / later today to do side by side log comparison. I dumped tonight’s event log to my Dropbox from the phone so I should be able to correlate timestamps, assuming HA doesn’t need to be in a higher than default logging level to output what it’s getting for exact locations in updates.

It’s definitely interesting. :slight_smile:

Weird, works absolutely fine for me for months now. Though I use a tado tracker as well. It literally hasn’t failed a single time and I rely heavily on this app. I even have an iPhone X which has gps issues ever since they have released it (hardware issues) though they mitigated the problem through software to my knowledge.

Anyways I don’t think the app is the culprit here. But then again if you have a bad reception indoor it could be just that your walls/isolation keeps the gps signal from coming through properly.

Yeah understand, I do RF engineering… nobody has good GPS indoors. :slight_smile: You alway have to give even a great GPS receiver time to converge indoors, and phone GPS receivers are crippled by awful antennas.

I think the real weirdness here is the app says it’s doing the right thing in event logs and ignoring the bad location, but that location is still reaching the HA server.

Funny story: Wife left early this morning. I had left my phone off the charger. It went dead around the time I woke up. Last location it sent was a wandering one, so now I’m not “home” both in the case of the GPS location AND the WiFi router. All my “everyone is away” automations fired, and I started wondering why my indoor cameras started eyeballing me and alerting on me, as well as why other things happened – hahaha!

Clearly this isn’t the best solution for us. LOL!

Glad I’m not arming the monitored alarm with it yet! Could’ve had a Sheriff visit in my skivvies! HAHAHA!

The only presence detection I am really happy with and I use in an automation is one based on a ping sensor to my Wife’s phone.
I have found a long lag at times with the GPS position in the iOS app. It is starting to look ok and I’m toying with it and the here_now travel time sensor but still not implemented.

Here’s logs of this evening sanitized…
Phone has moved around inside house but mostly sitting next to me on the desk.

HA LOGBOOK:
4:43 PM Nate Geocoded Location changed to *** HOME ***
5:12 PM Nate Geocoded Location changed to *** THREE HOUSES AWAY IN PROPERTY THAT HOUSES SIT ON FOUR ACRES ***
5:25 PM Nate Geocoded Location changed to *** HOME ***
6:10 PM Nate Geocoded Location changed to *** SAME AWAY PROPERTY AS BEFORE ***
6:25 PM Nate Geocoded Location changed to *** HOME ***
7:43 PM Nate Geocoded Location changed to *** NEIGHBOR AGAIN ***

APP EVENT LOG SAME TIMEFRAME:

4:43 looks normal, triggered by entering the geofence around “Home”

5:12 A background fetch starts right at log rotation to a new file…

2019-10-25 17:12:11.549 [Verbose] [main] [AppDelegate.swift:227] application(_:performFetchWithCompletionHandler:) > Background fetch activated at Oct 25, 2019 at 17:12:11 Mountain Daylight Time!

new file, removed logger notice about file rotation…

`2019-10-25 17:12:11.551 [Warning] [main] [WebhookSensors.swift:297] getLatestMotionActivity() > Motion permission not enabled
2019-10-25 17:12:11.572 [Verbose] [main] [HAAPI.swift:506] GetAndSendLocation(trigger:) > getAndSendLocation called via BackgroundFetch
2019-10-25 17:12:11.589 [Info] [main] [ClientEventStore.swift:23] ClientEventStore > ClientEvent {
date = 2019-10-25 23:12:11 +0000;
text = Ignoring one shot location with accuracy over threshold.Accuracy: 263.0239512427212m;
typeString = locationUpdate;
jsonData = <(null) — 0 total bytes>;
}
2019-10-25 17:12:11.591 [Verbose] [main] [WatchHelpers.swift:85] BuildWatchRenderTemplatePayload() > complications Results <0x10335d3c0> (

)
2019-10-25 17:12:11.592 [Verbose] [main] [WatchHelpers.swift:91] BuildWatchRenderTemplatePayload() > mostRecentlyReceievedContext.content nil []
2019-10-25 17:12:11.592 [Verbose] [main] [WatchHelpers.swift:127] updateComplications() > No complications have templates, not sending the request!
2019-10-25 17:12:20.026 [Verbose] [main] [OneShotLocationManager.swift:43] locationManager(_:didUpdateLocations:) > LocationManager: Got 1 locations, stopping updates!
2019-10-25 17:12:20.031 [Info] [main] [HAAPI.swift:477] SubmitLocation(updateType:location:zone:) > Location update payload: [“gps_accuracy”: 50.0, “gps”: [REDACTED, REDACTED], “speed”: 0.0, “altitude”: 1865.509952545166, “vertical_accuracy”: 48.0, “battery”: 43]
2019-10-25 17:12:20.190 [Warning] [main] [WebhookSensors.swift:297] getLatestMotionActivity() > Motion permission not enabled
2019-10-25 17:12:20.191 [Warning] [main] [WebhookSensors.swift:217] getLatestPedometerData() > Motion permission not enabled
2019-10-25 17:12:20.192 [Verbose] [main] [WatchHelpers.swift:85] BuildWatchRenderTemplatePayload() > complications Results <0x102625ac0> (

)
2019-10-25 17:12:20.193 [Verbose] [main] [WatchHelpers.swift:91] BuildWatchRenderTemplatePayload() > mostRecentlyReceievedContext.content nil []
2019-10-25 17:12:20.193 [Verbose] [main] [WatchHelpers.swift:127] updateComplications() > No complications have templates, not sending the request!
2019-10-25 17:12:20.915 [Verbose] [main] [HAAPI.swift:493] SubmitLocation(updateType:location:zone:) > Device seen via webhook!
2019-10-25 17:12:20.920 [Info] [main] [ClientEventStore.swift:23] ClientEventStore > ClientEvent {
date = 2019-10-25 23:12:20 +0000;
text = Current location delivery triggered via background fetch;
typeString = locationUpdate;
jsonData = <length = 24, bytes = 0x7b0a2020226770735f616363757261637922203a2035302c — 185 total bytes>;
}
2019-10-25 17:12:20.922 [Verbose] [main] [AppDelegate.swift:753] setupFirebase() > Logging event location_update to analytics`

I’ll just stop there… I see the phone is lying to the app. The REDACTED Lat/Long are the neighbor’s land next door well over 300m away, but the phone reported 50m accuracy. That’s BS, but not the App’s fault.

Not sure how the App can deal with it, other than ask for multiple locations in a row and see if the phone tends to get two out of three right, or what… but if the phone says 50m accuracy and drops the coordinates over 300m from where it actually is, there’s nothing the App can EASILY do about it.

It looks like the App also did the right thing and got an inaccurate location first that even the phone said was inaccurate, and then asked again. Phone said 50m so it sent it to HA.

Would be interesting to track if this happens on only one carrier – mine is Verizon and since the phone is using assisted GPS with tower locations factored in, and they are VERY far apart out here… I wonder if the phones give inaccurate junk locations.

I skimmed the other events and they’re all similar. Phone is lying about accuracy… sigh.

I grepped out all the GPS lines from the app event logs to see how much the reported GPS accuracy changed…

Got a kick out of this one… it got ignored… see gps_accuracy

og_2019-10-25_174545.txt:2019-10-25 17:35:25.473 [Info] [main] [HAAPI.swift:477] SubmitLocation(updateType:location:zone:) > Location update payload: [“gps_accuracy”: 5005.0, “vertical_accuracy”: 10.0, “altitude”: 1890.879150390625, “gps”: [REDACTED, REDACTED], “battery”: 38]

IRONY: It maps right on top of the house!!! LOL!!!

ohhh interesting… As I watch the logs I see multiple accuracies of “5005.0”

I remember a previous post by @robbiet480 saying that another accuracy number that came up repetitively for someone else was really an indication that the GPS was assisted perhaps by the tower/cell site.

Also interestingly those coordinates aren’t very far off, and definitely inside the Home (altered by me) 300m geofence… while others with better accuracies are a long long way away.

Apple or Verizon or whoever, appears to be using that “5005.0” as an indicator of something. It is repetitive in my App log. Neat, and weird.

Okay, coffee time… :slight_smile:

Could you try the version 1.5 of the app and see if you have the same problem? That may discard a faulty gps on your iPhone or a bug on the app.

I think @robbiet480 should see that. Maybe he will say something on discord, because he seems to be active there.

I’m sure he will see it here in due time. Not going to bug him with it. It’s clearly some weirdness either in iOS or the network I’m on.

Cheers all. That was a fun little debugging session. I got sidetracked into node-red fun after that. Ha. So many toys, so little free time.

One of the two phones we’re running build 68 on has been getting these every few days. Often times following the location services dialog.

iPhone 7, iOS 13.1.3, HA 0.100.3

After reloading the App, there are scrollbars in some views.
After tapping another and going back they are gone.

Is this related the the new frontend with 0.101.0bx?

No clue, i’m using the beta since 0.101.x.
Before i used 1.5

Just I saw similar in beta 101. In b0 it was totally screwed up and I think after b1 and a new frontend it was fixed up. Anyway, I think the issue is HA, not the iOS beta app.

Is there any new attempt to release the app via the offical store or do we need to stay on the beta?

Hey there! Just want to get any info with 2.0 release.
Are we even waiting for it? What is happening right now? Any development? Is app freezed? I can not find any news from devs on that…

Just want to know what is happening and what ways are devs looking for.

I’m currently on version 0.100.3 of HA and 2.0.0 (68) of Companion. Everything is mostly working well. Every once in a while, however, I get a blank app screen (blue bar at the top) with the orange configuration cog. It seems to occur when a connection is slow or spotty, or when I’m changing networks. I can still pull up a log when it occurs, but I see nothing much beyond typical notifications. Sometimes I see GPS is off by 1000 meters, but that seems unrelated to the problem. I’ve tried to close Companion and reopen it, but that doesn’t work. One remedy that works is to restart the HA server locally; I have yet to try it via Nabu Casa web access.

Has anyone else seen the same thing? Is the problem in Companion or elsewhere? Any ideas?

This is known behavior when cell coverage is marginal or the phone is at the edge of wifi coverage and roaming between networks. Nothing to be done about it.

The gps about 1000m off is from the app using iOS significant location change when in the background to conserve battery - it’s not a navigation app after all - and the location is only updated in ios based on cell towers and not from more localised/precise sources like wifi and gps. Also when driving.

It’s not a bug but remember the purpose of the app is not to create a precise stalking tool but to base automations on geofencing :wink:

1 Like

Thanks for the reply. I’m not really complaining about the GPS behavior. I mentioned the entries in passing when characterizing the log entries.

Shouldn’t we expect connectivity to recover when the phone is solidly in WiFi or cellular range. As is, the app is sometimes deadlocked. Is there a convenient way to recover short of resetting the HA server? It’s not very convenient to do remotely, and there’s a small risk the server won’t recover gracefully.