Home Assistant can get information from your wireless router or third party services like iCloud or OwnTracks to track which devices are connected and considered “in home”. Please check the sidebar for a list of brands of supported wireless routers and services.
An event (
device_tracker_new_device) will be fired when a device is discovered for the first time.
To get started add the following lines to your
configuration.yaml (example for Netgear):
# Example configuration.yaml entry for Netgear device device_tracker: - platform: netgear host: 192.168.1.1 username: admin password: YOUR_PASSWORD new_device_defaults: track_new_devices: True hide_if_away: False
The following optional parameters can be used with any platform. However device tracker will only look for global settings under the configuration of the first configured platform:
||12||Seconds between each scan for new devices|
||180||Seconds to wait till marking someone as not home after not being seen. This parameter is most useful for households with Apple iOS devices that go into sleep mode while still at home to conserve battery life. iPhones will occasionally drop off the network and then re-appear.
||Default values for new discovered devices. Available options
Note that setting
track_new_devices: False will still result in new devices being recorded in
known_devices.yaml, but they won’t be tracked (
The extended example from above would look like the following sample:
# Example configuration.yaml entry for Netgear device device_tracker: - platform: netgear host: 192.168.1.1 username: admin interval_seconds: 10 consider_home: 180 track_new_devices: yes
device_tracker is enabled, a file will be created in your config dir named
known_devices.yaml. Edit this file to adjust which devices to be tracked.
Here’s an example configuration for a single device:
devicename: name: Friendly Name mac: EA:AA:55:E7:C6:94 picture: https://www.home-assistant.io/images/favicon-192x192.png track: yes hide_if_away: no
In the example above,
devicename refers to the detected name of the device. For instance,
||Host name or “Unnamed Device”||The friendly name of the device.|
||None||The MAC address of the device. Add this if you are using a network device tracker like Nmap or SNMP.|
||None||A picture that you can use to easily identify the person or device. You can also save the image file in a folder “www” in the same location (can be obtained from developer tools) where you have your configuration.yaml file and just use
||mdi:account||An icon for this device (use as an alternative to
||None||An email address for the device’s owner. If provided, it will override
||[uses platform setting]||If
||[uses platform setting]||Seconds to wait till marking someone as not home after not being seen. Allows you to override the global
GPS based device trackers (like OwnTracks, GPSLogger and others) can also be used with local network device trackers, such as Nmap or Netgear. To do this, fill in the
mac field to the entry in
known_devices.yaml with the MAC address of the device you want to track. This way the state of the device will be determined by the source that reported last. The naming convention for known device list is
<username>_<device-id> and could be set in the app configuration.
An example showing the inclusion of the
mac field for multiple platform tracking. The
mac field was added to the GPS based device tracker entry and will enable tracking by all platforms that track via the
USERNAME_DEVICE_ID: name: Friendly Name mac: EA:AA:55:E7:C6:94 picture: https://www.home-assistant.io/images/favicon-192x192.png gravatar: firstname.lastname@example.org track: yes hide_if_away: no
If you want to track whether either your GPS based tracker or your local network tracker, identify you as being at home, use a group instead.
The state of your tracked device will be
'home' if it is in the home zone, detected by your network or Bluetooth based presence detection. If you’re using a presence detection method that includes coordinates then when it’s in a zone the state will be the name of the zone (in lower case). When a device isn’t at home and isn’t in any zone, the state will be