diff --git a/net_alerter/net_alerter.py b/net_alerter/net_alerter.py index e594f84..c41a4b5 100644 --- a/net_alerter/net_alerter.py +++ b/net_alerter/net_alerter.py @@ -953,9 +953,6 @@ def update_occupancy_state() -> None: def on_arrival(mac: str, ip: str, hostname: str = "") -> None: """Handle device arrival.""" - # Update passive observation tracking - _update_last_seen(mac) - # Infrastructure IPs never trigger alerts if ip in infrastructure_ips: logging.debug(f"Ignoring infrastructure IP {ip} (MAC:{mac})") @@ -1758,10 +1755,10 @@ def personal_watchdog() -> None: time.sleep(60) # Check every minute now = time.time() - # Get current set of personal devices without holding lock for long - with personal_lock: - tracked = set(personal_devices) - + # Track all personal devices currently in known_devices (not just enrolled set) + with known_lock: + tracked = {mac for mac in known_devices if is_personal_device(mac)} + for mac in tracked: # Get last_seen timestamp with last_seen_lock: