Ping + Arp custom_component device tracker

Ensure your home assistant user can run the ping & arp commands which the component relies upon.

Also I haven’t updated my HA for a long time so it’s quite possible this component is broken for recent installs.

hi Martin

did you manage to solve the problem with - Integration not found. ?

I’d recommend GitHub - cyberjunky/home-assistant-arpscan_tracker: This component tracks devices using the arp-scan liinux command, it's very fast, and reasonably accurate. nowadays

Tested arpscanner integration but it’s detection of my phones is very unstable compared to ping_arp which results are rock solid.
Not sure for how long ping_arp integration will be supported but I will be using it until the end…

Hello everyone,
Since Home Assistant Core upgrade to version 2025.1.0, the ping_arp custom integration does no longer work for me.
In the “check configuration”, I get the following warning message:

Platform error 'device_tracker' from integration 'ping_arp' - cannot import name 'SOURCE_TYPE_ROUTER' from 'homeassistant.components.device_tracker.const' (/usr/src/homeassistant/homeassistant/components/device_tracker/const.py)

Any clue on how to fix it?
Thank you.

1 Like

Hi, same error for me too, I can’t solve it. For iPhones this component is essential since with normal ping it often gives the out of home status incorrectly.

I noticed that on developer tools the entity device_tracker.myiphone gives on source_type as null state, instead with the official integration on source_type it says source_type: router. I don’t know if it can help someone…

Got it fixed by updating device_tracker.py as follows:

From:

from homeassistant.components.device_tracker.const import (
    CONF_SCAN_INTERVAL, SCAN_INTERVAL, SOURCE_TYPE_ROUTER)

To:

from homeassistant.components.device_tracker.const import (
    CONF_SCAN_INTERVAL, SCAN_INTERVAL, SourceType)

From:

 if self.ping():
    see(dev_id=self.dev_id, source_type=SOURCE_TYPE_ROUTER)

To:

if self.ping():
   see(dev_id=self.dev_id, source_type=SourceType.ROUTER)

From:

 if self.parp():
    see(dev_id=self.dev_id, source_type=SOURCE_TYPE_ROUTER)

To:

if self.parp():
   see(dev_id=self.dev_id, source_type=SourceType.ROUTER)
2 Likes

Great. It works. Thank you, you were great. Thank you.

1 Like

Thank you, great work.
It’s painful to see such useful and unique integration without support.
Still hope someone makes an update and it returns back to HACS library…

1 Like

iPhonedetect is in hacs and supported and does the same thing.

1 Like

Thanks for the tip.
Not sure whether it’s working for Android phones(have multiple) too but it’s good to have alternatives.

In the meantime wanted to get rid of the warning about version 2025.5 in the logs.
I don’t know python but it seems that only 2 lines need a change in device_tracker.py:

  1. after line from homeassistant import const add following line
    from homeassistant.helpers.event import track_point_in_utc_time
  2. replace hass.helpers.event.track_point_in_utc_time(update_interval, util.dt.utcnow() + interval)
    with track_point_in_utc_time(hass, update_interval, util.dt.utcnow() + interval)

hello everyone, with the latest update home assistant ping arp does not work properly. If I restart the system with the smartphone already connected to wifi it gives me “at home”, but if the system starts with the smartphone disconnected and then I reconnect it the status does not change.
The problem occurs with both android and iphone. Thanks to everyone

Core 2025.5.1
Supervisor 2025.04.1
Operating System 15.2
Frontend 20250509.0

1 Like

Same issue here