Device tracker issue: when disconnecting from wifi but in zone home: status change to "not_home" instead of remaining 'home'

Hi all out there!

I hope you can help me with this issue: I use the IOS app 1.5.1 for tracking my location and I scan also my network (fritzbox platform) to see whether I’m home or not.

And I’ve set my home location as zone.home with a radius of 250m.
HA version: 0.98.2

But when I’m going for example to my neighbours (50meters away from home), I’ll ofcourse be disconnected from my wifi. But as soon as this happens (with a delay of 180seconds), HA is changing my status to “not_home”. But I’m physically still in zone.home so I would be nice that my status will remain 'Home" (untill I realy leave my zone.home).
This drives me crazy :slight_smile:

Any help for this? Would be great!
Thanks!

How are you combining the information from the IOS app and the network scanner?

Hi Phil,

I have this in my configuration file:

device_tracker:
 - platform: fritz
   host: xxx.xxx.xxx.x
   interval_seconds: 9
   track_new_devices: yes

ios:

And this in know_devices.yaml:

iphonevanmarcel:
  hide_if_away: false
  icon:
  mac: XX:XX:XX:XX
  name: Marcel
  picture: /local/feest.jpeg
  track: true
  vendor: unknown

And my IOS app the ID is iphonevanmarcel

This is giving me only one device tracker entity: device_tracker.iphonevanmarcel
I use only this entity for tracking my state.

Is this info of help?

I have occupancy determined by binary_sensors: you need one for each member of the household plus another to combine them. Something like this : -

binary_sensor:
  - platform: template
    sensors:
      bs_occupied:
        entity_id: binary_sensor.bs_occupied_maximillian, binary_sensor.bs_occupied_franchesca, input_boolean.ib_occupied_force, input_boolean.ib_occupied_retention
        value_template: "{{ is_state('input_boolean.ib_occupied_forceon', 'on') or is_state('input_boolean.ib_occupied_retention', 'on') or is_state('binary_sensor.bs_occupied_maximillian', 'on') or is_state('binary_sensor.bs_occupied_franchesca', 'on') }}"
        friendly_name: House Occupied
        delay_off: "00:00:02"
      bs_occupied_maximillian:
        entity_id: device_tracker.life360_maximillian, input_boolean.ib_occupied_maximillian_away
        value_template: "{{ (is_state('device_tracker.life360_muttley', 'home') or is_state('device_tracker.other_max', 'home'))  and is_state('input_boolean.ib_occupied_maximillian_away', 'off') }}"
        friendly_name: Maximillian At Home
      bs_occupied_franchesca:
        entity_id: device_tracker.life360_franchesca, input_boolean.ib_occupied_franchesca_away
        value_template: "{{ (is_state('device_tracker.life360_franchesca', 'home') or is_state('device_tracker.other_fran', 'home')) and is_state('input_boolean.ib_occupied_franchesca_away', 'off') }}"
        friendly_name: Franchesca At Home

This allows for manually forcing an eviction (say when they leave their phone at home but are away on holiday) and also to force occupied on (so that you can go out without plunging the tiler into darkness)
Add in as many trackers as each person has in the first bracketed bit using an OR, they will cover for holes in reporting ‘away’ accidentally.

The " delay off: " can be extended to provide a bigger debounce and/or just put on one person’s tracker.
With Life360 I’ve never (observed anyway) a false tracking report
These sensors complain that they have no descernable entities to trigger them, I don’t care the individual ones are put in an automation to update every 5mins

Mutt

Had another thought, you say your radius for home is 250m
Set where?
I think I read somewhere that your device tracker home point and radius must be the same as your HA home zone and radius
So even though one is set in feet and the other in meters, my circles coincide
Worth checking anyway

I would recommend “disconnecting” the fritz device_tracker from the IOS one by removing the mac entry from iphonevanmarcel. Then you should get two independent device_tracker entries in known_devices.yaml (and hence two independent device_tracker entities.) Honestly, though, I don’t use the IOS tracker so I don’t know if you can remove the mac address from its entry in known_devices.yaml.

Assuming you can get two, independent device_tracker entities, then you can combine them with the person component. I think that should do what you want.

@Mutt, thanks for suggestions! My home point and radius were set correctly luckely in the configuration.

And I was about to dive into your suggestion to use binary_sensors but then I tried the suggestion of Phil first and… that did the trick for me!

@Phil, many thanks for your tip!! Deleting the mac-address in the know_devices.yaml was the solution! I deleted it, did a restart and indeed, a new/extra device_tracker entity showed up: device_tracker.iphonevanmarcel_2.

I combined the 2 trackers with the person component and it works like a charm now! :clap:
When I’m in my street (within the radius) and not on my wifi, my status will remain ‘home’ now! Perfect!
Thanks a lot for your help!!

1 Like