Identify unknown LAN devices: OUI, mDNS, manual labels, on-demand deep check #15

Closed
opened 2026-07-12 22:58:09 -06:00 by jhodgkin · 1 comment
Owner

Four pieces, all in scope:

  1. MAC OUI vendor lookup (automatic, cheap) — likely resolves most IoT (Echo/Ring/smart plugs) to a vendor name.
  2. mDNS passive enrichment during the regular discovery sweep (avahi-resolve).
  3. Manual labeling in the dashboard, persisted by MAC, overrides the static known list.
  4. Admin-triggered "deep check" button per unknown device: SSDP/UPnP targeted query, port scan + HTTP title grab, reverse DNS. Runs on the CT122 host (multicast needs real network access, same constraint as the existing discovery script) via a new SSH forced-command endpoint, on demand only (not automatic, to avoid noise).
Four pieces, all in scope: 1. MAC OUI vendor lookup (automatic, cheap) — likely resolves most IoT (Echo/Ring/smart plugs) to a vendor name. 2. mDNS passive enrichment during the regular discovery sweep (avahi-resolve). 3. Manual labeling in the dashboard, persisted by MAC, overrides the static known list. 4. Admin-triggered "deep check" button per unknown device: SSDP/UPnP targeted query, port scan + HTTP title grab, reverse DNS. Runs on the CT122 host (multicast needs real network access, same constraint as the existing discovery script) via a new SSH forced-command endpoint, on demand only (not automatic, to avoid noise).
Author
Owner

Done, all four pieces:

  1. OUI vendor lookup (mac-oui-lookup) — computed on read, no storage. Already resolves 59/71 devices, including "Ring LLC" and multiple "Amazon Technologies Inc." (the Echo Dots) and "Tuya Smart Inc." (common smart-plug chipset vendor) — matches exactly what was described.
  2. mDNS enrichment — avahi-resolve added to the existing discovery sweep (parallel, bounded per-IP timeout).
  3. Manual labeling — new device_labels table keyed by MAC (survives DHCP IP changes), inline-editable in the dashboard, takes priority over both vendor/mDNS hints and the static config list.
  4. On-demand deep check — admin-triggered button per unknown device: mDNS, targeted SSDP/UPnP (correctly identified Home Assistant with friendlyName/manufacturer/model), curated port scan + HTTP title grab. Runs on the CT122 host via a parameterized SSH forced-command ($SSH_ORIGINAL_COMMAND, strictly validated — confirmed a shell-injection attempt gets rejected cleanly).

Hit and fixed three real bugs along the way: an ESM/CJS interop crash on startup from mac-oui-lookup's named export, ALTER TABLE ADD COLUMN IF NOT EXISTS being a SQLite syntax error despite the version being new enough (conflated with CREATE TABLE's support for that clause), and two Playwright test bugs (substring-matching IPs and badge text) caught and fixed the same way as before. 13/13 e2e tests green including 4 new specs covering labeling and deep-check.

Done, all four pieces: 1. **OUI vendor lookup** (mac-oui-lookup) — computed on read, no storage. Already resolves 59/71 devices, including "Ring LLC" and multiple "Amazon Technologies Inc." (the Echo Dots) and "Tuya Smart Inc." (common smart-plug chipset vendor) — matches exactly what was described. 2. **mDNS enrichment** — avahi-resolve added to the existing discovery sweep (parallel, bounded per-IP timeout). 3. **Manual labeling** — new device_labels table keyed by MAC (survives DHCP IP changes), inline-editable in the dashboard, takes priority over both vendor/mDNS hints and the static config list. 4. **On-demand deep check** — admin-triggered button per unknown device: mDNS, targeted SSDP/UPnP (correctly identified Home Assistant with friendlyName/manufacturer/model), curated port scan + HTTP title grab. Runs on the CT122 host via a parameterized SSH forced-command ($SSH_ORIGINAL_COMMAND, strictly validated — confirmed a shell-injection attempt gets rejected cleanly). Hit and fixed three real bugs along the way: an ESM/CJS interop crash on startup from mac-oui-lookup's named export, ALTER TABLE ADD COLUMN IF NOT EXISTS being a SQLite syntax error despite the version being new enough (conflated with CREATE TABLE's support for that clause), and two Playwright test bugs (substring-matching IPs and badge text) caught and fixed the same way as before. 13/13 e2e tests green including 4 new specs covering labeling and deep-check.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jhodgkin/homelab-monitor#15