Location wont update (proximity) with VPN

Hi all,

I have a strange problem.
I have setup Proximity to make some automation’s when leaving or arriving home.
When I access my home Through VPN, everything works fine and I can access everything (even Home assistant).

But for some reason, the location wont update in Home Assistant when I am connected through VPN
If I connect to Wifi, the location (and proximity status) updates immediately, so the proximity settings are working.

Does someone know where I can look to get this to work?
I already did delete all devices and reinstalled them with these setting from the documentation

dont stop at the settings from the documentation, keep reading and look at location history and logs that are part of the same linked section.

I get a lot of “duplicate” notifications under the Settings > Companion app > Troubleshooting > Location tracking, and also a lot of “not accurate enough” notifications as well.

The accuracy gives a number around 600. I could increase this number in the settings of the location sensors, but I dont want to put up this number arround 600+ that is very inaccurate.

Also I almost know for sure it is a problem with the VPN, because the problem is with all the phones I have (connected through VPN).

check the location and if its valid then consider changing it. The data comes from Google and can change often. 600 is not considered very inaccurate actually. A very inaccurate number will be in the thousands. 200 was selected as a default because that works for most users. Personally I have mine at 600 because I get valid home reports that high.

then I would expect those to show failed to send in the tracking section and the logs in the same troubleshooting section will show the reason for the failure. If you can reproduce the issue you can look at the log and hopefully that will give a clue.

So if I open the log, and I see the number 600 and press the location icon (see screenshot) and it opens in the correct location, then you are fine to set the number higher (in this case 600)?

And I will try to locate the VPN problem. It is hard though to find out why this problem occurs.
If I connect to Wifi, the location gets updated right away.

yes thats correct, as long as you see valid reports its ok to change it

But is it also correct that if I open the log and press on the location icon, that the 600 number correspondents with the location showing when I press that icon?

if the UI shows it as part of the same highlighted section then yes that corresponds to it. In your screenshot it shows 699 actually.

1 Like

Thanks a lot
I have one more question though.

Is it necessary to change these accuracy settings on all the location sensors? Because they do mention the sensors in the documentation, but they don’t specify which one you should change.

each sensor is responsible for a different cases like one is just purely background updates at a set timed interval and the other is geofence updates which can be more infrequent, i personally update all 3 to the same number.

1 Like

It looks like everything is working now (have to test it outside though).

But I do get a lot of “old location” notifications and “Duplicate” notifications. What do they mean, and can I do something about it?

you can ignore them, its working as expected then. Google does at time send us old updates and log them and we also do not send the location report for 15 minutes so you’ll see a few duplicates in between it sending.

1 Like

I had good hope that it should work, but I did make a little walk outside (around 300 meter away from home) and still nothing updates within the Home Assistant. My state just says “Home” Even if I set the accuracy lower in the configuration.yaml. It still wont update.

# proximity home
proximity:
  home:
    ignored_zones:
      - work
    devices:
      - person.me
    tolerance: 15
    unit_of_measurement: m

I really dont understand what can cause the problem here.

now go back and look at the history to see what the issue is, thats why that section exists. You should see updates coming every 1-3 minutes

This is one of the logs I get.

-26 23:19:39.306 25380 27078 D LocBroadcastReceiver: Last Location: 
10-26 23:19:39.306 25380 27078 D LocBroadcastReceiver: Coords:(152.43142, 88.34531)
10-26 23:19:39.306 25380 27078 D LocBroadcastReceiver: Accuracy: 699.999
10-26 23:19:39.306 25380 27078 D LocBroadcastReceiver: Bearing: 0.0
10-26 23:19:39.307 25380 27078 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
10-26 23:19:39.307 25380 27078 D LocBroadcastReceiver: Received location that is 47 milliseconds old, 1698355179260 compared to 1698355179307 with source fused
10-26 23:19:39.307 25380 27078 D LocBroadcastReceiver: Duplicate location received, not sending to HA

And this is a other one

10-26 23:25:12.968 25380 25380 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
10-26 23:25:12.969 25380 27112 D LocBroadcastReceiver: Last Location: 
10-26 23:25:12.969 25380 27112 D LocBroadcastReceiver: Coords:(152.43142, 88.34531)
10-26 23:25:12.969 25380 27112 D LocBroadcastReceiver: Accuracy: 699.999
10-26 23:25:12.969 25380 27112 D LocBroadcastReceiver: Bearing: 0.0
10-26 23:25:12.969 25380 27112 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
10-26 23:25:12.969 25380 27112 D LocBroadcastReceiver: Received location that is 636 milliseconds old, 1698355512333 compared to 1698355512969 with source fused
10-26 23:25:12.969 25380 27112 D LocBroadcastReceiver: Duplicate location received, not sending to HA

if you look at location history it should it make it easier to spot whats going on because you have the map and you can see what location reports we are getting from google.

One is pretty off, the others are some sort of accurate in the way that I was walking.
So it does give the right locations (sort of)

I dont need to be 1km away to make it work right?

that depends on your home zone radius

https://www.home-assistant.io/integrations/zone/#home-zone

But the zone you give within the proximity code is the one that is be used right?
I ask for the proximity state in home assistant, and it keeps saying I am at home, although I am 300 meter away, and the settings are 15m accuracy in the proximity settings.

# proximity home
proximity:
  home:
    ignored_zones:
      - work
    devices:
      - person.me
    tolerance: 15
    unit_of_measurement: m

Proximity is a different integration other than what defines you in the home zone. Proximity tells you when you are close to a zone. A zone itself is responsible for who is in it or not.