Waste Calendar → Alexa
A system that turns the municipal recycling PDF calendars into Alexa voice reminders — "what do I take out tomorrow?" plus an automatic heads-up the evening before each collection.
Invocation: “Alexa, apri calendario rifiuti”
The problem
Remembering which bin to put out each evening is a classic. My waste operator’s (SERIT) calendars are PDFs: fine to look at, useless to query by voice. I wanted to ask Alexa “what do I take out tomorrow?” and, better still, get an automatic reminder the night before.
A three-layer architecture
- Ingestion (offline) — download the SERIT PDFs and convert them into structured, validated JSON. This is the only layer that depends on the PDF layout.
- Normalised data — one file per
town/zone/yearplus acatalog.jsonindex. Adding a town means adding files, without touching the skill. - Alexa skill (Node / AWS Lambda) — answers by voice and schedules the evening reminders.
The PDF parser (the interesting part)
The SERIT PDFs have a nasty quirk: the day numbers are vector graphics, not text. So the parser reconstructs each date from the sequence of weekday names (which are text) plus the month and year, and then validates it against the expected weekday. If something doesn’t line up, the program exits with an error code — the signal that the PDF layout has changed and the parser needs revisiting. On the test files: zero mismatches.
The Alexa skill
- On-demand: “what do I take out today/tomorrow” and “when is fraction collected”, with the zone chosen by voice.
- Evening reminders at 8pm the night before each collection, via the Reminders API, with the chosen zone persisted (DynamoDB).
The constraint that flipped the project
The first architecture created the reminders out of session: an
EventBridge → Lambda → Messaging API chain was meant to wake the skill every evening and
schedule the alert. It doesn’t work. Alexa forbids creating reminders outside a live
user session and answers NOT_IN_SESSION — even when the skill is invoked through the
messaging channel. A wrong assumption, disproved by the logs.
The fix is a “horizon” reminder: when you open the skill (or say “turn on reminders”), it schedules every collection for the next ~6 weeks in one go, each as a voice alert the evening before. Every time you open it, a top-up refills the missing weeks. The trade-off is upfront: it’s hands-off for about six weeks, after which reopening the skill renews the horizon.
From one town to 52
Built for just my own town at first, I’ve since extended it to 52 towns and 79 calendars across the SERIT service area: the parser now builds a whole catalogue instead of a single file, incrementally — it checks whether the PDFs have actually changed before re-downloading them, and if one becomes unreadable it keeps the last good version rather than leaving that town without data. The skill’s interaction model (the town and zone names Alexa recognises by voice) is generated automatically from the catalogue, not hand-written.
Adding more towns also surfaced a practical detail: not everyone puts bins out the evening before. Some expose them the same day, morning or afternoon — so the reminder time is no longer a fixed 8pm, it’s computed from how and when that specific town asks for bins to be put out.
The same architecture as another one of my skills
To keep the catalogue fresh without a server running round the clock, I reused the setup from my Day’s Almanac skill: a scheduled Cloudflare Worker checks whether the SERIT index has changed (a handful of requests, well within the free tier) and, only then, triggers a GitHub Action that actually rebuilds the catalogue and publishes it. The skill reads its data from the Worker, with a bundled local copy as a fallback if anything doesn’t respond. A small Telegram alert fires whenever the list of calendars changes.
Status
All the core phases are complete, reminders verified end-to-end (they really do show up in the Alexa app), and the multi-town skill is deployed. The first real automated catalogue refresh went through: the Worker ran on schedule, the Telegram alert arrived and the health check reported its last-check time and the index fingerprint. The Worker → GitHub Action → store → skill loop is closed.
The skill is now also published on the Alexa Store, with a multi-town description and this section’s privacy policy and terms of use. The project is done: from here on it’s maintenance, for example adapting the parser if SERIT ever changes the PDF layout.
Stack
Python (parser) · Node.js / Alexa ASK SDK · AWS Lambda · DynamoDB · Alexa Reminders API · Cloudflare Workers · GitHub Actions