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

## 2026-11-18

- **The wall's context card gets its sources.** The third of the wall's
five steps. Five new packages, each a `sensor.wall_*` behind its own
`/api/ha/` handle, fill the card by precedence:
- `wall_commute.yaml`: the live drive from home to the next event within
three hours whose location looks like a place, through
`waze_travel_time.get_travel_times`. It shows from an hour before it is
time to leave, with five minutes to get out of the door. There is no fixed
commute, so the calendar is the destination: only calendars labelled
`wall_commute`, and none until one is. This is the first time the wall
sends anything out of the house: that one location, to Waze.
- `wall_shabbat.yaml`: candles, havdalah, parsha and Hebrew date from the
Jewish Calendar integration, from six hours before candle lighting.
- `wall_trash.yaml`: the next pickup from three helpers, from 16:00 the
evening before. It needs no integration.
- `wall_deliveries.yaml`: 17TRACK packages delivered today, ready for
pickup or undelivered, by their labels, never their numbers.
- `wall_todo.yaml`: the open items of the lists labelled `wall_todo`, the
card's default before the Hebrew word.

Each stays unavailable, and its card hidden, until its integration or
helper is set up in the UI; none of them is yet. `docs/security.md` had
said the wall shows two days of the schedule. It has shown seven since the
first step, and now says so. I previewed each card at 1920x1080 against
stubbed answers, alone and all at once. None of them has been run against
the real Home Assistant.
- **`fenrir`'s leftover tool images are gone, and its runbook installs the
weekly image prune.** "`fenrir`'s re-check with sudo finds nothing the audit
could not see", below, left seven lint and validate images, about 928 MB,
Expand Down
21 changes: 15 additions & 6 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -1145,22 +1145,31 @@ from Home Assistant with *not enough permissions*.
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 thirteen Home Assistant entities the same way.**
**Its household half reads eighteen 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, and `sensor.wall_today`,
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`,
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, and the family's
schedule for two days: each event's title, time and location. That is the
same as the Home Assistant app shows to the household, without its login.
The calendars' names, descriptions and attendees are not passed on.
whether the doors are open, whether the alarm is set, 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
login. The calendars' names, descriptions and attendees are not passed on,
nor are tracking numbers. One thing leaves the house for the wall: the
location of the next event with an address, which
`home-assistant/packages/wall_commute.yaml` sends to Waze to be routed from
the home zone. It reads only the calendars labelled `wall_commute`, and none
when no calendar carries that label, so a calendar is routed only once
someone chooses it.
- `snmp-exporter` is never published to a host interface — it is reachable only
on the compose network.
- Alertmanager binds to `127.0.0.1` only. It is unauthenticated, and a silence
Expand Down
33 changes: 33 additions & 0 deletions stacks/sensitive/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,39 @@ wall.matrix.elysium {
import wall_ha
}

# The context card's sources, each a template entity in its own
# home-assistant/packages/wall_*.yaml, each unavailable until its
# integration or helper is set up, which hides its card:
# commute the drive to the next event with an address (Waze)
# shabbat candles, havdalah, parsha (Jewish Calendar)
# todo the open items of the lists labelled wall_todo
# trash the next pickup, from three helpers
# deliveries packages to go and get (17TRACK)
handle /api/ha/commute {
rewrite * /api/states/sensor.wall_commute?
import wall_ha
}

handle /api/ha/shabbat {
rewrite * /api/states/sensor.wall_shabbat?
import wall_ha
}

handle /api/ha/todo {
rewrite * /api/states/sensor.wall_todo?
import wall_ha
}

handle /api/ha/trash {
rewrite * /api/states/sensor.wall_trash?
import wall_ha
}

handle /api/ha/deliveries {
rewrite * /api/states/sensor.wall_deliveries?
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
17 changes: 15 additions & 2 deletions stacks/sensitive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,21 @@ container of its own: Caddy serves `wall/` as static files.
alerts, the rest of the week below them while there is room, and a
countdown to the next timed event in the header. The cell beside Internet
is a context card that shows one thing at a time, whichever matters now
(`CONTEXT` in `wall.js`); until other sources arrive that is a Hebrew word
of the day from a static list in the page. The UPS's mains or battery,
(`CONTEXT` in `wall.js`), in this order of precedence: the drive to the
next event with an address, from an hour before it is time to leave
(`/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
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
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
Expand Down
5 changes: 5 additions & 0 deletions stacks/sensitive/home-assistant/packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ and nothing else. This README is not YAML and Home Assistant ignores it.
| `tv_room_evening.yaml` | At 19:00 the TV comes on with Prime Video open and the TV room at its Mood scene; at 21:00 a bedtime nudge on the living-room Echo and the TV. A pause switch skips both |
| `wall_calendar.yaml` | `sensor.wall_today`: the next seven days' events, asked of `calendar.get_events` every five minutes, for the office wall's Today panel, its week below tomorrow and the header's *Up next* (ADR-0119). The calendars are those labelled `wall_calendar` in the UI, or all of them when none is labelled, so no calendar is named here. Unavailable, not empty, when a calendar cannot be read |
| `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_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 |
| `wall_weather.yaml` | `sensor.wall_weather` for the office wall's header (ADR-0119): today's high and low, the first of the next six hours with rain or snow, and `sun.sun`'s next sunrise and sunset. Asked of `weather.get_forecasts` on `weather.forecast_home` every fifteen minutes, because a forecast is an action's answer, not an attribute. Unavailable only when neither the daily nor the hourly forecast answers; with no daily entry for today, the state is `none` and the rain and sun still come through |

Home Assistant reads these files only when it starts, and the directory is
Expand Down
112 changes: 112 additions & 0 deletions stacks/sensitive/home-assistant/packages/wall_commute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
# The drive to the next event that has an address, for the office wall
# (ADR-0119): how long it takes now and when to leave. The wall shows it in
# its context card from an hour before it is time to leave until the event
# starts.
#
# The household has no fixed commute, so the destination is the calendar's:
# the next timed event that starts within three hours and whose location looks
# like a place, with a digit or a comma in it. "Teams", "Zoom" or a meeting
# link are not driven to, and are skipped. Waze is asked only while there is
# such an event, every five minutes, through
# `waze_travel_time.get_travel_times` with live traffic. That action is loaded
# by the core `waze_travel_time` integration, which has to be added once in the
# UI (its own sensor's polling can be switched off; this does not read it).
#
# Which calendars: only those labelled `wall_commute` in the UI, and none when
# none is. This is its own label, not the wall's `wall_calendar`, because the
# wall falls back to every calendar when none is labelled, and sending a
# calendar's locations out of the house needs a choice, not a default. The
# events are asked of `calendar.get_events` here, not read from
# sensor.wall_today, so Waze gets the whole location rather than the wall's
# shortened one.
#
# What leaves the house: that event's location, sent to Waze to be routed from
# the home zone. Nothing from a calendar without the label.
#
# The state is the minutes of the quickest route, or `none` when there is
# nothing to drive to or Waze did not answer, which hides the card.

template:
- triggers:
- trigger: time_pattern
minutes: /5
- trigger: homeassistant
event: start
- trigger: event
event_type: event_template_reloaded
actions:
- variables:
wall_calendars: >-
{{ label_entities('wall_commute') | select('match', 'calendar\.') | sort | list }}
- if: "{{ wall_calendars | count > 0 }}"
then:
- action: calendar.get_events
target:
entity_id: "{{ wall_calendars }}"
data:
start_date_time: "{{ now() }}"
end_date_time: "{{ now() + timedelta(hours=3) }}"
response_variable: agenda
continue_on_error: true
- variables:
wall_next: >-
{% set ns = namespace(e=none) %}
{% if agenda is defined and agenda is mapping %}
{% for cal in wall_calendars %}
{% for e in agenda.get(cal, {}).get('events', []) %}
{% set place = (e.get('location') or '') | lower %}
{% if 'T' in e.start and place
and (place is search('[0-9]') or ',' in place)
and not (place is search('https?:|teams|zoom|meet\.google|webex')) %}
{% set start = as_datetime(e.start) %}
{% if start > now() and (ns.e is none or start < as_datetime(ns.e.start)) %}
{% set ns.e = {
'title': (e.get('summary') or 'Busy')[:80],
'start': as_local(start).isoformat(),
'location': e.location,
} %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{{ ns.e if ns.e is not none else {} }}
- if: "{{ wall_next.location is defined }}"
then:
- action: waze_travel_time.get_travel_times
data:
origin: zone.home
destination: "{{ wall_next.location }}"
Comment thread
Gerrrt marked this conversation as resolved.
Resolved
region: us
units: imperial
realtime: true
response_variable: wall_answer
continue_on_error: true
- variables:
wall_route: >-
{% if wall_next.location is defined and wall_answer is defined and wall_answer is mapping
and (wall_answer.routes | default([]) | count) > 0 %}
{{ wall_answer.routes | sort(attribute='duration') | first }}
{% else %}
{{ {} }}
{% endif %}
# A second block, so this can read wall_route above.
- variables:
# Five minutes to get out of the door.
wall_leave_by: >-
{% if wall_route.duration is defined %}
{{ (as_datetime(wall_next.start) - timedelta(minutes=(wall_route.duration | float(0)) + 5)).isoformat() }}
{% else %}
{{ '' }}
{% endif %}
sensor:
- name: Wall commute
unique_id: wall_commute
icon: mdi:car-clock
state: "{{ wall_route.duration | float(0) | round(0) | int if wall_route.duration is defined else 'none' }}"
attributes:
title: "{{ wall_next.title | default('') if wall_route.duration is defined else '' }}"
start: "{{ wall_next.start | default('') if wall_route.duration is defined else '' }}"
route: "{{ wall_route.name | default('') }}"
leave_by: "{{ wall_leave_by }}"
Loading