Iphone presence - disconnection from router

Hi guys,

I am new in Homeassistant. I come from OH, where I had A LOT OF problems and then I decided to move to Homeassistant. The best I did. AWESOME!!! It is very easy to setup and works pretty good for my setup.

The aim of this post is because my wife changed from Android to Iphone last week and now the presence in the Iphone does not work as in Android. I have read several post and I know that Iphone for this matters is not very suitable.

Here is the picture of the presence, there are a lot of disconnections and connections, you can compare with my phone (Android)

I have activated location in the iPhone and reinstalled the app a few times to grant access in the iphone.

Do I need a special config to avoid that Iphone disconnect from the Wifi? Is it an issue in the iphone or maybe I can solve it from Homeassistant side? I have Fritzbox router and always presence worked PERFECT.

Any clue? Any solution?

Thank you.

We faced this problems too, with my iphone and an Android from my wife. Because of the power saving modes, its nearly impossible to acurate track if an iphone is at home.
Because of that, im using a combination of

Core:

  • iphone integration (mobile_app:)
  • device_tracker - platform: iphonedetect
  • device_tracker - platform: nmap_tracker

Supervisor Plugin room-assistant for BLE
https://www.room-assistant.io/

All Sensors goes into the supervisor plugin Better presence

This add-on makes a combination of trackers to get better tracking capabilies in home assistant Checkout https://philhawthorne.com/making-home-assistants-presence-detection-not-so-binary/ as inspiration

my config for better presence

log_level: debug
tracking:
  just_arrived_time: 300
  just_left_time: 60
  home_state: home
  just_left_state: Just left
  just_arrived_state: Just arrived
  away_state: not_home
persons:
  - id: stefan_pbt
    friendly_name: Stefan
    devices:
      - device_tracker.stefans_iphone_2_2
      - device_tracker.4fd90c36_c476_4fe8_bde0_a509d645d57e_tracker
      - device_tracker.3c_2e_ff_1f_94_81
  - id: steffi_pbt2
    friendly_name: Steffi
    devices:
      - device_tracker.oneplus_a6013
      - sensor.oneplus_6t_room_presence
  - id: leonas_pbt
    friendly_name: Leonas
    devices:
      - device_tracker.iphone

it looks like this

as you can see, even if the nmap tracker cant find my phone, im still at home.

I see, thanks I will have a look the links to build on this way.

Danke dir!

no worrys^^

i forgot the matching automations:
This sends a message if someone is changing the status (arrive, away)


- id: steffi_presence
  alias: Notify on Steffis presence change
  trigger:
    platform: state
    entity_id: device_tracker.steffi_pbt2_presence
  condition:
  - condition: template
    value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
  action:
  - service: notify.slack
    data_template:
      message: Steffi is {{ trigger.to_state.state }}
      title: ''
      data:
        blocks:
        - type: section
          block_id: section567
          text:
            type: mrkdwn
            text: ':raising_hand: *Steffi* is *{% if trigger.to_state.state == ''home''
              %}back{% else %}away{% endif %}. {{ trigger.to_state.state }}* \n <https://halink/lovelace/iphone|Homeassistant> '
          accessory:
            type: image
            image_url: https://halink/local/images/steffi.png
            alt_text: Steffi