aceberg / WatchYourLAN

Lightweight network IP scanner with web GUI
https://hub.docker.com/r/aceberg/watchyourlan
MIT License
1.24k stars 55 forks source link

Make ARP timeout configurable #65

Closed SlavikCA closed 8 months ago

SlavikCA commented 9 months ago

I think WatchYourLAN gets the list of devices on the LAN by submitting ARP requests.

It's works 100% reliable for the devices, which I have connected via Ethernet.

However my WiFi (especially slow devices, such as security dashboards, AC thermostats, but also smartphone) are very flaky: WatchYourLAN shows, that they often disconnects and reconnects. Even though they are really always on.

It appears, that it's especially true, when I have a lot of active WiFi devices on the networks.

So, is it possible to increase the timeout for ARP requests or make it configurable? Or alternatively, mark the device as offline only if it didn't respond 2 times?

SlavikCA commented 9 months ago

Example of AC thermostat history:

image

SlavikCA commented 9 months ago

I manually ran arp-scan with added parameter: -t 2000

It detected all WiFi devices 10 out of 10 times.

When I ran without it - all WiFi devices were detected 5 out 10 times. Other 5 times, some devices were missing.

From the manual:

--timeout=<i> or -t <i> Set initial per host timeout to <i> ms, default=500.
            This timeout is for the first packet sent to each host.
            subsequent timeouts are multiplied by the backoff
            factor which is set with --backoff.