Skip to content

v0.8.0 — silent devices, and restarts no longer inflate the counts

Choose a tag to compare

@petergCA petergCA released this 11 Oct 03:48
· 7 commits to main since this release

Two changes since v0.7.10. The new check is opt-in and off by default, so upgrading changes nothing until you turn it on.

New: silent devices

Sentinel only noticed entities that went unavailable or unknown. A battery device that dies never gets there. Z-Wave JS marks a node dead only after a failed send, and it never sends to a sleeping node. So the node stays "asleep" forever, and its contact keeps reading "closed" at 100% battery. One real door sensor went 11 months like this without being flagged.

With Flag devices not heard from in (hours) set, any Z-Wave JS or Zigbee2MQTT device whose last_seen sensor is older than that becomes a single incident:

  • It's named after the device and shows its last reported battery.
  • Its duration counts from when the device went quiet.
  • It clears the moment the device is heard from again.
  • It appears with a silent badge in the card, and in a separate Silent section of notifications.

48 hours suits most battery sensors. Exempt devices that are normally quiet, such as button remotes, with Devices exempt from the silent check.

Details:

  • Events: entity_down and entity_recovered now carry a reason field (state or silent), plus device_id. Silent incidents also carry last_seen and silent_for_hours. Existing automations keep working unchanged.
  • Exclusions: entity, glob, integration and snooze exclusions apply. Domain exclusions don't, because they describe which states are normal for buttons and events, not whether a device is alive.
  • No double reporting: a device that already has an unavailable entity is reported by that incident alone.
  • Auto-recovery never acts on a silent device.
  • Performance: the check runs in the existing 5-minute housekeeping tick, with no new listeners.
  • Requirement: the device's Last seen sensor must be enabled. It's disabled by default on some Z-Wave JS installs. For Zigbee2MQTT, turn on its last_seen option.

Fix: restarts no longer inflate the counts (was v0.7.11, unreleased)

The startup warmup only delayed the initial scan. The state listener was already live, so during boot any entity that stayed unavailable longer than the grace period was counted as down, then as recovered a few seconds later. On a busy system, every restart added hundreds of MQTT and Sonos entities to recovered_today. Sentinel now ignores state changes until the warmup ends, then records whatever is still bad, exactly as before.

Tests

24 tests, 10 of them new. Each new safeguard was mutation-checked: removing it makes a test fail.