Fritz!box and device_tracker always reports away

I‘m on the latest HA version and would like to get a device_tracker of an iPhone (source of the tracker is the fritz!box integration).

Problem now: the tracker always reports the phone to be away (regardless of how many times I connect or disconnect the phone to WI-FI).

I have not configured a device_tracker in configuration.yaml and have selected Enable old discovery method in the fritz!box integration.

So the fritz!box assigns the same IP address to the iPhone, there is an entry in known_devices for that particular phone:

iPhone:
  hide_if_away: false
  name: iPhone
  mac: XX:XX:XX:B2:FE:B4
  icon: mdi:cellphone
  track: true

From the log files I can see a disconnect and connect from the WI-FI.

2022-06-26 06:59:22 DEBUG (SyncWorker_9) [homeassistant.components.fritz.common] Client dev_info: Device(connected=False, connected_to='', connection_type='', ip_address='192.168.178.36', name='iPhone', ssid=None, wan_access=True)
2022-06-26 07:00:00 DEBUG (SyncWorker_0) [homeassistant.components.fritz.common] Client dev_info: Device(connected=True, connected_to='', connection_type='', ip_address='192.168.178.36', name='iPhone', ssid=None, wan_access=True)

Yet the entity itself device_tracker.iphone always reports Away.

The entry in the known_device.yaml must be from somewhere else. Even the old discovery doesn’t use that anymore.

Did you enable the corresponding entity in settings> Devices > entities?

Is the system option “enable newly added entities” in the Fritzbox integration possibly deactivated?

I found out in the meantime that iphones change their MAC adresses (recent iOS) for privacy reasons. So assigning stuff according to MAC address in both fritz!box and HA does no longer work. So I disabled private WI-FI in my phone and tried again. Sadly, still „away“.

I then decided to clean everything.

  • disabled private WI-FI in iphone
  • clean all devices in fritz!box itself (removed all devices with unused connection)
  • removed fritz!box integration
  • removed known_devices file
  • reboot
  • know_devices was recreated - only one entry (my car)
  • fritz!box was discovered
  • added fritz!box integration (old discovery method not selected)
  • numerous device trackers were added
  • know_devices still contains only one entry

So far, so good. Next try …

  • turn off WI-FI on iPhone → 3-4min later device_tracker reports „Away“
  • turn on WIFI → it takes +8min for device_tracker to be „Home“

Good news, it works. But the latency is