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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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,995 tests; a mutation-testing harness of 2,114 hand-written mutants (19 labelled equivalent), run in full on each release |
| Verification | 2,018 tests; a mutation-testing harness of 2,194 hand-written mutants (19 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
186 changes: 186 additions & 0 deletions docs/CHANGELOG-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,192 @@
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.79.7

A subscribe Home Assistant answers after the add-on's 10-second timeout is
released on its socket instead of staying live with no handle, an activity
feed the statistics rebuild could not make is subscribed again a minute on
instead of staying dark until the next rebuild, and a status event read
together with a roster poll's answer is no longer replaced by the poll's older
reading. Nothing stored on disk changes.

### Fixed — a subscribe Home Assistant answered after the client's timeout stayed live with no handle

- Home Assistant handles one connection's commands in order, with no cancel,
and registers a subscription while it handles the subscribe. A subscribe the
client gave up on at its 10 s reply timeout therefore still registered when
Home Assistant reached it, under an id the client no longer routed, for the
life of the socket: a node's statistics or status listener (in 0.79.6 beside
the one the 60 s retry then made), a second controller feed beside the next
rebuild's, a `state_changed` feed of the whole house, or a
`zwave_js_notification` feed. The client now sends `unsubscribe_events` for
it in the turn the timeout passes, on the same socket, where Home Assistant
reaches it after the subscribe (`not_found` when the subscribe failed);
events sent under the id before it lands reach no handler, and a socket that
has closed, or is closing, takes the subscription with it. Other commands
are unchanged: an action Home Assistant has not answered in time still reads
as an unknown outcome.

### Fixed — an activity feed a rebuild could not make stayed dark until the next rebuild (0.8.0)

- A rebuild of the statistics feeds whose `state_changed` subscribe failed (no
answer within the client's 10-second timeout, or a connection closed under
it) kept its controller and node feeds and logged the failure, and nothing
made the feed before a Home Assistant reconnect, the self-heal or a re-arm:
no value or notification rows on the Log screen, Detail's LIVE ENTITIES and
the device menu's `now:` from the 10-minute full state read, and the pause
toggle turned on in Home Assistant read only there. The
`zwave_js_notification` subscribe, in the same try, was not sent, and one
that failed on its own was dropped without a line while the log named it
subscribed. Each activity feed is now a try of its own, and one a rebuild
could not make is subscribed after the first roster poll that succeeds a
minute after the attempt (on the host's uptime): only the feeds not made,
one attempt at a time, and again a minute after each that fails; the attempt
that makes the state feed reads the states again. Each handle it makes is
kept with the feed set's as it is made, so a re-arm releases it, one begun
while its second subscribe is out included; one answered after another
rebuild began, or while a re-arm releases the feed set, is released and not
kept. It stands aside while a rebuild runs or the feed set is down, but not
for a re-arm an entry reload latched, which leaves the activity feeds as
they are. The Log screen reads `activity feed down — its state_changed
subscribe failed; retried after a minute` until it is made, and the add-on
log names each failed feed (`activity subscribe failed (state_changed): …`).
A failure on a connection that is down adds no row, and the feeds after it
are not tried: the reconnect's rebuild makes them and adds the row.
- A failed activity subscribe does not fail the rebuild: failed, the rebuild
would run again at every roster poll, making the controller's feed and every
node's two again each time.

### Fixed — a status event read together with a roster poll's answer was taken as older than the poll's reading (0.79.6)

- Over uncompressed frames the client can hand a status event Home Assistant
sent right after a `network_status` answer to its handler before the poll
that awaited the answer resumes, so the poll acted on its older reading
after the event. A revival read that way, after a poll that reads the node
Dead, re-subscribed its feeds for nothing; a death read with the first poll
since the node's status feed answered gave way to that poll's reading, which
left the death queued when the node revived before the next poll, or had
the next poll re-subscribe the node for nothing when it stayed dead. Each
alive, dead, sleep or wake up event now takes an order mark: a node whose
live status feed heard one after both the poll and the feed were sent is
neither judged by that poll nor given its reading as a baseline, and every
other poll's reading is the live feed's baseline (0.79.6: only the first
poll sent after the feed answered). With permessage-deflate, which the
client offers, Home Assistant's and the Supervisor's sockets compress every
frame (inferred from the aiohttp sources), and the poll acted first there.
- A status a node's old status feed hears while the node's own re-subscribe
releases it (the statistics feed goes first, unless the 60 s retry made it
after the status feed) is counted once and kept as the newer: through
0.79.6 a poll that read such a death before the new status feed answered
counted it again, and the new feed was seeded with the older reading, which
left the death queued when it heard the revival.
- A status a feed a re-arm is still releasing sets on a node whose rebuild
status subscribe fails no longer seeds the status feed the 60 s retry makes
once a roster poll has read the node since: in 0.79.6 the retry's feed kept
it, and a death it then heard first was not counted.

### Tests

- 1,951 tests, 57 new: 25 in `nodeFeeds.test.ts`, 10 of them pins that pass
on 0.79.6 too; 16 in `activityFeeds.test.ts`, a model of Home Assistant's
core event bus; 8 in `haWsClientLateSubscribe.test.ts`, a model of its
per-connection command order; 3 in `realClient.lateSubscribe.test.ts`, the
data layer over the real client and a mock Core with node objects
(`_realHa.ts`, `_realRun.ts`); 2 in `statusOrderRealClient.test.ts` and 2
in `statusReleaseRealClient.test.ts`, the real client with frames
uncompressed and compressed; and 1 in `activityFeedsLate.test.ts`. 2,061
mutation-harness entries (19 labelled equivalent): 56 new, 8 re-anchored,
and 3 removed with the code they pinned, one of them labelled equivalent.

## 0.79.6

A node replaced with `replace_failed_node`, or included on a freed id, has its
statistics and status feeds made again on its new node object in Home
Assistant, and the 60-second retry of a failed node subscribe now subscribes.
A driver server on another network leaves the driver link stopped, not
reading live, and a stick swap no longer stops the driver link for the rest of
the run as a driver server on another network. Nothing stored on disk changes.

### Fixed — a replaced node's feeds stayed on the failed node until the next rebuild

- Home Assistant binds each node's statistics and status feed to the node
object it resolves at subscribe time, and a node replaced (by the same
product or another) or included on a freed id is a new object there, which
no earlier feed hears. Through 0.79.5 the new device had no statistics feed
and its Dead/Alive crossings were counted by neither the feed nor the roster
fallback until a Home Assistant reconnect, the self-heal or a re-arm, while
Detail's EVIDENCE badges read its feeds live. A node's two feeds are now
released and made again on their own after the roster poll that reads it not
ready after it read ready, shows a status change its status feed did not
deliver (the replacement of a failed node that read not ready; a new status
feed's baseline is the first poll sent after it answered), shows its device
changed, or lists it again after a poll found it off the roster (an id back
with no device as last loaded asks for a registry load). A re-interview of
the same node is re-subscribed too, as Home Assistant's websocket does not
tell the two apart: one release and subscribe more.
- A node included after the feed set was built, or an evicted id back on the
roster, had no feeds until a rebuild either: it is subscribed after the poll
that lists it. An evicted node's feeds are released at the eviction, and
feeds a re-arm released are not released again.
- A driver restart costs no per-node re-subscribe: the nodes wait for the
re-arm its entry reload latches, and a status feed made since the previous
poll is not judged by a change it may have missed, so a replacement by the
same product of a failed node that read not ready, landing between the
node's two subscribes, leaves its statistics feed on the removed node until
a later interview start, absence or swap re-subscribes it, or the feed set
is rebuilt. A per-node subscribe that resolves after a re-arm began, or on
another connection, is released and not kept. Neither a node's own
re-subscribe nor the retry runs beside a reconnect's rebuild, and a rebuild
it superseded that fails on the new connection no longer lets a roster poll
start a second one beside it. Feeds a node's own re-subscribe or the retry
makes never stamp the fleet's liveness clock, so the dead-feed watchdog and
`binary_sensor.zwave_tui_degraded` still see the rest of the feed set, the
controller's included, fall silent.

### Fixed — a failed node subscribe was never retried (0.26.0)

- The 60 s retry passed no list for the handles, and the optional-chained push
skipped the subscribe with it: a node whose subscribe failed was marked
subscribed with no feed made, its EVIDENCE badges reading live. The retry
now subscribes, by the node's device as last loaded, keeps the handles where
a re-arm releases them, stands aside while a rebuild runs, the feed set is
down or a node's own re-subscribe is out, and drops from its queue a node
the roster has shown gone (it is subscribed once it is back) or one with no
device as last loaded, such as one queued by an old network's device the
boot load admitted (it is subscribed once a load gives it one).

### Fixed — a driver server on another network could leave the driver link reading live after it was stopped

- When the homeId cross-check proved a mismatch inside the driver's state
dump (Home Assistant's home id already known when the dump landed, as after
a home-id change), it stopped the driver client, and the rest of the dump
then declared the stopped client live: DRIVER LINK read `live` with no
connection under it, the S2 lane read `refused` (`s2_lane` too), and
nothing reconnected it until the next home-id change or restart. The
client now stays `stopped`, beside the homeId mismatch row, and a dump cut
short by a stop hands on no further node and is not logged as processed. A
stop from the handshake's home-id callback ends the handshake the same way;
nothing in the add-on stops the client there today.

### Fixed — a stick swap could stop the driver link for the rest of the run

- A home-id change cycles the driver client, and kept the previous server's
home id until the new handshake: a read of the cross-check in between (the
sleeper watch reads it on every call) compared it with the new id, purged
the driver telemetry and stopped the client for the rest of the run, though
the driver server had moved to the new network too. The cycle forgets it now.
A driver link back on the new network before Home Assistant reports the new
home id still reads as one on another network, telemetry purged and client
stopped, until the roster poll that reads the new id runs the cycle.

### Tests

- 1,894 tests, 41 new: 34 in `nodeFeeds.test.ts`, a model of Home
Assistant's node feeds bound to zwave-js-server-python node objects, 4 in
`driverWsClient.test.ts`, 2 in `zwaveDataChurn.test.ts` and 1 in
`deviceSwapSim.test.ts`; 2,008 mutation-harness entries (20 labelled
equivalent, 2 of them new): 66 new, 2 re-anchored.

## 0.79.5

A forward clock step no longer makes a real outage a 90-minute start death, a
Expand Down
4 changes: 2 additions & 2 deletions docs/screenshots/detail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading