You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3f23563
Browse filesBrowse the repository at this point in the historyBrowse files
feat(alerts): alert when a new client is seen for the first time (#1323)
The only client-join alert was 'unknown device', which fires only for
nameless clients after a few poll ticks (#234). A device that resolves a
hostname on the first tick (DHCP reservation, static name) was never
unknown, so a named-but-new client joined silently - no log, no push.
- noteDevicesSeen now returns the first-timers (MACs inserted into
device_seen for the first time) that already carry a name; nameless
ones stay with unknown-device so a new client never alerts twice.
- Startup anti-avalanche: when the table was empty on entry (first boot
or fresh DB), the whole online set is seeded silently; later additions
alert normally.
- trackNewClients emits a clients-category info alert, urgent so it also
pushes, one-shot per MAC persisted in kv (new_client_alerted:) with
the same semantics as unknown_alerted (#248). A MAC that already
alerted as unknown does not re-alert here when it later gains a name,
and tombstoned clients (#1278/#1290) never re-alert.
- Carries name/mac/ip/router/attachment; i18n es/en.
Tests: named first-timer alerts once with full vars, nameless stays with
unknown-device, empty-table seeding is silent but later joins alert,
unknown-alerted guard.
Closes#1323
Copy file name to clipboardExpand all lines: app/public/locales/en/translation.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,7 @@
91
91
"high-temperature": "Improve ventilation and keep the router away from heat sources.",
92
92
"port-flapping": "Check the cable or switch port: an unstable link is usually the culprit.",
93
93
"unknown-device": "If you do not recognize it, block it or mark it as trusted in Settings.",
94
+
"new-client": "A device just joined the network for the first time. If you recognize it, name it or mark it as trusted in Settings; if not, check what it is.",
94
95
"wifi-ssid-impostor": "An unknown radio is broadcasting your network name. Check the area around the hearing AP; if you do not recognize the BSSID, treat it as a rogue AP.",
95
96
"new-neighbor-ssid": "A new network name has been broadcasting nearby for hours. If it is not yours, find out what it is (a new router, an IoT device in pairing mode, a hotspot); if it is a permanent neighbor you do not care about, dismiss the alert - it will not repeat.",
96
97
"uplink-switched": "Check the line that dropped: the router goes back to it on its own once it recovers.",
@@ -223,6 +224,10 @@
223
224
"description": "{{mac}} connected to {{router}}",
224
225
"descriptionWhere": "{{mac}} · {{ip}} connected to {{where}}"
225
226
},
227
+
"new-client": {
228
+
"title": "New client: {{name}}",
229
+
"description": "{{name}} ({{mac}}) connected for the first time to {{where}}"
230
+
},
226
231
"wifi-ssid-impostor": {
227
232
"title": "SSID impostor detected",
228
233
"description": "{{bssid}} advertises {{ssid}} (heard by {{router}}, {{signal}} dBm)"
Copy file name to clipboardExpand all lines: app/public/locales/es/translation.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,7 @@
91
91
"high-temperature": "Mejora la ventilación y aleja el router de fuentes de calor.",
92
92
"port-flapping": "Revisa el cable o el puerto del switch: un enlace inestable suele ser el culpable.",
93
93
"unknown-device": "Si no lo reconoces, bloquéalo o márcalo como de confianza en Ajustes.",
94
+
"new-client": "Un dispositivo se ha conectado a la red por primera vez. Si lo reconoces, ponle nombre o márcalo como de confianza en Ajustes; si no, averigua qué es.",
94
95
"wifi-ssid-impostor": "Una radio desconocida está emitiendo el nombre de tu red. Mira qué hay cerca del AP que la oyó; si no reconoces el BSSID, trátala como un AP malicioso.",
95
96
"new-neighbor-ssid": "Un nombre de red nuevo lleva horas emitiendo cerca. Si no es tuyo, averigua qué es (un router nuevo, un IoT en modo pairing, un hotspot); si es un vecino fijo que no te importa, descarta la alerta - no se repetirá.",
96
97
"uplink-switched": "Revisa la línea que se ha caído: el router volverá a ella solo cuando se recupere.",
@@ -223,6 +224,10 @@
223
224
"description": "{{mac}} se ha conectado a {{router}}",
224
225
"descriptionWhere": "{{mac}} · {{ip}} se ha conectado a {{where}}"
225
226
},
227
+
"new-client": {
228
+
"title": "Cliente nuevo: {{name}}",
229
+
"description": "{{name}} ({{mac}}) se ha conectado por primera vez a {{where}}"
230
+
},
226
231
"wifi-ssid-impostor": {
227
232
"title": "SSID impostor detectado",
228
233
"description": "{{bssid}} anuncia {{ssid}} (oído por {{router}}, {{signal}} dBm)"
Copy file name to clipboardExpand all lines: server-go/internal/alerts/alerts.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,7 @@ const (
106
106
HintUnknownDevice="unknown-device"
107
107
HintSsidImpostor="wifi-ssid-impostor"
108
108
HintNewNeighborSsid="new-neighbor-ssid"
109
+
HintNewClient="new-client"
109
110
HintFirmware="firmware-outdated"
110
111
HintWanDown="wan-down"
111
112
HintWifiWeak="wifi-weak"
@@ -163,6 +164,7 @@ var Hints = map[string]string{
163
164
HintUnknownDevice: "If you do not recognize it, block it or mark it as trusted in Settings.",
164
165
HintSsidImpostor: "An unknown radio is broadcasting your network name. Check the area around the hearing AP; if you do not recognize the BSSID, treat it as a rogue AP.",
165
166
HintNewNeighborSsid: "A new network name has been broadcasting nearby for hours. If it is not yours, find out what it is (a new router, an IoT device in pairing mode, a hotspot); if it is a permanent neighbor you do not care about, dismiss the alert - it will not repeat.",
167
+
HintNewClient: "A device just joined the network for the first time. If you recognize it, name it or mark it as trusted in Settings; if not, check what it is.",
166
168
HintFirmware: "Your router has newer firmware available; check Firmware upgrades (Labs) or LuCI.",
167
169
HintWanDown: "Check the modem/ONT and contact your ISP if the outage persists.",
168
170
HintWifiWeak: "Move the device closer to an access point or relocate the AP.",
0 commit comments