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 docs/architecture.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ roadmap as it read that day, and the *Done* entries keep the shape they had
there. `check_docs.py` does not check this file, for the reason its module
docstring gives: it is a record, not a claim about now.

## 2026-11-19

- **The wall shows what is playing, and how the backups stand.** The fourth
of the wall's five steps.
- `wall_media.yaml` makes `sensor.wall_media`: the title, artist and app of
the first playing media player labelled `wall_media`. It is a context
card, *Now playing*, after the to-do list and before the Hebrew word. No
player is labelled yet, so it stays hidden.
- Under "All quiet", the Alerts card now gives two lines from Prometheus
in place of "Nothing is firing.". The first is the backups, the restore
test and the off-site copy, each by its most overdue job against the
allowance `install-timers.sh` gives it (`/api/q/backups`). The second
is the security updates and reboots waiting (`/api/q/patches`). Both
read series that already exist.
- SSH failures and the IDS's findings are left out. They are Loki rules
whose alerts go to Alertmanager, not to Prometheus's `ALERTS`, so the
wall has no query that can read them. The same is true of every Loki
alert: the wall's Alerts card shows Prometheus's alerts only.

I previewed both at 1920x1080 against stubbed answers; neither has run
against the real Prometheus or Home Assistant.

## 2026-11-18

- **The wall's context card gets its sources.** The third of the wall's
Expand Down
15 changes: 9 additions & 6 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -1134,24 +1134,27 @@ from Home Assistant with *not enough permissions*.
that difference is accepted. It holds two credentials: the reader token,
which can only query, and a Fever key that can only mark items read for a
Miniflux user that follows public feeds.
- **The wall page answers eight fixed questions**
- **The wall page answers ten fixed questions**
([ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md)):
`wall.matrix.elysium` on `trinity`'s Caddy. Each `/api/q/NAME` is one PromQL
query written in the Caddyfile, sent with the reader token, which Caddy
adds. The caller picks a name, never a query, and its own query string is
discarded. Only GET and HEAD are served, because Prometheus would take a
POST body's `query=` over the URL's. Like Glance it has no login, so
anything that reaches `trinity:443` can read those eight answers: the
anything that reaches `trinity:443` can read those ten answers: the
firing alerts, per-host CPU, SNMP reachability, WAN traffic and latency,
the UPS and `heimdall`'s temperature. That is less than the Homelab page
already shows, and the page and the Pi hold no credential.
**Its household half reads eighteen Home Assistant entities the same way.**
the UPS, `heimdall`'s temperature, when each backup, restore test and
off-site copy last succeeded, and how many security updates and reboots
each host is waiting for. That is less than Glance's Homelab and
Maintenance pages already show, and the page and the Pi hold no credential.
**Its household half reads nineteen Home Assistant entities the same way.**
Each `/api/ha/NAME` is one `GET /api/states/<entity>` written in the
Caddyfile: the weather, today's forecast, the alarm's mode, four door
contacts, two window contacts, the office lights, the thermostat, the
Litter-Robot's summary, the next drive, the Shabbat times, the open to-do
items, the next trash pickup, the packages to collect by their own labels,
and `sensor.wall_today`,
what the labelled players are playing (title, artist and app, never the
player's name or room), and `sensor.wall_today`,
which holds the next seven days' calendar events. Caddy adds the token of HA's non-admin
`wall` user. Home Assistant has no read-only role, so that token could call
services, the alarm's included. It is read-only only because it lives in
Expand Down
22 changes: 22 additions & 0 deletions stacks/sensitive/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,22 @@ wall.matrix.elysium {
import wall_prometheus
}

# The backups' proofs for the quiet Alerts card: when each backup, restore
# test and off-site copy last succeeded, its allowance and its last exit
# (scripts/run-scheduled.sh, scripts/install-timers.sh).
# {__name__=~"homelab_job_last_success_timestamp_seconds|homelab_job_max_age_seconds|homelab_job_last_exit_code",homelab_job=~"backup-.*|verify-backups.*|offsite-copy"}
handle /api/q/backups {
rewrite * /api/v1/query?query=%7B__name__%3D~%22homelab_job_last_success_timestamp_seconds%7Chomelab_job_max_age_seconds%7Chomelab_job_last_exit_code%22%2Chomelab_job%3D~%22backup-.%2A%7Cverify-backups.%2A%7Coffsite-copy%22%7D
import wall_prometheus
}

# Security updates waiting and reboots needed, per host (rules/host.rules.yaml).
# {__name__=~"homelab_apt_security_upgrades_pending|homelab_reboot_required"}
handle /api/q/patches {
rewrite * /api/v1/query?query=%7B__name__%3D~%22homelab_apt_security_upgrades_pending%7Chomelab_reboot_required%22%7D
import wall_prometheus
}

# The header's weather: condition, temperature, humidity, wind.
handle /api/ha/weather {
rewrite * /api/states/weather.forecast_home?
Expand Down Expand Up @@ -464,6 +480,7 @@ wall.matrix.elysium {
# todo the open items of the lists labelled wall_todo
# trash the next pickup, from three helpers
# deliveries packages to go and get (17TRACK)
# media what the players labelled wall_media are playing
handle /api/ha/commute {
rewrite * /api/states/sensor.wall_commute?
import wall_ha
Expand All @@ -489,6 +506,11 @@ wall.matrix.elysium {
import wall_ha
}

handle /api/ha/media {
rewrite * /api/states/sensor.wall_media?
import wall_ha
}

# Today's high and low, the next rain and the next sunrise or sunset,
# asked of weather.get_forecasts by
# home-assistant/packages/wall_weather.yaml: since HA 2024.4 a forecast
Expand Down
13 changes: 10 additions & 3 deletions stacks/sensitive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,12 @@ container of its own: Caddy serves `wall/` as static files.
Pi's DejaVu.
- **It says when it does not know.** No answer from Prometheus, or a
Watchdog that is not firing, is shown in red as exactly that, never as
"All quiet". A host that stops reporting reads *no data*. The status bar
"All quiet". Under a real "All quiet", two lines say how the lab stands:
the backups, the restore test and the off-site copy, each by its most
overdue job against its own allowance (`/api/q/backups`), and the security
updates and reboots waiting (`/api/q/patches`). Overdue, failed, never
succeeded or waiting is amber. What no host reports is left out rather
than shown as none, and with neither line, "Nothing is firing." stays. A host that stops reporting reads *no data*. The status bar
gives each source's age and turns amber at two and a half minutes.
- **The household half comes from Home Assistant, the same way.** Each
`/api/ha/NAME` rewrites to `GET /api/states/<one entity>`. The rewrite ends
Expand Down Expand Up @@ -810,15 +815,17 @@ container of its own: Caddy serves `wall/` as static files.
(`/api/ha/commute`); Shabbat or Yom Tov, from six hours before candle
lighting to havdalah (`/api/ha/shabbat`); the bins, from 16:00 the evening
before pickup to noon on the day (`/api/ha/trash`); packages to go and
get (`/api/ha/deliveries`); the open to-do items (`/api/ha/todo`); and
get (`/api/ha/deliveries`); the open to-do items (`/api/ha/todo`); what is
playing on the players labelled `wall_media` (`/api/ha/media`); and
otherwise a Hebrew word of the day from a static list in the page. The
others that also apply are named on the card's last line. Each source is a
`wall_*.yaml` package and stays unavailable, its card hidden, until what
it reads is set up in HA's UI: the Waze Travel Time integration (origin
`Home`, region US, any destination, its polling off) and the label
`wall_commute` on each calendar to route from, the Jewish Calendar
integration, a to-do list labelled `wall_todo`, the trash helpers'
pickup day, and the 17TRACK integration with the household's account. The
pickup day, the 17TRACK integration with the household's account, and the
label `wall_media` on each player to show. The
commute card sends the next labelled event's location to Waze. The UPS's mains or battery,
charge and runtime are in its node tile, `mjolnir`. Booted on
Home Assistant 2026.11.1 against its demo calendars on 2026-11-18: the
Expand Down
1 change: 1 addition & 0 deletions stacks/sensitive/home-assistant/packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and nothing else. This README is not YAML and Home Assistant ignores it.
| `wall_house.yaml` | `sensor.wall_alarm`, `binary_sensor.wall_office_lights` and `sensor.wall_litter` for the office wall (ADR-0119): the house's one alarm panel's mode, and whether any light whose id contains `office` is on. Their own ids name the city and a person, so the wall reads these instead. Unavailable when nothing matches. `sensor.wall_litter` is `ok` or `attention`, with what in `needs`: the drawer at 90%, the litter under 30% or a cat's weight dropping, `litter_robot.yaml`'s thresholds |
| `wall_commute.yaml` | `sensor.wall_commute` for the office wall's context card (ADR-0119): the minutes of the quickest live-traffic route from the home zone to the next timed event within three hours, on a calendar labelled `wall_commute` in the UI, whose location looks like a place (a digit or a comma, and not Teams, Zoom, Meet, Webex or a link), and when to leave, five minutes ahead. Asked of `waze_travel_time.get_travel_times` every five minutes, only while there is such an event; the Waze Travel Time integration has to be added once in the UI for the action to exist. Sends that location to Waze. `none` when there is nothing to drive to |
| `wall_deliveries.yaml` | `sensor.wall_deliveries` for the office wall's context card (ADR-0119): the 17TRACK packages delivered today, ready to be picked up or undelivered, by their own labels, and how many are in transit. Asked of `seventeentrack.get_packages` every fifteen minutes. Never the tracking numbers. Unavailable until the 17TRACK integration is added |
| `wall_media.yaml` | `sensor.wall_media` for the office wall's context card (ADR-0119): `playing` or `idle`, with the title, artist or series and app of the first playing media player labelled `wall_media` in the UI. Never the player's name or room, and no album art. Unavailable while no player carries the label |
| `wall_shabbat.yaml` | `sensor.wall_shabbat` for the office wall's context card (ADR-0119): the upcoming candle lighting as its state, with havdalah, the parsha, the Hebrew date and any Yom Tov's name, from the Jewish Calendar integration's entities, found by what their ids end with. Unavailable until that integration is added |
| `wall_todo.yaml` | `sensor.wall_todo` for the office wall's context card (ADR-0119): the open items, title and due date, of the to-do lists labelled `wall_todo` in the UI, asked of `todo.get_items` every minute. Unavailable while no list carries the label |
| `wall_trash.yaml` | `sensor.wall_trash` for the office wall's context card (ADR-0119): the next pickup date and whether recycling goes with it, from three helpers set in the UI (`input_select.trash_pickup_day`, `input_select.recycling_schedule`, `input_datetime.recycling_reference_date`). No integration; a holiday that moves a pickup is not known. Unavailable until the pickup day is set |
Expand Down
36 changes: 36 additions & 0 deletions stacks/sensitive/home-assistant/packages/wall_media.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# What is playing in the house, for the office wall's context card (ADR-0119):
# the first media player labelled `wall_media` in the UI that is playing, its
# title, its artist or show, and the app. The label picks the players, a
# HomePod, the Apple TV or Spotify alike, so none is named here.
#
# What reaches the wall: the title, the artist or series and the app. Not the
# player's name or room, which can name a person, and no album art, which
# would be a fetch from outside the page. Unavailable while no player carries
# the label, which hides the card; `idle` while none of them is playing.

template:
- sensor:
- name: Wall media
unique_id: wall_media
default_entity_id: sensor.wall_media
icon: mdi:music
availability: >-
{{ label_entities('wall_media') | select('match', 'media_player\.') | list | count > 0 }}
state: >-
{% set p = label_entities('wall_media') | select('match', 'media_player\.')
| sort | select('is_state', 'playing') | first | default('') %}
{{ 'playing' if p else 'idle' }}
attributes:
title: >-
{% set p = label_entities('wall_media') | select('match', 'media_player\.')
| sort | select('is_state', 'playing') | first | default('') %}
{{ ((state_attr(p, 'media_title') or '') if p else '')[:80] }}
artist: >-
{% set p = label_entities('wall_media') | select('match', 'media_player\.')
| sort | select('is_state', 'playing') | first | default('') %}
{{ ((state_attr(p, 'media_artist') or state_attr(p, 'media_series_title') or '') if p else '')[:60] }}
app: >-
{% set p = label_entities('wall_media') | select('match', 'media_player\.')
| sort | select('is_state', 'playing') | first | default('') %}
{{ ((state_attr(p, 'app_name') or '') if p else '')[:30] }}
4 changes: 4 additions & 0 deletions stacks/sensitive/wall/wall.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ html, body {
.alerts-body { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; }
.quiet { font: 600 56px/1.15 var(--sans); color: var(--fg-dim); margin-top: 20px; }
.quiet small { display: block; font: 400 28px/1.4 var(--sans); color: var(--mute); margin-top: 12px; }
.quiet small.lab { font-size: 24px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiet small.lab:first-of-type { margin-top: 14px; }
.quiet .lab .warn { color: var(--yellow); }
.al { display: flex; gap: 16px; align-items: stretch; }
.al .sev { width: 8px; border-radius: 4px; flex: none; background: var(--blue); }
.al.warning .sev { background: var(--yellow); }
Expand Down Expand Up @@ -245,6 +248,7 @@ html, body {
.word-sub { font: 400 28px/1.4 var(--sans); color: var(--fg-dim); margin-top: 10px; }
.word-sub b { font-weight: 600; color: var(--fg); }
.ctx-hero { font: 600 56px/1.15 var(--sans); color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-hero.media { font-size: 44px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ctx-hero.warn { color: var(--yellow); }
.ctx-hero.alert { color: var(--red); }
.ctx-sub { font: 400 28px/1.35 var(--sans); color: var(--fg-dim); margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
Expand Down
Loading