i would like to switch all light off when two devices are not detected.
im using nmap (the best free option i found) to detect person at home.
since mobile phone turn wifi to sleep every now and then i would like to turn off all light after 10 minutes that two person not in range,
is it possible to do so?
thank you!
Sure:
device_tracker:
- platform: nmap_tracker
hosts: 10.0.0.1-255
track_new_devices: yes
consider_home: 600 ## << This is where you define the amount of secs untill a device gets marked as "not_home"
interval_seconds: 10
home_interval: 5
Update: I just found out that the consider_home attribute is loaded from the known_devices.yaml as well. This means you can also extend this time only for IOS devices (which are probably the one’s which are giving you problems) in the known_devices.yaml.
I posted this earlier. May help you too…
thank you for your help,
i tried this morning to change the “consider_home” to 600 and even to 15 min,
im still getting false reading on iphone and nexus devices.
is it possible to make a number of checks before changing the status of the device?
(first check > false + (wait few sec/min) + second check > false > device is not at home)
thank you
David
you can use the following in your automations. But the problem would probably remain the same. I use Nmap too for presence detection, but I did not put automations when I am away because of that wifi sleep mode on most smartphones nowadays. To me Nmap is not reliable enough because of that. I would recommand using iBeacon instead (I am not currently doing it, but it seems like a more reliable solution) to detect when you are actually not here
condition: state
entity_id: group.GROUPWITHYOURTWODEVICES
state: 'not_home'
for:
minutes: 10