From 97081332713bf6e1005ae27122a70fa511458f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=B8yer=20Iversen?= Date: Sat, 10 Dec 2016 23:18:49 +0100 Subject: [PATCH] Update device_tracker.nmap_tracker.markdown (#1577) --- .../device_tracker.nmap_tracker.markdown | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/_components/device_tracker.nmap_tracker.markdown b/source/_components/device_tracker.nmap_tracker.markdown index 85612f9cd2a..e3f981f2fa2 100644 --- a/source/_components/device_tracker.nmap_tracker.markdown +++ b/source/_components/device_tracker.nmap_tracker.markdown @@ -33,6 +33,8 @@ Configuration variables: - **hosts** (*Required*): The network address to scan (in any supported NMap format). Mixing subnets and IPs is possible. - **home_interval** (*Optional*): The number of minutes nmap will not scan this device, assuming it is home, in order to preserve the device battery. - **exclude** (*Optional*): Hosts not to include in nmap scanning. +- **scan_options** (*Optional*): Configurable scan options for nmap. Default to `-F --host-timeout 5s` + A full example for the `nmap` tracker could look like the following sample: @@ -59,5 +61,19 @@ device_tracker: - 10.0.0.15 ``` +An example of how the Nmap scanner can be customized: + +Add the capabilities to Nmap. Be sure to specify the full path to wherever you installed Nmap: + +`sudo setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap +` + +And you can set up the device tracker as +```yaml +- platform: nmap_tracker + hosts: 192.168.1.1-25 + scan_options: " --privileged -sP " +``` + See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.