diff --git a/docs/architecture.md b/docs/architecture.md index 0ad6cc0c..8217c973 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -207,7 +207,7 @@ hole from the monitoring VLAN into the monitored one. | `phoenix` (10.0.30.70) | ๐ŸŸข 30 | *(none โ€” a toolchain host, no Docker)* | The deployment host, built 2026-09-20: a Proxmox API token, an SSH key and a checkout, so that the Packer, OpenTofu and Ansible work after [#436](https://github.com/Gerrrt/HomeLab/issues/436) has somewhere to run from. A guest on `Saruman`, placed by [ADR-0043](adr/0043-keep-the-ca-on-prometheus-and-build-phoenix-as-the-deployment-host.md), which also decides that the estate's CA key stays on `prometheus` and does not follow the toolchain here. It holds no age key and runs no continuous convergence (what it configures, it configures on demand, below); it is the WireGuard endpoint of [ADR-0042](adr/0042-terminate-the-remote-path-on-the-lab-and-route-it.md), built 2026-09-22 ([#442](https://github.com/Gerrrt/HomeLab/issues/442)); the one thing it is meant to reach that no other guest does is `8006` on `Saruman`, by a single host-firewall rule โ€” written 2026-09-20, when [#566](https://github.com/Gerrrt/HomeLab/issues/566) enabled the firewall the build had found disabled and narrowed the `local_network` alias that was admitting the whole segment underneath it. Its Alloy pushes to `alexander`, never to VLAN 99; the build is [`build-the-jumpbox.md`](runbooks/build-the-jumpbox.md). The first toolchain on it is [`packer/`](../packer/README.md), the lab's VM templates at VMIDs 901โ€“912, with 903โ€“909 for the dotfiles OS layers ([ADR-0090](adr/0090-test-the-dotfiles-os-layers-on-on-demand-saruman-guests.md)) ([ADR-0074](adr/0074-build-the-lab-templates-with-packer-from-phoenix.md), [`build-the-lab-templates.md`](runbooks/build-the-lab-templates.md)). The second is [`ansible/`](../ansible/README.md), which configures ADR-0029's six over SSH and touches nothing else ([ADR-0077](adr/0077-configure-the-lab-domain-with-ansible-from-phoenix.md), [#448](https://github.com/Gerrrt/HomeLab/issues/448)). Its own way in is decided by [ADR-0117](adr/0117-give-phoenix-a-key-only-sshd-and-a-default-deny-inbound-policy.md): `sshd` takes keys only, and `ufw` admits `22` from Hicks and the tunnel's peers, the tunnel's port, and `8800` from VLAN 30 for the length of a Debian or Kali template build. Applying it on the host is [#1496](https://github.com/Gerrrt/HomeLab/issues/1496). Alloy agent (native package, `scripts/deploy-agent.sh`) | | `golem` (10.0.30.80) | ๐ŸŸข 30 | *(none โ€” an appliance, no Docker)* | Proxmox Backup Server 4.2, built 2026-10-03 by [`build-the-backup-guest.md`](runbooks/build-the-backup-guest.md) ([#485](https://github.com/Gerrrt/HomeLab/issues/485)): the lab's backups, placed by [ADR-0053](adr/0053-run-pbs-on-saruman-with-its-datastore-on-smaug-over-nfs.md). A guest on `Saruman`, VMID 180, whose only datastore, `erebor`, is `smaug`'s `erebor/pbs` over NFSv4 through one `2049` pass, with `atime` on because garbage collection depends on it, and the mountpoint made immutable so an unmounted share cannot fill the OS disk. Every backup is encrypted on `Saruman` before it leaves, with a key made on `Saruman` and copied, on 2026-10-03, into `secrets/lab.sops.yaml` and onto paper (the runbook's ยง7), so a lost `Saruman` does not take the backups' readability with it; `Saruman` writes through a token that can back up and cannot prune. PBS prunes (7 daily, 4 weekly, 3 monthly), collects garbage on Saturdays and verifies on Sundays; TrueNAS keeps fourteen daily snapshots of the dataset as the copy PBS cannot prune. The nightly job takes `odin`, `garuda` and the domain's six, the guests tagged `backup`; `alexander`, `phoenix`, `fenrir` and `golem` itself are rebuilt from this repository and stay out, and so does `eden`, whose graph is one collection run from rebuilt (the runbook's ยง8). `scripts/collect-pbs-task-state.py` publishes every job's last outcome and the snapshots' verify state hourly, and seven rules in `stacks/lab` read them; the first nightly run, 2026-10-03, was verified the next morning. Its Alloy pushes to `alexander`, never to VLAN 99, since 2026-10-03. Alloy agent (native package, `scripts/deploy-agent.sh`) | | `oracle` (10.0.99.30) | ๐Ÿ”ด 99 | [`stacks/wiki`](../stacks/wiki) | The Lemmiwinks wiki and its Postgres, since 2025-11-12 ([ADR-0011](adr/0011-keep-the-wiki-internal.md)), hand-run containers until [#251](https://github.com/Gerrrt/HomeLab/issues/251) wrote them down as a stack deployed by hand from `main`, like `smaug`'s. **Cut over 2026-10-07** ([#847](https://github.com/Gerrrt/HomeLab/issues/847), [ADR-0082](adr/0082-serve-the-wiki-over-tls-and-deploy-it-from-a-verified-checkout.md)): deployed by hand from a checkout whose signature is verified first, and served over https from a Caddy on a leaf from the estate's CA, with port 80 only redirecting ([`stacks/wiki/README.md`](../stacks/wiki/README.md#tls)); its database is pulled to `prometheus` nightly as a `pg_dump` (`make backup-wiki`, [ADR-0065](adr/0065-pull-the-wikis-database-to-prometheus-as-a-dump.md)); Alloy agent (Docker, `scripts/deploy-agent.sh`); the off-host copies of the firewall export (`make backup-firewall`), of the weekly volume sets (`make backup`, [#535](https://github.com/Gerrrt/HomeLab/issues/535)) of the media tier's state pulled off `smaug` (`make backup-nas`, [ADR-0045](adr/0045-pull-jellyfins-state-from-a-snapshot-over-ssh.md)), and of `trinity`'s nightly sensitive-tier volume sets and Immich's library ([ADR-0064](adr/0064-copy-immichs-library-to-oracle-until-the-off-estate-copy-exists.md)). The estate's host for small off-host jobs โ€” [ADR-0015](adr/0015-give-oracle-the-off-host-jobs.md) | -| `trinity` (10.0.99.40) | ๐Ÿ”ด 99 | [`stacks/sensitive`](../stacks/sensitive) | ADR-0008's sensitive tier on the ProDesk 600 G4 of [ADR-0034](adr/0034-run-the-sensitive-tier-on-the-prodesk-and-make-it-the-spare-hardware.md). **Built and deployed 2026-09-28** ([#404](https://github.com/Gerrrt/HomeLab/issues/404), [`build-the-sensitive-tier-host.md`](runbooks/build-the-sensitive-tier-host.md)): Ubuntu 26.04 with both disks LUKS-encrypted and the root unlocked by the TPM ([ADR-0054](adr/0054-encrypt-trinitys-disks-and-seal-the-root-key-to-the-tpm.md)), all twelve containers healthy, and since that day AdGuard is the one forwarder behind `morpheus`'s resolver ([ADR-0055](adr/0055-forward-to-adguard-alone.md)). Holding real data since 2026-09-28, Immich's first 615 photographs, which passed the #404 step 10 gate while most of it was open. The library is copied nightly to `oracle`, off-host and not off-estate, until [#455](https://github.com/Gerrrt/HomeLab/issues/455) ([ADR-0064](adr/0064-copy-immichs-library-to-oracle-until-the-off-estate-copy-exists.md)). The stack: Caddy as the published HTTPS port and step-ca issuing beneath the tier's own root rather than the estate's, which is left untouched ([#129](https://github.com/Gerrrt/HomeLab/issues/129), [#130](https://github.com/Gerrrt/HomeLab/issues/130), [ADR-0037](adr/0037-give-the-sensitive-tier-its-own-root-and-issue-beneath-it-over-acme.md)), with AdGuard Home behind Caddy and publishing 53 to the firewall's forwarder alone ([#135](https://github.com/Gerrrt/HomeLab/issues/135), [ADR-0010](adr/0010-keep-the-resolver-on-the-gateway.md)); Home Assistant ([#134](https://github.com/Gerrrt/HomeLab/issues/134)), Immich โ€” four containers behind Caddy with a memory limit on each ([#132](https://github.com/Gerrrt/HomeLab/issues/132)) โ€” Paperless-ngx with a Postgres and a Valkey of its own ([#133](https://github.com/Gerrrt/HomeLab/issues/133)) and Vaultwarden ([#131](https://github.com/Gerrrt/HomeLab/issues/131)) run beside them, with the household's page of links to them at `home.matrix.elysium` and its live numbers on read-only tokens ([#137](https://github.com/Gerrrt/HomeLab/issues/137)) โ€” Homepage until [ADR-0103](adr/0103-retire-homepage-and-serve-the-household-page-from-glance.md) made it a page of Glance's. ntfy ([#136](https://github.com/Gerrrt/HomeLab/issues/136)) is the in-house receiver for Alertmanager's three real channels, **deployed and cut over 2026-09-29** by [`verify-the-alert-path.md`](runbooks/verify-the-alert-path.md#cutting-over-to-the-in-house-ntfy), with `urgent` and `security` also sent to ntfy.sh for a phone away from home. Miniflux, a feed reader with a Postgres of its own, is the tier's first service beyond ADR-0008's nine, **deployed 2026-09-29** ([#147](https://github.com/Gerrrt/HomeLab/issues/147), [ADR-0057](adr/0057-add-miniflux-to-the-sensitive-tier-with-its-fetcher-kept-off-winterfell.md)): the one container here that reaches outward on a timer, with its fetcher refused every private address. Memos, the household's notes, is the second, decided by [ADR-0059](adr/0059-add-memos-to-the-sensitive-tier-for-notes-and-keep-documentation-in-docs.md) ([#145](https://github.com/Gerrrt/HomeLab/issues/145)) and deployed behind Caddy the same day, all sixteen containers healthy after that `make up`. Miniflux holds no real data; Memos holds the household's first real notes since 2026-10-22, ahead of ADR-0023's off-estate copy by the operator's accepted exception, with the nightly volume set on `oracle` its only copy off the host, since the household copy under [#455](https://github.com/Gerrrt/HomeLab/issues/455) does not carry `memos-data` yet. Mealie, the household's recipes at `recipes.matrix.elysium`, is the third, **deployed 2026-09-29** ([#146](https://github.com/Gerrrt/HomeLab/issues/146), [ADR-0060](adr/0060-add-mealie-to-the-sensitive-tier-as-recipes.md)), behind the same Caddy with no new rule, its URL import refused every private address. linkding, a bookmark manager, is the fourth, **deployed 2026-09-29** ([#144](https://github.com/Gerrrt/HomeLab/issues/144), [ADR-0061](adr/0061-add-linkding-to-the-sensitive-tier-behind-one-factor.md)). Actual ([#142](https://github.com/Gerrrt/HomeLab/issues/142)), the household's budget, is the fifth beyond ADR-0008's nine, **deployed 2026-09-29** ([ADR-0062](adr/0062-add-actual-to-the-sensitive-tier.md)), claimed from SOPS before its first start. It holds no real budget before #404 step 10. Stirling-PDF, the household's PDF editor at `pdf.matrix.elysium`, is the sixth, **deployed 2026-09-29** ([#143](https://github.com/Gerrrt/HomeLab/issues/143), [ADR-0063](adr/0063-add-stirling-pdf-to-the-sensitive-tier-and-keep-its-documents-in-memory.md)): its documents live on a tmpfs and never reach a disk. Glance, the operator's browser start page at `start.matrix.elysium`, is **deployed 2026-10-21** ([#1223](https://github.com/Gerrrt/HomeLab/issues/1223), [ADR-0098](adr/0098-add-glance-as-the-operators-start-page-beside-homepage.md)): the estate's alerts, probes and targets read from `prometheus` with the reader token, and feeds read from a Miniflux user of its own. Since [ADR-0100](adr/0100-grow-glance-into-a-homelab-page-and-keep-the-operators-lists-in-sops.md) it has a page per subject โ€” Home, Read, Watch, Sports & Markets, Homelab, Network & Storage and Maintenance โ€” the estate's read from `prometheus`, and the operator's own lists come from SOPS. It also serves the household's page at `home.matrix.elysium` ([ADR-0103](adr/0103-retire-homepage-and-serve-the-household-page-from-glance.md)), which took over from Homepage. The office wall page, static files under `wall/` that Caddy serves at `wall.matrix.elysium` with ten fixed Prometheus questions and nineteen Home Assistant entities behind it (most of them template sensors from its own `wall_*.yaml` packages), is **deployed 2026-11-17** for `heimdall`'s kiosk ([ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md)), with its host override on `morpheus` and a blackbox probe, `wall`. Mosquitto and ring-mqtt bring the Ring Alarm into Home Assistant, the broker on an internal network that only those two join, **deployed 2026-10-22** ([ADR-0104](adr/0104-bring-the-ring-alarm-into-home-assistant-through-ring-mqtt.md)). Alloy agent (Docker, `scripts/deploy-agent.sh`), pushing to `prometheus` like `oracle`'s | +| `trinity` (10.0.99.40) | ๐Ÿ”ด 99 | [`stacks/sensitive`](../stacks/sensitive) | ADR-0008's sensitive tier on the ProDesk 600 G4 of [ADR-0034](adr/0034-run-the-sensitive-tier-on-the-prodesk-and-make-it-the-spare-hardware.md). **Built and deployed 2026-09-28** ([#404](https://github.com/Gerrrt/HomeLab/issues/404), [`build-the-sensitive-tier-host.md`](runbooks/build-the-sensitive-tier-host.md)): Ubuntu 26.04 with both disks LUKS-encrypted and the root unlocked by the TPM ([ADR-0054](adr/0054-encrypt-trinitys-disks-and-seal-the-root-key-to-the-tpm.md)), all twelve containers healthy, and since that day AdGuard is the one forwarder behind `morpheus`'s resolver ([ADR-0055](adr/0055-forward-to-adguard-alone.md)). Holding real data since 2026-09-28, Immich's first 615 photographs, which passed the #404 step 10 gate while most of it was open. The library is copied nightly to `oracle`, off-host and not off-estate, until [#455](https://github.com/Gerrrt/HomeLab/issues/455) ([ADR-0064](adr/0064-copy-immichs-library-to-oracle-until-the-off-estate-copy-exists.md)). The stack: Caddy as the published HTTPS port and step-ca issuing beneath the tier's own root rather than the estate's, which is left untouched ([#129](https://github.com/Gerrrt/HomeLab/issues/129), [#130](https://github.com/Gerrrt/HomeLab/issues/130), [ADR-0037](adr/0037-give-the-sensitive-tier-its-own-root-and-issue-beneath-it-over-acme.md)), with AdGuard Home behind Caddy and publishing 53 to the firewall's forwarder alone ([#135](https://github.com/Gerrrt/HomeLab/issues/135), [ADR-0010](adr/0010-keep-the-resolver-on-the-gateway.md)); Home Assistant ([#134](https://github.com/Gerrrt/HomeLab/issues/134)), Immich โ€” four containers behind Caddy with a memory limit on each ([#132](https://github.com/Gerrrt/HomeLab/issues/132)) โ€” Paperless-ngx with a Postgres and a Valkey of its own ([#133](https://github.com/Gerrrt/HomeLab/issues/133)) and Vaultwarden ([#131](https://github.com/Gerrrt/HomeLab/issues/131)) run beside them, with the household's page of links to them at `home.matrix.elysium` and its live numbers on read-only tokens ([#137](https://github.com/Gerrrt/HomeLab/issues/137)) โ€” Homepage until [ADR-0103](adr/0103-retire-homepage-and-serve-the-household-page-from-glance.md) made it a page of Glance's. ntfy ([#136](https://github.com/Gerrrt/HomeLab/issues/136)) is the in-house receiver for Alertmanager's three real channels, **deployed and cut over 2026-09-29** by [`verify-the-alert-path.md`](runbooks/verify-the-alert-path.md#cutting-over-to-the-in-house-ntfy), with `urgent` and `security` also sent to ntfy.sh for a phone away from home. Miniflux, a feed reader with a Postgres of its own, is the tier's first service beyond ADR-0008's nine, **deployed 2026-09-29** ([#147](https://github.com/Gerrrt/HomeLab/issues/147), [ADR-0057](adr/0057-add-miniflux-to-the-sensitive-tier-with-its-fetcher-kept-off-winterfell.md)): the one container here that reaches outward on a timer, with its fetcher refused every private address. Memos, the household's notes, is the second, decided by [ADR-0059](adr/0059-add-memos-to-the-sensitive-tier-for-notes-and-keep-documentation-in-docs.md) ([#145](https://github.com/Gerrrt/HomeLab/issues/145)) and deployed behind Caddy the same day, all sixteen containers healthy after that `make up`. Miniflux holds no real data; Memos holds the household's first real notes since 2026-10-22, ahead of ADR-0023's off-estate copy by the operator's accepted exception, with the nightly volume set on `oracle` its only copy off the host, since the household copy under [#455](https://github.com/Gerrrt/HomeLab/issues/455) does not carry `memos-data` yet. Mealie, the household's recipes at `recipes.matrix.elysium`, is the third, **deployed 2026-09-29** ([#146](https://github.com/Gerrrt/HomeLab/issues/146), [ADR-0060](adr/0060-add-mealie-to-the-sensitive-tier-as-recipes.md)), behind the same Caddy with no new rule, its URL import refused every private address. linkding, a bookmark manager, is the fourth, **deployed 2026-09-29** ([#144](https://github.com/Gerrrt/HomeLab/issues/144), [ADR-0061](adr/0061-add-linkding-to-the-sensitive-tier-behind-one-factor.md)). Actual ([#142](https://github.com/Gerrrt/HomeLab/issues/142)), the household's budget, is the fifth beyond ADR-0008's nine, **deployed 2026-09-29** ([ADR-0062](adr/0062-add-actual-to-the-sensitive-tier.md)), claimed from SOPS before its first start. It holds no real budget before #404 step 10. Stirling-PDF, the household's PDF editor at `pdf.matrix.elysium`, is the sixth, **deployed 2026-09-29** ([#143](https://github.com/Gerrrt/HomeLab/issues/143), [ADR-0063](adr/0063-add-stirling-pdf-to-the-sensitive-tier-and-keep-its-documents-in-memory.md)): its documents live on a tmpfs and never reach a disk. Glance, the operator's browser start page at `start.matrix.elysium`, is **deployed 2026-10-21** ([#1223](https://github.com/Gerrrt/HomeLab/issues/1223), [ADR-0098](adr/0098-add-glance-as-the-operators-start-page-beside-homepage.md)): the estate's alerts, probes and targets read from `prometheus` with the reader token, and feeds read from a Miniflux user of its own. Since [ADR-0100](adr/0100-grow-glance-into-a-homelab-page-and-keep-the-operators-lists-in-sops.md) it has a page per subject โ€” Home, Read, Watch, Sports & Markets, Homelab, Network & Storage and Maintenance โ€” the estate's read from `prometheus`, and the operator's own lists come from SOPS. It also serves the household's page at `home.matrix.elysium` ([ADR-0103](adr/0103-retire-homepage-and-serve-the-household-page-from-glance.md)), which took over from Homepage. The office wall page, static files under `wall/` that Caddy serves at `wall.matrix.elysium` with ten fixed Prometheus questions and twenty Home Assistant entities behind it (most of them template sensors from its own `wall_*.yaml` packages), is **deployed 2026-11-17** for `heimdall`'s kiosk ([ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md)), with its host override on `morpheus` and a blackbox probe, `wall`. Mosquitto and ring-mqtt bring the Ring Alarm into Home Assistant, the broker on an internal network that only those two join, **deployed 2026-10-22** ([ADR-0104](adr/0104-bring-the-ring-alarm-into-home-assistant-through-ring-mqtt.md)). Alloy agent (Docker, `scripts/deploy-agent.sh`), pushing to `prometheus` like `oracle`'s | | `smaug` (10.0.40.30) | ๐ŸŸก 40 | [`stacks/media`](../stacks/media) | [ADR-0008](adr/0008-place-services-by-data-trust.md)'s media tier on the ThinkServer TS150 of [#413](https://github.com/Gerrrt/HomeLab/issues/413), placed and addressed by [ADR-0016](adr/0016-open-casabonita-inward-and-keep-it-terminal-outward.md) and running TrueNAS rather than Ubuntu Server by [ADR-0040](adr/0040-run-truenas-on-smaug-and-keep-the-media-stack-in-this-repository.md). **Built, pooled and deployed**: TrueNAS on its boot SSD, the static above since 2026-09-16, its inbound rules verified in position (four that day; [`network.md`](network.md#casabonita--vlan-40--media) counts them now), the mirror `erebor` since 2026-09-18 and this stack running on it since 2026-09-19 โ€” from a copy of the compose file on the pool, brought up with `docker compose` under TrueNAS's own Docker ([`build-the-nas.md`](runbooks/build-the-nas.md) ยง6). Jellyfin, publishing 8096 to the segment because the televisions reach it natively and no firewall rule is involved at all ([#138](https://github.com/Gerrrt/HomeLab/issues/138)); and Audiobookshelf on 13378, **deployed 2026-09-29**, whose clients are phones on Hicks and which therefore brought a fifth inbound rule by ADR-0050's count, the seventh to exist ([#140](https://github.com/Gerrrt/HomeLab/issues/140), [ADR-0050](adr/0050-add-audiobookshelf-to-the-media-tier-behind-a-fifth-hicks-pass.md)). And Navidrome on 4533 for music, **deployed 2026-09-30** on the same terms, whose Hicks pass was created 2026-09-22, ahead of the service and of Audiobookshelf's ([#141](https://github.com/Gerrrt/HomeLab/issues/141)). The `media` share gets a Hicks pass on `445` for workstations, used by a second SMB user, `samwise`, so the televisions' `bilbo` stays theirs; it was **created on 2026-09-23** ([#523](https://github.com/Gerrrt/HomeLab/issues/523), [ADR-0051](adr/0051-let-hicks-workstations-mount-the-media-share-as-a-user-of-their-own.md)). Scraped by `prometheus` on `9100`; it pushes nothing, and runs no Alloy โ€” the estate's first scraped host, and the reason [#256](https://github.com/Gerrrt/HomeLab/issues/256) was more than a line of YAML. That issue settled the fork TrueNAS opened in it: `node_exporter`, as a digest-pinned container in this stack rather than TrueNAS's own endpoint, so the existing `99 โ†’ 40:9100` pass, the `host-overview` dashboard and seven rules in `host.rules.yaml` all keep working unchanged. MakeMKV, the disc ripper, is in the file behind the compose profile `rip` and is **not yet deployed**: it reads this host's DVD-RW and writes only into `erebor/media/rips`, runs only while someone is ripping, and is reached from Hicks on `5800` through a pass ยง6.11 creates ([ADR-0114](adr/0114-rip-discs-on-smaug-with-makemkv-started-only-to-rip.md)). The `node` job and `prometheus/targets/node.yaml` are live, and the target with them since 2026-09-19, once the exporter answered from the pool. SMART reaches the same scrape by [ADR-0047](adr/0047-collect-smaug-smart-through-a-root-cron-and-the-textfile-collector.md): a root cron job in TrueNAS's UI runs the estate's collector and the exporter serves the file โ€” still no agent, still nothing initiating from 40 โ€” and patch state is deliberately not collected on an appliance ([#483](https://github.com/Gerrrt/HomeLab/issues/483)) | | `bahamut` (10.0.30.50) | ๐ŸŸข 30 | *(none โ€” Windows)* | Windows Server 2025 domain controller, PDC emulator and DNS for `ad.matrix.elysium` โ€” Tier 0. Static, because every member finds a DC through DNS and the DCs *are* the DNS. Built by hand 2026-09-24 to 2026-09-25 ([#414](https://github.com/Gerrrt/HomeLab/issues/414)) and promoted for `ad.matrix.elysium`. Scraped by `alexander` on `9182`; it pushes nothing, and runs no Alloy ([ADR-0029](adr/0029-size-the-lab-domain-and-separate-its-namespace-and-clock.md)) | | `leviathan` (10.0.30.51) | ๐ŸŸข 30 | *(none โ€” Windows)* | Windows Server 2025 second domain controller and DNS โ€” Tier 0. Static, for the same reason. Built by hand 2026-09-24 to 2026-09-25 ([#414](https://github.com/Gerrrt/HomeLab/issues/414)) and promoted for `ad.matrix.elysium`. Scraped by `alexander` on `9182`; it pushes nothing, and runs no Alloy ([ADR-0029](adr/0029-size-the-lab-domain-and-separate-its-namespace-and-clock.md)) | diff --git a/docs/changelog.md b/docs/changelog.md index 6bdccdd0..a285f55c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,22 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-19 +- **The wall says when the dogs are due.** The last of the wall's five + steps. + - `wall_dogs.yaml` makes `sensor.wall_dogs`: when the dogs were last + walked and fed, and how many hours each may go. No device knows this, so + it is recorded by hand: two dashboard buttons, `Dogs walked` and + `Dogs fed`, or an NFC tag labelled `wall_dog_walk` or `wall_dog_feed` + and tapped with a phone. The newest of the two counts. + - The context card *Dogs* shows while either is overdue, after packages + and before the to-do list, in amber with how long ago each happened. + - Both intervals start at 0, which means not tracked, so the card stays + hidden until they are set in the UI. An Alexa routine was in the plan; + this house does not expose Home Assistant to Alexa, so it is left out. + + Previewed at 1920x1080 against stubbed answers; it has not run against + the real Home Assistant. + - **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 diff --git a/docs/security.md b/docs/security.md index 6b992646..273c7d58 100644 --- a/docs/security.md +++ b/docs/security.md @@ -1147,14 +1147,15 @@ from Home Assistant with *not enough permissions*. 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.** + **Its household half reads twenty Home Assistant entities the same way.** Each `/api/ha/NAME` is one `GET /api/states/` 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, what the labelled players are playing (title, artist and app, never the - player's name or room), and `sensor.wall_today`, + player's name or room), when the dogs were last walked and fed, 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 diff --git a/stacks/sensitive/Caddyfile b/stacks/sensitive/Caddyfile index 9659dba8..52f67bad 100644 --- a/stacks/sensitive/Caddyfile +++ b/stacks/sensitive/Caddyfile @@ -481,6 +481,7 @@ 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 @@ -511,6 +512,11 @@ 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 diff --git a/stacks/sensitive/README.md b/stacks/sensitive/README.md index 1aa9482a..3e3f71b9 100644 --- a/stacks/sensitive/README.md +++ b/stacks/sensitive/README.md @@ -815,7 +815,8 @@ 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`); what is + 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 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 @@ -824,8 +825,9 @@ 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, and the - label `wall_media` on each player to show. The + pickup day, the 17TRACK integration with the household's account, a + walking or feeding interval above 0 for the dogs, 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 diff --git a/stacks/sensitive/home-assistant/packages/README.md b/stacks/sensitive/home-assistant/packages/README.md index 959c6993..55d98ea6 100644 --- a/stacks/sensitive/home-assistant/packages/README.md +++ b/stacks/sensitive/home-assistant/packages/README.md @@ -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_dogs.yaml` | `sensor.wall_dogs` for the office wall's context card (ADR-0119): when the dogs were last walked and fed, the newest of a dashboard button (`input_button.dogs_walked`, `input_button.dogs_fed`) and an NFC tag labelled `wall_dog_walk` or `wall_dog_feed` in the UI, and how many hours each may go, set in the UI. The state counts what is overdue. Unavailable while both intervals are 0, the default | | `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 | diff --git a/stacks/sensitive/home-assistant/packages/wall_dogs.yaml b/stacks/sensitive/home-assistant/packages/wall_dogs.yaml new file mode 100644 index 00000000..032a95ec --- /dev/null +++ b/stacks/sensitive/home-assistant/packages/wall_dogs.yaml @@ -0,0 +1,76 @@ +--- +# When the dogs were last walked and fed, for the office wall's context card +# (ADR-0119). No device knows this, so someone records it, either way: +# +# - the two buttons below, on a dashboard, for anyone in the house; +# - an NFC tag, by the leash hook or the food bin, tapped with a phone that +# has the companion app. Each tag is an entity (`tag.*`) whose state is +# when it was last scanned; label it `wall_dog_walk` or `wall_dog_feed` in +# the UI and it counts. The label picks the tags, so none is named here. +# +# The newest of a button press and a labelled tag's scan wins. How long is too +# long is set in the UI, in hours; 0, the default, means not tracked, so the +# wall stays quiet until it is set. +# +# What reaches the wall: two times and two thresholds. Not who pressed or +# scanned, and not the dogs' names. + +input_button: + dogs_walked: + name: Dogs walked + icon: mdi:dog-side + dogs_fed: + name: Dogs fed + icon: mdi:bowl-mix + +input_number: + dogs_walk_every_hours: + name: Walk the dogs every (hours, 0 = not tracked) + icon: mdi:dog-side + min: 0 + max: 24 + step: 0.5 + mode: box + dogs_feed_every_hours: + name: Feed the dogs every (hours, 0 = not tracked) + icon: mdi:bowl-mix + min: 0 + max: 24 + step: 0.5 + mode: box + +template: + - sensor: + # State: how many of the two are overdue. now() makes it re-evaluate + # each minute. The wall works out the ages itself from the attributes. + - name: Wall dogs + unique_id: wall_dogs + default_entity_id: sensor.wall_dogs + icon: mdi:dog + availability: >- + {{ states('input_number.dogs_walk_every_hours') | float(0) > 0 + or states('input_number.dogs_feed_every_hours') | float(0) > 0 }} + state: >- + {% set ns = namespace(n=0) %} + {% for button, label, every in [ + ('input_button.dogs_walked', 'wall_dog_walk', 'input_number.dogs_walk_every_hours'), + ('input_button.dogs_fed', 'wall_dog_feed', 'input_number.dogs_feed_every_hours')] %} + {% set hours = states(every) | float(0) %} + {% set last = ([button] + label_entities(label)) | map('states') + | map('as_datetime', none) | reject('none') | list %} + {% if hours > 0 and (not last or now() - (last | max) > timedelta(hours=hours)) %} + {% set ns.n = ns.n + 1 %} + {% endif %} + {% endfor %} + {{ ns.n }} + attributes: + walked: >- + {% set last = (['input_button.dogs_walked'] + label_entities('wall_dog_walk')) | map('states') + | map('as_datetime', none) | reject('none') | list %} + {{ (last | max).isoformat() if last else none }} + fed: >- + {% set last = (['input_button.dogs_fed'] + label_entities('wall_dog_feed')) | map('states') + | map('as_datetime', none) | reject('none') | list %} + {{ (last | max).isoformat() if last else none }} + walk_hours: "{{ states('input_number.dogs_walk_every_hours') | float(0) }}" + feed_hours: "{{ states('input_number.dogs_feed_every_hours') | float(0) }}" diff --git a/stacks/sensitive/wall/wall.js b/stacks/sensitive/wall/wall.js index 4d68c70d..9d463f75 100644 --- a/stacks/sensitive/wall/wall.js +++ b/stacks/sensitive/wall/wall.js @@ -55,7 +55,7 @@ // The context card's sources (wall_commute, wall_shabbat, wall_todo, // wall_trash, wall_deliveries, wall_media), each unavailable until it is // set up. - const CARDS = ["commute", "shabbat", "todo", "trash", "deliveries", "media"]; + const CARDS = ["commute", "shabbat", "todo", "trash", "deliveries", "dogs", "media"]; const HA = [...HOUSE, "today", ...CARDS]; const states = {}; // HA name -> the entity's state object const answers = {}; // name -> data.result of the last good answer @@ -688,7 +688,7 @@ // others that are also true are named on its last line, so nothing that // matters is hidden without a word. The last entry always applies, so the // card is never empty. Later cards (commute, Shabbat, trash, deliveries, - // now playing) slot in above it as their sources arrive. + // dogs, now playing) slot in above it as their sources arrive. const MIN = 60_000; const attrs = (name) => (haFresh(name) && states[name].attributes) || {}; const until = (t) => { @@ -778,6 +778,26 @@ if (Number(a.in_transit) > 0) sub(box, `${a.in_transit} on the way`); } + // Dogs: while a walk or a feeding is overdue. A threshold of 0 is not + // tracked; one never recorded counts as overdue, so a new setup shows. + function dogsDue() { + const a = attrs("dogs"); + return [["Walked", "walk", a.walked, Number(a.walk_hours) || 0], ["Fed", "feed", a.fed, Number(a.feed_hours) || 0]] + .filter(([, , , hours]) => hours > 0) + .map(([label, verb, at, hours]) => { + const t = at ? new Date(at) : null; + const age = t && !isNaN(t) ? (Date.now() - t) / 1000 : null; + return { label, verb, age, due: age === null || age > hours * 3600 }; + }); + } + function dogsLive() { return haFresh("dogs") && dogsDue().some((d) => d.due); } + function renderDogs(box) { + const all = dogsDue(); + const due = all.filter((d) => d.due).map((d) => d.verb); + hero(box, `${due.join(" and ")} the dogs`.replace(/^./, (c) => c.toUpperCase()), "warn"); + for (const d of all) sub(box, d.age === null ? `${d.label}: not recorded yet` : `${d.label} ${ago(d.age)} ago`); + } + // The to-do list, the default when it has anything on it. function todoLive() { return haFresh("todo") && Number(states.todo.state) > 0; } function renderTodo(box) { @@ -808,6 +828,7 @@ short: "shabbat", when: shabbatLive, render: renderShabbat }, { title: "Trash", short: "trash", when: trashLive, render: renderTrash }, { title: "Packages", short: "packages", when: deliveriesLive, render: renderDeliveries }, + { title: "Dogs", short: "dogs", when: dogsLive, render: renderDogs }, { title: "To-do", short: "to-do", when: todoLive, render: renderTodo }, { title: "Now playing", short: "playing", when: mediaLive, render: renderMedia }, { title: "Word of the day", short: "word", when: () => true, render: renderWord },