max_gps_accuracy (Optional): Sometimes Owntracks can report GPS location with a very low accuracy (few kilometers). That can trigger false zoning in your Home Assistant installation. With the parameter, you can filter these GPS reports. The number has to be in meter. For example, if you put 200 only GPS report with an accuracy under 200 will be take in account.
Maybe you need to set a lower accuracy number.
Also make sure you do a push from Owntracks to make sure it has sent the latest data to CloudMQTT and of course from CloudMQTT to HA.
I changed accuracy to and restarted Home Assistant - I now show as home
device_tracker:
platform: owntracks
max_gps_accuracy: 100
I am going to keep my eye on it, as it was showing me miles away from home in Home Assistant, but Owntracks (via phone app) was showing I was at home.
Note that the little widget in the default view shows home, on the map I am nowhere to be found. When the location was incorrect in the widget, I could see myself several miles away from home. Very interesting.
Glad that helped; Iām still trying to get my accuracy at the right levels - Owntracks usually shows me next door or across the street. I bought an iBeacon and attached it to my house outside and added that to Owntracks to get a quicker response to the home state.
There is also a thing with home assistant where if you are in your āhomeā zone, your icon doesnāt show up on the map. There is an article out here somewhere that talks about creating a second zone āhouseā at the same long/lat as your house and adding a matching waypoint in ontracks. Then I think you have to make your HA home zone really small. Then when you are at home most of the time it will show you are at āhouseā instead of home and your icon will show up. You have to remember what you have done though, sometimes HA and AppDaemon rely on the name āhomeā in some of their automations and other tools, so you have to remember that being at āhouseā is not the same thing as being at āhomeā sometimes.
Yea, it kind of bit me in an app Iām writing in AppDaemon, I had to override all of the anyone_home,everyone_home,noone_home types functions we have there and force them to take into account both āhomeā and āhouseā. But once I did that, it works like a charm.
> #############################################################################
> # determine if the occupant(s) passed in are in the location(s) specified
> # Location can be a string or a [list of locations]
> # occupants can be a single occupant or a [list of occupants]
> #
> # Returns three booleans - (anyonehome,noonehome,everyonehome) in that order
> #############################################################################
> def _checklocationstate(self,location,occupants):
> chkloc=[]
> if isinstance(location,str):
> chkloc.append(location)
> else:
> chkloc=location
> if isinstance(occupants,str):
> chkocc.append(location)
> else:
> chkocc=occupants
> #self.log("chkocc={} type={}".format(chkocc,type(chkocc)))
> anyonehome=False
> everyonehome=True
> noonehome=True
> for person in chkocc:
> personlocation=self.get_state(person)
> #self.log("person {} is {}".format(person,personlocation))
> if ((personlocation in chkloc) if isinstance(chkloc,list) else (personlocation == location)):
> anyonehome=True
> noonehome=False
> else:
> everyonehome=False
> return (anyonehome,noonehome,everyonehome)