Phase 19: trash-calendar (Kennelbach ICS -> CalDAV) and transit (GTFS
departures + OpenTripPlanner-backed voice route planning, slow walking
speed assumed). Phase 20: Tapo camera integration via identity's new
Frigate face-recognition presence signal, and chores, a presence/
calendar-driven household task nudger ("I don't care who does it, as
long as it gets done") with a passive fairness tally, litter culprit
attribution, and per-person chore_exempt/chore_reminder_style settings
on identity.
Also: the HA integrations + hardware-monitoring catalogs, Music
Assistant wiring, docs/network-integration.md (OPNsense VLAN
segmentation, no WAN port-forwards), the ESPHome BLE-proxy firmware,
and RuView CSI-presence integration (github.com/ruvnet/ruview) with
household automations for sleep/distress/concurrent-vitals/bathroom-
occupancy — all flagged with their real unverified assumptions and
open decisions. Fixed two real port collisions surfaced while wiring
this in (OTP vs. zigbee2mqtt on 8080, Music Assistant vs. pantry-vision
on 8095).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K6CrKjW3yVptUnjG35HjC1
|
||
|---|---|---|
| .. | ||
| Dockerfile | ||
| README.md | ||
| requirements.txt | ||
| sync.py | ||
| trash-calendar.env.example | ||
README.md
trash-calendar
Mirrors Kennelbach's trash/recycling collection dates into the household's own Nextcloud calendar, from Phase 19 of the project plan.
Not a new trash-schedule data source — Kennelbach's own site (kennelbach.at) and
Vorarlberg's Umweltverband (umweltv.at) already publish a personal, address-specific
ICS feed of your collection dates; this repo doesn't scrape or re-derive that. What's
missing without this tool is getting those dates into the same calendar the
household already looks at (the one digest-engine/ingest/caldav.py already reads
from) instead of a second app/URL nobody checks.
How it works
- Download the household's real personal ICS feed URL (see
trash-calendar.env.examplefor where to get it — it's address-specific, this repo can't hardcode it). sync.pydownloads and parses that feed, keeps only events in the nextWASTE_LOOKAHEAD_DAYS(default 60).- For each one, it checks whether an event with a deterministic UID
(
smartesthome-trash-<hash of summary+date>) already exists inCALDAV_TARGET_CALENDAR; if not, it creates it. It never updates or deletes anything — a re-run that finds nothing new touches nothing at all, and it never reads or writes any event outside its ownsmartesthome-trash-prefix.
Oneshot + systemd timer (daily via ENABLE_TRASH_CALENDAR in
setup-container-host.sh), not an always-on service — same shape as
digest-engine's own scheduling.
Why this isn't part of digest-engine
digest-engine/ingest/caldav.py has one documented invariant: it never mutates the
calendar it reads from (see that file's own docstring, "READ-ONLY INVARIANT"). Adding
a write path into the same component would either break that invariant or need a
confusing second mode. A separate, smaller tool that reuses the exact same
CALDAV_URL/CALDAV_USERNAME/CALDAV_PASSWORD/CALDAV_VERIFY_TLS credentials (one
Nextcloud app password, not two) keeps the "never mutates" guarantee real for the
digest while still solving the actual problem.
Configure
cp trash-calendar/trash-calendar.env.example /opt/smart-home/trash-calendar/trash-calendar.env
chmod 600 /opt/smart-home/trash-calendar/trash-calendar.env
$EDITOR /opt/smart-home/trash-calendar/trash-calendar.env
WASTE_ICS_URL and CALDAV_TARGET_CALENDAR are both required and both
household-specific — see the template's own comments for where to get each.
Manual verification still outstanding
- The exact "download/subscribe" UI on kennelbach.at's/umweltv.at's Abfallkalender
page — confirmed these pages exist and serve a personal calendar (see
docs/project-plan.md§1.17's research note), but the precise click-path to an ICS URL wasn't captured here; get it once, it should be a fixed URL after that. - Whether
calendar.event_by_uid()on a real Nextcloud instance behaves the way thecaldavlibrary's docs describe (raises when not found — caught here as "doesn't exist yet, create it") — this exact call is already used read-side by nothing in this repo, only written fresh here; unverified against a live server. - Whether Nextcloud's CalDAV endpoint accepts a bare
save_event()with the minimal VEVENT built here (noDTEND, all-day viaDTSTART;VALUE=DATE) without complaint — a deliberately minimal event, not tested against a real server. - Timezone/date-boundary edge cases right around midnight —
date.today()uses the container's own clock/timezone; confirm the container host'sTZis set correctly (setup-container-host.sh's ownTIMEZONEvariable already threads through to every other container, this one included).