diff --git a/public/nodes.js b/public/nodes.js index 0081b247..710f57f5 100644 --- a/public/nodes.js +++ b/public/nodes.js @@ -93,7 +93,14 @@ const recent = h.recentPackets || []; const lastHeard = stats.lastHeard; const statusAge = lastHeard ? (Date.now() - new Date(lastHeard).getTime()) : Infinity; - const statusLabel = statusAge < 3600000 ? '🟢 Active' : statusAge < 86400000 ? '🟡 Degraded' : '🔴 Silent'; + // Thresholds based on MeshCore advert intervals: + // Repeaters/rooms: flood advert every 12-24h, so degraded after 24h, silent after 72h + // Companions/sensors: user-initiated adverts, shorter thresholds + const role = (n.role || '').toLowerCase(); + const isInfra = role === 'repeater' || role === 'room'; + const degradedMs = isInfra ? 86400000 : 3600000; // 24h : 1h + const silentMs = isInfra ? 259200000 : 86400000; // 72h : 24h + const statusLabel = statusAge < degradedMs ? '🟢 Active' : statusAge < silentMs ? '🟡 Degraded' : '🔴 Silent'; body.innerHTML = ` ${hasLoc ? `
` : ''}