Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ verbatim where one exists — §3.5):
| `ghost-suspect` | requires **proven coverage**: store recording the node ≥N days with live subscriptions, zero successful comms AND zero non-dead status in that span; a young/empty store yields `insufficient history (n/N days)`, never a ghost verdict | rarely-woken battery node; store just wiped; subscription failure *(DR blocker)* |
| `mesh-correlated` **(built as `mesh-interference`: ≥ 35 % of ≥ 8 active nodes with ≥ 3 degraded, a 5-min dwell, held until it dips below 20 %; the penalty hold and duty-cycle annotation below are not built)** | breadth over **nodes-with-observable-traffic-in-window** (≥30–40% of active nodes, never an absolute K), sustained ≥2–3 consecutive windows, or corroborating controller-stats degradation | pipeline artifacts: post-gap windows are invalid for correlation (queued deltas aren't time-attributable); single-window unanimity after silence is evidence about the pipeline, not the mesh *(DR)* |
| `missed-report` | a **sleeping** node silent past the report interval it **declares**: its Wake Up interval, or else a Configuration parameter labelled as a heartbeat, read from the driver's value DB over the driver-WS (v0.73.0). `watch` past 1.5 intervals, `warn` past 2.5, and one more interval when the silence spans a controller radio-off or a stretch the log stream did not watch. Watched only while the node is not Dead, has been heard at least once, declares an interval above 0, and the driver-WS link is live. Nothing is learned from traffic | a device that declares no interval (never watched: a learned cadence cannot tell a device's timer from a household routine); a heartbeat lost during the nightly NVM-backup radio-off; a node Dead now (node-down owns it) *(DOCS §11.12)* |
| `node-down` | the driver reports the node Dead, sustained through the 5-min dwell (v0.37.0) — the ordinary outage, whose one or two transitions never reach `dead-flap`'s ≥ K | silence alone: Dead is set only after a failed transmission, and silence past a cadence is `quiet-node` *(§0)* |
| `node-down` | the driver reports the node Dead, sustained through the 5-min dwell (v0.37.0); since v0.79.2 a node not known to be listening (FLiRS, sleeping, capability unknown) first seen Dead within 10 min of a known driver start dwells 90 min instead (known starts only since v0.79.3), and since v0.79.3 a raised node-down is carried across a restart of the add-on — the ordinary outage, whose one or two transitions never reach `dead-flap`'s ≥ K | silence alone: Dead is set only after a failed transmission, and silence past a cadence is `quiet-node` *(§0)* |
| `quiet-node` | mains **listening** node whose last-activity age ≫ its own learned reporting cadence — emits honest "unreachability unknown, no traffic attempted" (state ≠ healthy) (operationally, v0.38, cadence-derived since v0.63.0: no learned cadence — a listening node not Dead now whose `lastSeen` is older than 3 × the configured liveness-sweep cadence, floored at 6 h; a node with no `lastSeen` at all is never accused) | battery/FLiRS within wake interval; nodes with no learned cadence yet; a node Dead now (node-down owns it) *(DR; §3.7)* |
| `rate-fallback` | the **same routeKey** that previously sustained 100k now persistently below 100k (operationally, v0.64.6: at least 2 separate acknowledged transmissions on that routeKey since its newest 100k reading, the newest below 100k) — same-route regression needs no capability data *(fail-closed: cross-route comparison excluded until driver-WS capability data exists — DR)* | legacy/FLiRS capability cap; single-exchange retry *(§2.2)* |
| `repeated-frames` | the driver drops a node's S2 frames as duplicates in bursts of ≥ 5 drops within a minute, matched in the driver-WS log stream (v0.74.0). `watch` after the dwell while the node has had two bursts in 24 h, or one of ≥ 15. The node is not hearing the controller's acknowledgements, so the link works one way | a single small burst; a node Dead now; a dark log lane (detection is off, and ENGINE says so); drop times are held in memory only, so a restart restarts the count *(DOCS §11.12)* |
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ health endpoint.
| --- | --- |
| Server | about 32,000 lines of TypeScript; 9 screens; SSH, browser and Home Assistant entity interfaces |
| Detection | 14 per-node detectors, 2 cross-node correlations, controller serial-link health |
| Verification | 1,737 tests; a mutation-testing harness of 1,729 hand-written mutants (17 labelled equivalent), run in full on each release |
| Verification | 1,769 tests; a mutation-testing harness of 1,798 hand-written mutants (17 labelled equivalent), run in full on each release |
| Integration | Home Assistant Core WebSocket (roster, statistics, gated actions) plus a read-only Z-Wave JS driver WebSocket (noise floor, capabilities, log stream) |

![The Overview screen: a live node table sorted worst-health-first, with per-node health scores, SNR margin, RTT, timeout rate, hop count, data rate and triage flags](docs/screenshots/overview.svg)
Expand Down Expand Up @@ -95,7 +95,9 @@ measured evidence:**
ceiling judges severe slowdowns meanwhile); symptomatic windows are
quarantined so a fault can't teach the baseline to accept itself.
3. **Symptom detectors** — degraded return path, dead-flapping, **node down**
(a node the driver has marked Dead, past a short dwell), a **quiet node** (a
(a node the driver has marked Dead, past a 5-minute dwell, or 90 minutes for
a FLiRS or sleeping node at a known driver start; kept across a restart of
the add-on), a **quiet node** (a
mains node that still reads Alive but has gone unheard for at least three
liveness-sweep cadences, never less than 6 h), rate fallback, high RTT,
weak signal, **route churn** (the mesh cannot settle on a stable
Expand Down
122 changes: 122 additions & 0 deletions docs/CHANGELOG-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,128 @@
Releases older than the ones in zwave_tui/CHANGELOG.md, newest first. The
shipped changelog keeps only the newest releases so Home Assistant can render it.

## 0.77.3

The RTT restart allowance now survives a deploy, and the RTT baseline's
restart hold judges a re-routed node against its own readings.

### Fixed — the restart seed across an add-on restart

- v0.77.1 kept each node's first fresh RTT reading of a driver lifetime, the
seed the restart allowance is measured from, in memory only. After every
add-on restart the next fresh reading became the seed, so its excess over
the node's median counted as restart. The 2 s ceiling caps that once the
driver has made about 20 transmissions to the node, but on a quiet mesh
that takes hours, and until then a slowdown first measured on that reading
was masked and fired from a later one, about one liveness sweep (~2 h)
later on a sweep-only node. The v0.77.1 comments and DOCS said the ceiling
always capped it; the morning after a host restart on the reference mesh
the re-taken seed was the smaller bound on 37 of 38 nodes.
- The evidence store now saves each node's seed with the counters of its
newest sample, and carries the seeds over an add-on restart while the
driver can still be the one that measured them: the host is on the same
boot (told by when the boot began, which a clock restored behind the save
cannot fake), the save is under an hour old, and no node's first sample
after the restart has a counter below its saved one. One driver keeps every
node's counters, so a single node showing a new driver drops every carried
seed. A seed that cannot be carried is re-taken from the next fresh
reading, as before.

### Fixed — the RTT baseline's restart hold

- A route change empties a node's RTT bands, and an empty band's median reads
0, so the hold counted a re-routed node's whole round trip as restart and
kept normal readings out of the new band (four of 38 nodes on 10-28). With
no learned median the seed is now measured against what the driver
averaged after it, `(rtt − 0.75^(k − k0) × a0) / (1 − 0.75^(k − k0))`: a
normal seed holds nothing past its own reading, and a large one is held
while it washes out. An empty band is never ready, so no alarm changes.
- DETAIL's *RTT learning is PAUSED* showed on every node within ~21
transmissions of a driver restart after each add-on restart (38 of 38 on
10-28), though nothing was held until the next fresh reading. It now
reports the verdict on the node's newest RTT reading, for as long as the
driver lifetime it was judged in lasts.
- The hold judges a reading at the transmission count it was recorded with.
The roster's copy, polled apart from the statistics feed, could trail it,
and at the trailing count the 2 s ceiling held a reading the seed allowed.
- A tick on which the settle rule deferred a node folded that node's previous
sample into its baselines a second time. Each sample is now folded once.

Tests pin these — the seed carried over a restart and not over a host
restart (also with a clock restored behind the save), an hour-old save or
the boot grace, any node's lower counter
dropping every carried seed (taken up or not, and after a live restart), a
carried seed kept through a save before its node samples, a reset, reload
or eviction forgetting it, the fold's yardstick for a band with a median and
for an empty one (a steady node, a washing-out seed, the seed reading
itself), the banner's set, standing, cleared and lapsed verdicts, one fold
per sample, and the recorded count — and 28 new mutants (eight existing ones
re-anchored) show each guard is load-bearing.

## 0.77.2

### Security — dependency updates

- `fastify` 5.12.5 → 5.12.7: a route's headers schema could be bypassed
through a case-sensitive `propertyNames` keyword.
- `fast-uri` 3.1.8 → 3.1.9 and 4.2.1 → 4.2.3, both reached through the HTTP
server's schema compilers: scheme spoofing through a percent-encoded scheme,
host confusion through unchecked WHATWG host canonicalisation, scheme
injection through an unescaped colon in a reference's first segment, and
path equivalence in relative-reference normalisation.

No route in the add-on declares a validation or response schema, so none of
these paths is reached. No code change. `npm audit` reports no
vulnerabilities in production dependencies.

## 0.77.1

`rtt-degraded` no longer fires on the round-trip average a Z-Wave JS restart
leaves behind.

### Fixed — `rtt-degraded` after a driver restart

- zwave-js keeps each node's round-trip time as a running average, in memory
only. A restart seeds it with one measurement from the restart's own burst,
and every later acknowledged transmission keeps 0.75 of it. On the reference
mesh most nodes' first reading after a restart was normal, but a few read up
to about 1.4 s against a 20–60 ms normal, and on quiet nodes that took
6–12 h to wash out. Every fresh statistics event from such a node re-tripped
`rtt-degraded`: nine 5–8 min symptoms in the 5 h after the 10-24 restart,
against 1–7 symptom onsets a day before.
- The detector now subtracts what the restart can still be adding before its
usual test: the smaller of a fixed ceiling,
`0.75^(commandsTX − 1) × (2 s − median)`, and the exact share of the first
fresh reading the add-on saw after the restart,
`0.75^(commandsTX − k0) × (a0 − median)`. A node whose first reading was
normal is back at full sensitivity within a few transmissions; a slowdown
measured after a large seed still fires, with a `restart allowance`
evidence row. A node with no transmission yet in the new lifetime gets no
allowance.
- The RTT baseline no longer learns a reading the restart can still move by
more than 8 ms, by the same bound. Until now those readings were kept out
only while they tripped `rtt-degraded`. DETAIL says when this pauses RTT
learning: *RTT learning is PAUSED — the driver restarted N tx ago*.

Tests pin these — the seed's exact weight, no allowance before the first
transmission, the first reading's bound and its cap, a seed-sized reading that
neither fires nor arms, a normal first reading that restores full sensitivity,
new excess under a large seed that still fires, the allowance subtracted to
the millisecond, the store keeping each lifetime's first fresh reading, and
the baseline holding out the RTT reading on a copy, against the band's own
median, and nothing else — and 33 new mutants (one existing mutant
re-anchored) show each guard is load-bearing.

Two older checks a mutant slipped past are tightened: the auto-ping wiring
check reads only auto-ping's own options (the refresh trial's copy has its
own check and mutant), and zero samples must show the fresh share as a bare
dash.

### Documented

- The README's verification figures are corrected: 1,632 tests, and 1,487
mutants in the harness, 13 of them labelled equivalent.

## 0.77.0

The LAN terminal is SSH: telnet is removed.
Expand Down
Loading