Commit graph

2 commits

Author SHA1 Message Date
2b8c4e06aa Improve /dectstatus with handset RF context and cleaner base cards.
Surface handset registrations and RSSI, tighten reboot health to 7 days,
and consolidate Base / Handsets & RF / Network & RTP sections.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 09:02:55 -04:00
17a8469592 Add DBS-210 status.xml parser + health verdict
Second half of the DECT spike: the read-side "collector" that turns
a raw /admin/status.xml body into a normalized JS object plus a
pure health verdict. This is what will feed the /phonestatus base-
station diagnostics section once we wire it in.

- integrations/cisco-dect/statusXml.js:
  - xmlToObject(): 60-line hand-rolled parser targeted at the
    DBS-210's flat XML shape. No attributes, no CDATA, no comments
    — so we avoid pulling in a generic XML lib. Throws loudly on
    malformed input.
  - parseRebootLine(): decodes the reboot-log entries the device
    keeps in Reboot_Line_1..6, extracting timestamp + sequence #
    + reason name/code + firmware version. Unrecognized shapes come
    back marked `unrecognized:true` instead of being dropped.
  - parseStatusXml(): grouped, camelCased view of the device state
    (device / firmware / time / multiCell / rebootLog / rtp /
    network / security / emergencyNumbers / features). Every field
    is null-safe.
  - summarizeBaseHealth(): pure-function verdict. Flags recent
    reboots (uptime < 10 min), power-loss events in the log,
    DECT RF conflicts, non-zero rx/tx errors. Splits into
    warnings vs info so consumers can render at the right severity.
- tests/statusXml.test.js: 23 tests covering the parser, the
  reboot-line decoder, the higher-level normalizer, and the health
  verdict — using a REDACTED inline copy of a real status.xml
  captured from a lab base. MAC/IP/RFPI/firmware-server URL are
  all obviously-fake so the fixture is safe to commit.
2026-07-02 15:35:34 -04:00