Really weird bug with device tracker and automation...triggering a zone!

I’ve been using HA for well over a year now and feel fairly advanced for a non-yaml coder. I have hundreds of devices with 100+ automations that I feel are fairly debugged and everything works really well.

One of my favorite automations is when I arrive home (triggered by zone entry by my iPhone device tracker) it will open my garage door. I have conditions set for a time of day, as well as that I must be connected to my car’s Wifi (Apple CarPlay is wireless so it auto connects once I start driving) and that my iPhone must be in Automotive mode. It has worked incredibly well with no bugs.

I setup an action to notify my phone once the automation runs so I know when it was triggered by this automation because it allows partial access to my home. Works every time.

Today out of nowhere, when I was about 2 miles from my house, the automation triggered and I see both the HA notification that the automation fires as well as my HomeKit notification that a door has opened. I pulled up my home cameras and sure enough, the garage had just opened.

I went into the automation for this specific automation (there is only one that opens the garage door) and looked at the traces to see what triggered it. It did in fact say that I had entered a zone. This was concerning, but also super odd.

I then went to the Maps to see my what HA thinks my location is. I took a screenshot of it because it was NOT right. This is image #1 of the series. It appears that my location radius ballooned significantly out of nowhere.

I then went into the People settings to see what devices I had associated with my personal profile. For some reason my Mac Mini at home (which runs HA) had been added to my person (which it would have been this way for 6+ months at this point), so I figured that was the possible culprit. This mac runs 24/7 obviously and is connected to the LAN. I removed that device being associated with my people device tracker and made sure that the only device trackers associated with my profile was my phone and apple watch (the watch is managed through Unifi Network as a device tracker, so that only knows when I’m home via this device).

I rebooted HA just to be safe and left it at that. I then proceeded to drive further away to my next stop.

Not 5 minutes later I see the automation trigger again! I received both my HA and HK notifications, checked my cameras and they opened again. WTF. I check the maps, and now the circumference of my location has ballooned. I took another screenshot (#2). The zone circumference stops just inside my home zone so it seems that whenever my location must have last updated, it triggered the automation again because it sensed I had entered the zone (which is impossible).

I rebooted HA, force quit my HA companion app on my phone, and rebooted my phone.

Once my phone rebooted, within 2 minutes the same notifications appeared that my garage had opened. (Screenshot #3)

This time I figured I need to disable the automation and debug this once I get home.

As I was approaching my home, I pulled up the HA companion app and checked my location on the map to see if the ballooned zone circumference had shrunk (Screenshot #4), and oddly enough it was back to normal with no bloated zone circumference.

This is very concerning and I have no idea what could have caused this. I haven’t made major changes lately other than install a new Tesla Wall Charger yesterday and connected it to HA for energy and device monitoring.

Is there another way to debug why this happened? Has anyone had anything similar happen with zones?

MAP REFERENCE:
SB = my HA profile
XM = my car that I was driving in at the moment, connected through BMW service in HA
YL = my wife’s car, connected through Tesla Fleet service in HA (she arrived home by image #4)
YR = wife’s car “route”. Not sure what this is or which service runs it (could be Tesla Fleet or Proximity)

GNSS is not reliable enough to make security related decisions. This can be for a number of reasons from obstruction of your view of the sky to outright sabotage.

See: GPSJAM GPS/GNSS Interference Map

And what is being done about it: https://youtu.be/bFM9HHB9JXI?si=E3KaEMb-r3ZDpzfj

You could try using BLE beacons instead.

1 Like

Thanks for this insight. I can understand the concept of inaccurate GPS locating.

But, why would my apparent location grow and grow?

For about 12 months, I’ve had nothing but accurate results. Just seems odd that it starts out of nowhere.

Maybe someone was using a jammer in your area.

I have been sitting at my office desk and heard a TTS announcement that I am near the mall about 0.5 km away from my desk. Once on a suddenly very cloudy day and once in a thunderstorm.

I now include the GPS Accuracy as a condition to the template sensor the updates from my mobile APP and feed this into a Bayesian sensor that takes the GPS information and many other sensors (WiFi connection, Nmap, Ping, Schedule, Office Motion) into consideration

Thanks all for the comments.

I added GPS Accuracy as a condition to be met for this automation to trigger. Didn’t know this data was available!

1 Like