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
21 changes: 21 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ docstring gives: it is a record, not a claim about now.

## 2026-11-24

- **The wall page changes after the operator's card-by-card review**
([ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md),
`stacks/sensitive/README.md`, *The wall page*). Not yet deployed or seen
on the television when this was written.
- **Tiles:** ten, five to a row. `gandalf` joins by CPU, as it has been
always on since ADR-0125 and already reports to Prometheus, and the eero
mesh is one tile, how many access points answer their ping. The lab's
guests report to `alexander`'s Prometheus and stay off.
- **Internet:** the big figures were the WAN port's traffic at that
moment, which read like a speed test and was not one. They are now
speedtest-tracker's last result and its age; the traffic is the line and
sparkline beneath. The connect time to 1.1.1.1 and `/api/q/rtt` are gone,
as the test's ping replaces them.
- **Dogs:** the card is gone, and `wall_dogs.yaml` with it, its two
buttons and two intervals included. It was not as useful as hoped.
- **Home row:** the office lights and `binary_sensor.wall_office_lights`
are gone. "House empty" shows while presence has marked it so, the
thermostat shows what it is set to, and the Litter-Robot shows always.
- **Status bar:** it names only a source that has fallen behind, and
otherwise reads "all sources live".

- **`heimdall` runs the new §2 steps, and its bootloader is staged on the
card, not written by `flashrom`.** This corrects the entry "A re-check of
`heimdall` found its bootloader never updates, and nothing watching it",
Expand Down
18 changes: 9 additions & 9 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -1143,36 +1143,36 @@ 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 ten fixed questions**
- **The wall page answers twelve 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 ten answers: the
firing alerts, per-host CPU, SNMP reachability, WAN traffic and latency,
the UPS, `heimdall`'s temperature, when each backup, restore test and
anything that reaches `trinity:443` can read those twelve answers: the
firing alerts, per-host CPU, SNMP reachability, which eero units answer
their ping, WAN traffic, the last speed test and when it ran, 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 twenty Home Assistant entities the same way.**
**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
contacts, two window contacts, whether the house is empty, 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,
what the labelled players are playing (title, artist and app, never the
player's name or room), when the dogs were last walked and fed, and
`sensor.wall_today`,
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
Caddy's environment alone and Caddy forwards nothing but those GETs. The
residual is that whoever can read that container's environment holds a
token that can operate the house. They would already be root on the host
that runs Home Assistant. Anything that reaches `trinity:443` can read
whether the doors are open, whether the alarm is set, the family's
whether the doors are open, whether the alarm is set, whether anyone's
phone is home (one boolean, never whose), the family's
schedule for the coming week (each event's title, time and location), the
open to-do items, and the labels of packages waiting to be collected. That
is the same as the Home Assistant app shows to the household, without its
Expand Down
51 changes: 36 additions & 15 deletions stacks/sensitive/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ start.matrix.elysium {
# rewrite, so /api/q/cpu?query=anything still asks the CPU
# question. Nothing else under /api/ answers. The reader token
# can query and nothing more (ADR-0067); this narrows it again,
# to eight answers. The page holds no credential, and neither
# to twelve answers. The page holds no credential, and neither
# does the Pi.
# /api/ha/NAME one Home Assistant entity's state, the same way: each handle
# rewrites to /api/states/<one entity> and ends in `?`, which
Expand Down Expand Up @@ -369,10 +369,36 @@ wall.matrix.elysium {
import wall_prometheus
}

# TCP connect time to 1.1.1.1:443, the internet anchor.
# probe_duration_seconds{job="blackbox-latency",name="cloudflare"}
handle /api/q/rtt {
rewrite * /api/v1/query?query=probe_duration_seconds%7Bjob%3D%22blackbox-latency%22%2Cname%3D%22cloudflare%22%7D
# speedtest-tracker's last result, scraped from its container on
# `prometheus` every 30 minutes: download and upload in bits per
# second, ping, and the result id. A failed test exports only the id,
# with status="failed" (rules/internet.rules.yaml, SpeedtestStale), so
# the id is asked too: without it a failure reads as no answer.
# {__name__=~"speedtest_tracker_result_id|speedtest_tracker_download_bits|speedtest_tracker_upload_bits|speedtest_tracker_ping_ms",job="speedtest-tracker"}
handle /api/q/speedtest {
rewrite * /api/v1/query?query=%7B__name__%3D~%22speedtest_tracker_result_id%7Cspeedtest_tracker_download_bits%7Cspeedtest_tracker_upload_bits%7Cspeedtest_tracker_ping_ms%22%2Cjob%3D%22speedtest-tracker%22%7D
import wall_prometheus
}

# When that result landed, to within a few minutes: the last minute in
# three hours at which the result id changed. A first result has no
# change to find, so failing that, the minute the id first appeared,
# provided that was inside the window (more than five minutes after its
# start) rather than at its edge. Empty when neither holds, which means
# no new result in three hours, and the page shows it as stale.
# max_over_time((timestamp(changes(max(speedtest_tracker_result_id{job="speedtest-tracker"})[3m:1m]) > 0))[3h:1m])
# or (min_over_time(timestamp(max(speedtest_tracker_result_id{job="speedtest-tracker"}))[3h:1m]) > time() - 10500)
handle /api/q/speedtest_at {
rewrite * /api/v1/query?query=max_over_time%28%28timestamp%28changes%28max%28speedtest_tracker_result_id%7Bjob%3D%22speedtest-tracker%22%7D%29%5B3m%3A1m%5D%29%20%3E%200%29%29%5B3h%3A1m%5D%29%20or%20%28min_over_time%28timestamp%28max%28speedtest_tracker_result_id%7Bjob%3D%22speedtest-tracker%22%7D%29%29%5B3h%3A1m%5D%29%20%3E%20time%28%29%20-%2010500%29
import wall_prometheus
}

# The eero mesh's tile: each access point's probe, and `up` for every
# configured target, so a probe whose scrape failed (no probe_success
# at all) still counts against the mesh instead of leaving the total.
# {__name__=~"up|probe_success",job="blackbox-eero"}
handle /api/q/eero {
rewrite * /api/v1/query?query=%7B__name__%3D~%22up%7Cprobe_success%22%2Cjob%3D%22blackbox-eero%22%7D
import wall_prometheus
}

Expand Down Expand Up @@ -450,10 +476,11 @@ wall.matrix.elysium {
import wall_ha
}

# The office lights, on when any is on, through a template entity in
# home-assistant/packages/wall_house.yaml: their own ids name a person.
handle /api/ha/office_light {
rewrite * /api/states/binary_sensor.wall_office_lights?
# On once every tracked phone has left the house
# (home-assistant/packages/presence.yaml). One boolean: no person's
# name or location.
handle /api/ha/house_empty {
rewrite * /api/states/input_boolean.house_empty?
import wall_ha
}

Expand Down Expand Up @@ -481,7 +508,6 @@ wall.matrix.elysium {
# trash the next pickup, from three helpers
# deliveries packages to go and get (17TRACK)
# media what the players labelled wall_media are playing
# dogs when the dogs were last walked and fed
handle /api/ha/commute {
rewrite * /api/states/sensor.wall_commute?
import wall_ha
Expand Down Expand Up @@ -512,11 +538,6 @@ wall.matrix.elysium {
import wall_ha
}

handle /api/ha/dogs {
rewrite * /api/states/sensor.wall_dogs?
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
72 changes: 47 additions & 25 deletions stacks/sensitive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,9 @@ by `heimdall`'s kiosk
([ADR-0119](../../docs/adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md),
[`build-heimdall.md`](../../docs/runbooks/build-heimdall.md)). It shows about
eight things at a size read from across the room: the time, the firing
alerts, eight hosts, the internet, the UPS, and how old each answer is. No
container of its own: Caddy serves `wall/` as static files.
alerts, ten tiles of hosts and devices, the internet, the UPS, and any source
whose answer is late. No container of its own: Caddy serves `wall/` as
static files.

- **The page chooses the question, never the query.** Each `/api/q/NAME` is a
`handle` in the Caddyfile that rewrites to one PromQL query written there,
Expand Down Expand Up @@ -793,26 +794,50 @@ container of its own: Caddy serves `wall/` as static files.
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
("Nothing that notifies is firing." while an info alert is). 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.
names only a source that has fallen behind, with its age, amber from two
and a half minutes and red from seven and a half or when it has never
answered; with none behind it reads "all sources live". `heimdall`'s own
temperature sits at its right end.
- **The tiles.** Ten, five to a row: `morpheus`, `neo` and `mjolnir` by
whether they answer SNMP (`/api/q/snmp`); `Saruman`, `gandalf`,
`trinity`, `prometheus`, `oracle` and `smaug` by CPU (`/api/q/cpu`);
and the eero mesh as one tile, how many of its access points answer their
ping out of every configured target (`/api/q/eero` reads `up` as well as
`probe_success`, so a probe whose scrape failed still counts;
`targets/blackbox-eero.yaml`), amber when one is silent and red when all
are. The lab's guests report to `alexander`'s
Prometheus, not this one, so they have no tile.
- **The Internet card is the last speed test.** Download, upload and ping
from speedtest-tracker, which runs every 30 minutes (`/api/q/speedtest`),
and how long ago it landed (`/api/q/speedtest_at`: the last minute in
three hours at which its result id changed, or for a first result the
minute its id appeared). A failed test exports only its result id, which
the page reads to say "last test failed". A figure is amber under the
bars `internet.rules.yaml` alerts on, 400 Mbit/s down and 100 up, and all
of them are when the test is over 90 minutes old. Under them, the WAN
port's traffic now (`/api/q/wan`), and the sparkline is its last hour of
download (`/api/q/wan_hour`).
- **The household half comes from Home Assistant, the same way.** Each
`/api/ha/NAME` rewrites to `GET /api/states/<one entity>`. The rewrite ends
in `?`, so the client's query string is dropped. Caddy adds
`WALL_HA_TOKEN`, the token of HA's non-admin `wall` user. The entities are
`weather.forecast_home`, the front, garage, garden and patio door contacts,
the two window contacts, and two template entities from
`home-assistant/packages/wall_house.yaml`: `sensor.wall_alarm` (the
house's one alarm panel) and `binary_sensor.wall_office_lights` (on when
any light whose id contains `office` is on).
the two window contacts, `input_boolean.house_empty` from
`home-assistant/packages/presence.yaml` at `/api/ha/house_empty`, and
`sensor.wall_alarm` from `home-assistant/packages/wall_house.yaml`, the
house's one alarm panel.
The page shows them as the header's weather and a one-line Home row: the
alarm's mode, any open door or window in amber, the hallway thermostat's
temperature, humidity and whether it is heating or cooling (read from
`climate.thermostat` at `/api/ha/thermostat`), the office lights, and the
Litter-Robot in amber only when it wants something (`sensor.wall_litter`
at `/api/ha/litter`, from `wall_house.yaml`), and as `—` when it cannot be
read. A row too long for the screen drops the office lights first, then
the thermostat, then an unreadable Litter-Robot's `—`, never an amber
item; if the warnings alone are still too wide, each says how many
instead of which ("6 doors & windows").
alarm's mode; "House empty" while presence has marked it so, and nothing
otherwise; any open door or window in amber; the hallway thermostat's
temperature and humidity, then what it is set to and whether it is
heating or cooling ("68° · 45% · heating to 70", a range in heat_cool,
"away" while presence holds it there; read from `climate.thermostat` at
`/api/ha/thermostat`); and the Litter-Robot, always: `ok`, what it wants in
amber, or `—` when it cannot be read (`sensor.wall_litter` at
`/api/ha/litter`, from `wall_house.yaml`). A row too long for the screen
shortens the thermostat to its reading and target ("68° → 70"); if the
warnings are still too wide, each says how many instead of which
("6 doors & windows").
The header's high and low, the next rain and the next sunrise or sunset
are `sensor.wall_weather` at `/api/ha/forecast`, from
`home-assistant/packages/wall_weather.yaml`, which asks
Expand All @@ -831,8 +856,7 @@ 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 dogs, while a walk or a feeding is overdue
(`/api/ha/dogs`); the open to-do items (`/api/ha/todo`); what is
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
Expand All @@ -841,18 +865,16 @@ container of its own: Caddy serves `wall/` as static files.
`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, the 17TRACK integration with the household's account, a
walking or feeding interval above 0 for the dogs, and the label
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
sensor held both events, and with no calendar it read unavailable, which
the page shows as `calendar · unavailable`. The real ids of the alarm and the
office lights name the city and a person, so the package finds them and
only its own ids are written here. Booted on Home Assistant 2026.11.1 with
a stand-in alarm and office light, both followed the real ones from
disarmed and off to armed and on. HA has no read-only role, so the narrowing in
the page shows as `calendar · unavailable`. The alarm's real id names the city,
so the package finds it and only its own id is written here. Booted on
Home Assistant 2026.11.1 with a stand-in alarm, it followed the real one
from disarmed to armed. HA has no read-only role, so the narrowing in
Caddy is the read-only part (`docs/security.md`). Measured against the
pinned Caddy with a stand-in HA on 2026-11-18: each handle reached only
its entity with the token, `?x=1` was dropped, POST was refused with 405,
Expand Down
Loading