Device tracker using asuswrt for more then one iPhone

I still have not been able to get device tracker using asuswrt to work for more then one iPhone.
Here is is my configuration.yaml entry. Only the iphone7plus is acknowledged and prevents room detection PIR’s from sending push notifications.

device_tracker:
platform: asuswrt
host: !secret asus_ip
username: !secret asus_username
password: !secret asus_password
name: iphone7plus
name: iphone8plus
interval_seconds: 10
consider_home: 30
track_new_devices: True
hide_if_away: False

the asuswrt component has changed. you need to set up the main asuswrt as a component then set up the device tracker separately.

asuswrt:
  host: 192.168.1.1
  username: !secret asus_username
  password: !secret asus_pwd

device_tracker:
  - platform: asuswrt
    #interval_seconds: 10
    consider_home: 180
    new_device_defaults:
      track_new_devices: False
      hide_if_away: False

I didn’t show the asuswrt setup.
How is a second, third… phone included??

Thanks for your help.

Here is my config…

asuswrt:
host: !secret asus_ip
username: !secret asus_username
password: !secret asus_password

device_tracker:
- platform: asuswrt
host: !secret asus_ip
username: !secret asus_username
password: !secret asus_password
name: iphone7plus
name: iphone8plus
interval_seconds: 10
consider_home: 30
track_new_devices: True
hide_if_away: False

Everything connected to your router will become a device tracker, including your phones. You don’t have to list them out separately.

you need to remove the username, password and name entries from your device_tracker config since those aren’t supported by that component.

you also need to start posting your code snippets corectly for the forum to be able to see possible errors.

Thanks for your reply.

Here is my latest configuration.
Only my phone iphone7plus is detected not the iphone8plus.
I have the iphone7 plus in an automation but not the iphone8plus.
Is that why??

asuswrt:
  host: !secret asus_ip
  username: !secret asus_username
  password: !secret asus_password

device_tracker:
  - platform: asuswrt 
    interval_seconds: 10
    consider_home: 30
    track_new_devices: True
    hide_if_away: False

Automation…

- alias: Test Push Notifications On
  trigger:
    platform: state
    entity_id: switch.bookcase
    to: 'on'
  condition:
    condition: state
    entity_id: device_tracker.iphone7plus
    state: not_home
  action:
    service: notify.ios_iphone7plus
    data:
      message: water has been detected in the garage
      data:
        push:
          badge: 0
          sound: "US-EN-Alexa-Water-Detected-In-Garage.wav"

Thanks for your response.

I still have not figured out why only one phone is detected.

Cheers,

Keith

I’m still not entirely confident that your config is correct for the device tracker. See my example. Mine and yours are different.

And are you sure your phone is connected to the router? What are the contents of your known_devices.yaml file?

When I have “track_new_devices: False” (your config) and WiFi off (both phones) none of PIR sensors send push notifications. Thinking it might be our iPads being in “home” state they were turned off with the same result. If I change config to “track_new_devices: True” and WiFi off (only the iPhone7plus) then the PIR sensors trip. The router is seeing both phones.

My config…
device_tracker:

  • platform: asuswrt
    #name: iphone7plus
    interval_seconds: 10
    consider_home: 30
    track_new_devices: True
    hide_if_away: False

Your config…
device_tracker:

  • platform: asuswrt
    #interval_seconds: 10
    consider_home: 180
    new_device_defaults:
    track_new_devices: False
    hide_if_away: False

I guess I need to say it one more time…you really need to use my gif above to properly format your code. If you have syntax errors there is literally no way for anyone to find them if you don’t post your code correctly.

so what you meant to post was (fixed for you viewing pleasure):

You should now, hopefully, see the differences between the two.

And you never posted the contents of your known_devices.yaml file.

Hello,

I used your preformatted text icon. Not sure why it didn’t work??
I did make a few corrections after so maybe that’s why.

I have corrected the my config indenting so it matches yours.

Here is my known_devices.yaml file.

hassio:
  hide_if_away: false
  icon:
  mac: B8:27:EB:62:B2:DD
  name: hassio
  picture:
  track: true
  vendor: unknown

amazon92e6cb57c:
  hide_if_away: false
  icon:
  mac: 88:71:E5:CA:58:F3
  name: amazon-92e6cb57c
  picture:
  track: true
  vendor: unknown

149182d06f7d:
  hide_if_away: false
  icon:
  mac: 14:91:82:D0:6F:7D
  name: 149182d06f7d
  picture:
  track: true
  vendor: Belkin International Inc.

00015c751046:
  hide_if_away: false
  icon:
  mac: 00:01:5C:75:10:46
  name: 00015c751046
  picture:
  track: true
  vendor: unknown

desktoped5avr3:
  hide_if_away: false
  icon:
  mac: 70:5A:0F:42:C4:18
  name: DESKTOP-ED5AVR3
  picture:
  track: true
  vendor: unknown

240ac4090fb4:
  hide_if_away: false
  icon:
  mac: 24:0A:C4:09:0F:B4
  name: 240ac4090fb4
  picture:
  track: true
  vendor: Espressif Inc.

esp_c64a9d:
  hide_if_away: false
  icon:
  mac: 5C:CF:7F:C6:4A:9D
  name: ESP C64A9D
  picture:
  track: true
  vendor: unknown

7475483e5c90:
  hide_if_away: false
  icon:
  mac: 74:75:48:3E:5C:90
  name: 7475483e5c90
  picture:
  track: true
  vendor: unknown

149182242f73:
  hide_if_away: false
  icon:
  mac: 14:91:82:24:2F:73
  name: 149182242f73
  picture:
  track: true
  vendor: Belkin International Inc.

94103e4e9349:
  hide_if_away: false
  icon:
  mac: 94:10:3E:4E:93:49
  name: 94103e4e9349
  picture:
  track: true
  vendor: unknown

espressif:
  hide_if_away: false
  icon:
  mac: 30:AE:A4:06:43:50
  name: espressif
  picture:
  track: true
  vendor: unknown

myqc8f:
  hide_if_away: false
  icon:
  mac: 64:52:99:43:DD:2E
  name: MyQ-C8F
  picture:
  track: true
  vendor: unknown

keithsipad:
  hide_if_away: false
  icon:
  mac: A4:67:06:48:93:FE
  name: Keiths-iPad
  picture:
  track: true
  vendor: unknown

amazonf147cf53b:
  hide_if_away: false
  icon:
  mac: B4:7C:9C:28:85:B9
  name: amazon-f147cf53b
  picture:
  track: true
  vendor: unknown

94103e4e88dd:
  hide_if_away: false
  icon:
  mac: 94:10:3E:4E:88:DD
  name: 94103e4e88dd
  picture:
  track: true
  vendor: unknown

001dc0641ddd:
  hide_if_away: false
  icon:
  mac: 00:1D:C0:64:1D:DD
  name: 001dc0641ddd
  picture:
  track: true
  vendor: unknown

esp_0e480c:
  hide_if_away: false
  icon:
  mac: 60:01:94:0E:48:0C
  name: ESP 0E480C
  picture:
  track: true
  vendor: Espressif Inc.

bcad289792c5:
  hide_if_away: false
  icon:
  mac: BC:AD:28:97:92:C5
  name: bcad289792c5
  picture:
  track: true
  vendor: Hangzhou Hikvision Digital Technology Co.,Ltd.

28924ab6cffd:
  hide_if_away: false
  icon:
  mac: 28:92:4A:B6:CF:FD
  name: 28924ab6cffd
  picture:
  track: true
  vendor: unknown

e4e0c5f37ac1:
  hide_if_away: false
  icon:
  mac: E4:E0:C5:F3:7A:C1
  name: e4e0c5f37ac1
  picture:
  track: true
  vendor: Samsung Electronics Co.,Ltd

t1000ad00130:
  hide_if_away: false
  icon:
  mac: 88:12:4E:15:A9:5F
  name: T1000AD00130
  picture:
  track: true
  vendor: Qualcomm Inc.

e47cf9672361:
  hide_if_away: false
  icon:
  mac: E4:7C:F9:67:23:61
  name: e47cf9672361
  picture:
  track: true
  vendor: Samsung Electronics Co.,Ltd

desktop058jesb:
  hide_if_away: false
  icon:
  mac: 98:5F:D3:CB:39:20
  name: DESKTOP-058JESB
  picture:
  track: true
  vendor: Microsoft Corporation

espressif_2:
  hide_if_away: false
  icon:
  mac: 24:0A:C4:09:0A:1C
  name: espressif
  picture:
  track: true
  vendor: Espressif Inc.

espressif_3:
  hide_if_away: false
  icon:
  mac: 30:AE:A4:3A:C5:90
  name: espressif
  picture:
  track: true
  vendor: Espressif Inc.

winc0000:
  hide_if_away: false
  icon:
  mac: 34:D2:70:02:55:95
  name: WINC-00-00
  picture:
  track: true
  vendor: Amazon Technologies Inc.

iphone7plus:
  hide_if_away: false
  icon:
  mac: 18:65:90:00:6A:BE
  name: iphone7plus
  picture:
  track: true
  vendor: Apple

ldpm31462:
  hide_if_away: false
  icon:
  mac: FC:F8:AE:76:49:C2
  name: ldpm31462
  picture:
  track: true

f437b7687f81:
  hide_if_away: false
  icon:
  mac: F4:37:B7:68:7F:81
  name: f437b7687f81
  picture:
  track: false

e85b5b22a950:
  hide_if_away: false
  icon:
  mac: E8:5B:5B:22:A9:50
  name: e85b5b22a950
  picture:
  track: false

amazon3bc32c381:
  hide_if_away: false
  icon:
  mac: 40:B4:CD:68:A7:40
  name: amazon-3bc32c381
  picture:
  track: false

jorgiesipadpro:
  hide_if_away: false
  icon:
  mac: 78:7B:8A:64:5B:17
  name: JorgiesiPadPro
  picture:
  track: true

f8cfc5f48c7a:
  hide_if_away: false
  icon:
  mac: F8:CF:C5:F4:8C:7A
  name: f8cfc5f48c7a
  picture:
  track: false

lm1713:
  hide_if_away: false
  icon:
  mac: 34:41:5D:49:F9:DF
  name: LM1713
  picture:
  track: false

lindysipad:
  hide_if_away: false
  icon:
  mac: 04:15:52:15:CA:9D
  name: Lindys-iPad
  picture:
  track: false

jorgie:
  hide_if_away: false
  icon:
  mac: 40:CB:C0:42:F2:BB
  name: Jorgie
  picture:
  track: true

702ad547aff1:
  hide_if_away: false
  icon:
  mac: 70:2A:D5:47:AF:F1
  name: 702ad547aff1
  picture:
  track: true

harmonyhub:
  hide_if_away: false
  icon:
  mac: 00:04:20:EC:EE:AD
  name: HarmonyHub
  picture:
  track: true

espressif_4:
  hide_if_away: false
  icon:
  mac: 30:AE:A4:3B:82:8C
  name: espressif
  picture:
  track: true

espressif_5:
  hide_if_away: false
  icon:
  mac: 30:AE:A4:18:ED:F8
  name: espressif
  picture:
  track: true

149182018f81:
  hide_if_away: false
  icon:
  mac: 14:91:82:01:8F:81
  name: 149182018f81
  picture:
  track: true

wemo:
  hide_if_away: false
  icon:
  mac: 60:38:E0:63:EF:E9
  name: wemo
  picture:
  track: true

iphone:
  hide_if_away: false
  icon:
  mac: 18:81:0E:89:4D:4E
  name: iPhone
  picture:
  track: true

Which of those devices is the iphone that isn’t showing up in the dev states? Check the mac address of the phone to try to match it to one of the devices in the list.

1 Like

It is in Dev States as well as known_devices.yaml but still will not prevent PIR’s from tripping like my iphone7plus. Jorgie’s MAC matches phones MAC.

Snip-it of Dev. States

device_tracker.jorgie
AsusWrtDeviceScanner 
friendly_name: Jorgie

In known_devices.yaml

jorgie:
  hide_if_away: false
  icon:
  mac: 40:CB:C0:42:F2:BB
  name: Jorgie
  picture:
  track: true

Well… That’s a completely different issue than the one I thought we were battling. So where did you mention that before? All you ever said is that the phone isn’t being detected by HA…

Anyway, you need to post the automation that isn’t working that contains the device tracker associated with that phone.

Sorry you misunderstood what the issue is… Thanks for your help.

I’m still willing to help figure out your issue.

You just need to post the automation that isn’t working

Here is one of the sensor automation’s.
I have no automation’s with with the other iPhone “Jorgie” like mine “service: notify.ios_iphone7plus”.

- alias: Sensor Board-1 PIR
  trigger:
    platform: mqtt
    topic: "SB-1_pir"    
  condition:
    condition: state
    entity_id: device_tracker.iphone7plus
    state: not_home
  action:
    service: notify.ios_iphone7plus
    data:
      message: SB-1 PIR has detected motion
      data:
        push:
          badge: 0
          sound: #""

then how do you know it isn’t working?

Does the one posted above work or not work?

Yes… It works if my girlfriend walks around the home tripping the room sensor PIR’s as long as my iphone is out of WiFi range (I’m gone) or I turn WiFi off on my phone. I need her iphone to be acknowledge via asuswrt presence detection so I don’t receive push notifications. Thx

So, your girlfriends phone is a device_tracker and it shows up. It just never changes from not_home when connected to wi-fi?

Have you tried just removing all of the existing info for her phone from known devices

Stop HA, clean up known devices, turn off wi-fi, restart router. Turn on wi-fi and then start HA. In that order.

Does her phone show back up as a device Tracker? Still stuck at not_home.

The asus component is pretty stable, not a lot of reported issues, I have multiple iphones and they all work as expected. I have has issues kind of like yours in the past and found out i had made a mistake, was looking at the wrong device or typo in mac address (case matters), or something similiar.

Try the removal and see if that works, if not, then really look closely at your configs