Issue with device tracker state toggling

I am having an issue where when my wife leaves for work in the morning, her device is marked as away and then immediately toggles back to home. This process repeats every few minutes until she gets to work, which I have a zone configured for (additionally owntracks has a region defined for work). This issue may also be affecting my device, but I work from home and don’t notice.

Screenshot of historybook

6:15 is when she first left, 6:45 when she got to work.

I’m using two device_trackers - unifi and owntracks.

- platform: owntracks
  waypoints: True
    track_new_devices: False
  consider_home: 300

- platform: unifi
  username: !secret unifi_user
  password: !secret unifi_pass
    track_new_devices: False
  consider_home: 300

And here is her entry in known_devices.yaml:

  hide_if_away: false
  mac: C0:D0:12:84:..:..
  name: Kristin
  picture: /local/kristin.jpg
  track: true
  vendor: Apple, Inc.

EDIT: Went out for lunch today. Here’s the more recent logbook, and my annotations:

  • I had restarted HASS 5 minutes previous - after 5 minutes (my consider_home time) Kristin’s state got set to away by default, and then 5 minutes later Owntracks pushed out an updated location. But then that series of events happened two more times, for some reason.
  • 1:47: I left for lunch, so those 6 Schlage entries are expected.
  • 1:54: I was marked away, but then HASS set me back to home and as such the front door Unlocked.
  • 1:56: Door locks itself. Normal.
  • 2:04: Finally considered away again.
  • 2:19: For some reason Kristin is marked away - she’s still at work
  • 2:26: I’m back home from lunch now. Door unlocks. Normal
  • 2:27: Kristin is marked as at work again. Where she actually was.
  • 2:28: Door locks itself two minutes after unlocking. Normal.
  • 2:41: Kristin leaves school - probably marked as away due to owntracks location update.
  • 2:46: Marked as at school again, but she was on the road
  • 3:12: Marked as away again, where she was
  • 3:44 Kristin gets home, door unlocked.

You are combining owntracks with unify. One of the 2 tracking devices isn’t updating fast enough, or still considers you home. What is the size of your zones?

As an aside, I personally would never use home/away to control the locks on my doors. Presence detection isn’t good enough now a days. Maybe in 5 years when new tech comes out.

1 Like