Zone - Make 3 Dimensional (Optional)

I live in a mid-rise with businesses down below. When I use those businesses, I sometimes show as “home” when I definitely am not. This prevents other common events from firing (lights, environmental, vacuum), or, conversely, it triggers others.

Now… I could configure my way out of this, but I’d like the person feature to correctly determine if I’m home or not - using my GPS elevation from the mobile app. The person feature works well for almost everything other than this, so I’m hoping it can be extended for this use case.

Whether this is achieved with a 3 dimensional radius, a height +/-, or another creative solution… that I trust to the devs. I just want the ability to use the person feature to correctly determine if I’m in a zone or not.

I’m confident other HA users will benefit, as they are also live or work in a multi-level building (with other floors to visit - that are not part of the zone). Can this be worked into HA at some point?

This would vastly improve my HA experience AND improve the bottom line of some local businesses. :wink:

P.S. If zones could be layered, in the same place, based on reported height, that would be awesome, but I don’t need it for my purposes.

Consumer grade GPS has less accurate vertical accuracy compared to its horizontal accuracy. Reliably determining your vertical location to within 2 meters is beyond its abilities. In terms of your Feature Request, the best it could do is indicate you’re not on the ground floor but it couldn’t definitely indicate a specific floor (vertical accuracy can be as coarse as 30 meters).

And that even can be worse inside buildings… :wink:

Perhaps you can use wifi sensor as an alternative solution?

This is a(nother) great reason to not use GPS for home/away, but to use Bluetooth and/or WiFi based presence detection.

WiFi detection can generate false aways, when the phone is sleeping, but using monitor for Bluetooth presence detection has been 100% rock solid for me.

I can’t say that wifi is unstable…

This is good enough for most purposes.

Right now, when I’m sitting right next to a window that is about 5 meters wide and 1.2 meters high at work I have a horizontal accuracy on my device tracker at 16 m.
That means the vertical could be 32 or 48 meter inaccurate.
Right next to a window.

My work phone actually has the vertical accuracy field and it says 39 meter.

When it’s that inaccurate right next to a window then being any further in the building will most likely render it useless.

2 Likes

?

I get the impression you don’t understand how GPS calculates your position on the earth’s surface and why its accuracy is dependent on many conditions. The stated accuracies are based on best-case scenarios; being indoors and/or among many tall buildings is not “best-case”.

The calculation is based on trilateration and so the more satellites in view, the better. However, their position is also important because closely spaced overhead or widely spaced near the horizon is not optimal. Because the orbit of each satellite is known, it’s actually possible to predict the exact time when positions are optimal to get the best accuracy (conversely, one can predict the time when it’s worst). Given this kind of inherent variability (beyond the very obvious problem of poor signal reception indoors), plus being in the ‘shadow’ of tall obstructions, it’s not sufficiently reliable to indicate what floor you’re on.


My experience with GPS is based on several years of mapping trails in mountainous terrain. It became quickly evident that a single track is merely an approximation of the actual route. To drive the point home, two people walking the same route at the same time with the same model of GPS receiver will not record identical tracks. You need the average of many tracks (ideally during optimal satellite alignment but that’s not exactly practical) to get a reasonable approximation of the route (i.e to within 2 meters).

The limitations of vertical accuracy became known by the bloated ‘total ascent’ value reported for trips of many kilometers (the result of cumulative error). They typically exceeded calculations based on digital elevation models and devices based on barometric pressure (a calibrated barometric altimeter, given stable weather, is more accurate).

To understand the results I was getting, I studied how it works and, frankly, given the challenges it’s impressive that it works as well as it does. However, it can be augmented with land-based references (not accessible to consumer grade GPS) to get the high accuracies required for surveys and civil engineering projects.

2 Likes

I understand this is edge case AND difficult, so it’s not going to take off. I also know that many replying here are the messenger, not the reason.

I want to note that the businesses below, are not immediately below, just geographically - there are floors of space and I could theoretically set the zone’s elevation to be above me. My phone has been precise enough about it’s elevation that I would be able to make it work for my (admittedly narrow) use case.

At present, my options are:

  • Have home assistant decide I’m home anytime I’m in those businesses
  • No longer go to the businesses that are many meters below me, on the street level
  • Go to those businesses, but no longer use the mobile app’s location feature for anything

I suppose I can set up my own zone logic and get creative with it, but that’s not really how I want to spend my weekends.

If there was a way to say a zone is “at x and connected to WiFi y” - I might almost be okay, but that’s not how zones are implemented. The highest precision result tells the system I am at this coord and that’s inside circle z, ergo zone z.

Ultimately the issue is this: if there are multiple zones within a building, especially one above another, then neither home assistant or the mobile app handle that. I’d like my zones to have additional criteria (e.g. BT or WiFi; near or connected).

Absent some solution, HA zones are broken for people in situations like mine.

Edit: One additional note. With the use of other technologies like GNSS phones are often much more accurate than it being portrayed here. While watching my phone for a while, the altitude has changed minimally. I’ll watch it more in coming days, but we’re talking about a meter or two one way or the other, not tens of meters.