mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-08 18:06:54 +00:00
Drastically improve the device_tracker documentation.
This commit is contained in:
parent
f7a31f435e
commit
033bc84fbf
@ -9,9 +9,11 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Home Assistant can get information from your wireless router to track which devices are connected. Please check the sidebar for a list of brands of supported wireless routers.
|
||||
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.
|
||||
|
||||
There are also trackers available which uses different technologies like [MQTT](/components/mqtt/) or [Nmap](/components/device_tracker.nmap_scanner/) to scan the network for devices.
|
||||
There are also trackers available which use different technologies like [MQTT](/components/mqtt/) or [Nmap](/components/device_tracker.nmap_scanner/) to scan the network for devices.
|
||||
|
||||
# {% linkable_title Configuring a `device_tracker` platform %}
|
||||
|
||||
To get started add the following lines to your `configuration.yaml` (example for Netgear):
|
||||
|
||||
@ -22,31 +24,39 @@ device_tracker:
|
||||
host: 192.168.1.1
|
||||
username: admin
|
||||
password: YOUR_PASSWORD
|
||||
|
||||
# Optional configuration
|
||||
|
||||
# If new discovered devices are tracked by default (default: yes)
|
||||
track_new_devices: yes
|
||||
# Seconds between each scan for new devices (default: 12)
|
||||
interval_seconds: 12
|
||||
# Seconds to wait till marking someone as not home after not being seen
|
||||
# (default: 180)
|
||||
consider_home: 180
|
||||
```
|
||||
|
||||
Once tracked, a file will be created in your config dir called `known_devices.yaml`. Edit this file to adjust which devices to be tracked. Here you can also setup a URL for each device to be used as the entity picture and set whether the device will be show in the UI when in the away state. You can also put an email address in as the entity picture to pull the [Gravatar](https://gravatar.com) for the given address.
|
||||
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:
|
||||
|
||||
Multiple device trackers can be used in parallel, such as [Owntracks](/components/device_tracker.owntracks/) and [Nmap](/components/device_tracker.nmap_scanner/). The state of the device will be determined by the source that reported last. Device tracker will look for global settings (`track_new_devices`, `consider_home`, and `home_interval`) under the configuration of the first platform.
|
||||
| Parameter | Default | Description |
|
||||
|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `track_new_devices` | True | If new discovered devices are tracked by default |
|
||||
| `interval_seconds` | 12 | Seconds between each scan for new devices |
|
||||
| `consider_home` | 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. `consider_home` helps prevent false alarms in presence detection when using IP scanners such as Nmap. |
|
||||
|
||||
The optional `consider_home` entry is 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. `consider_home` helps prevent false alarms in presence detection when using IP scanners such as nmap.
|
||||
Multiple device trackers can be used in parallel, such as [Owntracks](/components/device_tracker.owntracks/) and [Nmap](/components/device_tracker.nmap_scanner/). The state of the device will be determined by the source that reported last.
|
||||
|
||||
To add Nmap tracking just add the MAC address to the OwnTracks or iCloud device `mac:` configuration. To use both OwnTracks and Nmap you could use the following example:
|
||||
# {% linkable_title `known_devices.yaml` %}
|
||||
|
||||
Once `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:
|
||||
|
||||
```yaml
|
||||
owntracksdevicename:
|
||||
name: Friendly Name!
|
||||
devicename:
|
||||
name: Friendly Name
|
||||
mac: EA:AA:55:E7:C6:94
|
||||
picture:
|
||||
picture: https://home-assistant.io/images/favicon-192x192.png
|
||||
gravatar: test@example.com
|
||||
track: yes
|
||||
hide_if_away: no
|
||||
```
|
||||
|
||||
| Parameter | Default | Description |
|
||||
|----------------|-------------------------------|---------------------------------------------------------------------------------------------------------|
|
||||
| `name` | Host name or "Unnamed Device" | The friendly name of the device |
|
||||
| `mac` | None | The MAC address of the device. Add this if you are using a network device tracker like Nmap or SNMP |
|
||||
| `picture` | None | A picture that you can use to easily identify the person or device |
|
||||
| `gravatar` | None | An email address for the device's owner. If provided, it will override `picture` |
|
||||
| `track` | False | If `yes`/`on`/`true` then the device will be tracked. Otherwise its location and state will not update |
|
||||
| `hide_if_away` | False | If `yes`/`on`/`true` then the device will be hidden if it is not at home |
|
||||
|
Loading…
x
Reference in New Issue
Block a user