External integration - Waste Collection Schedule (collecte des déchets)

Hello everyone,

Taking out the right trash bin on the right night without thinking about it: this external integration brings the waste collection dates for your address into Gladys.

What it does

It relies on Waste Collection Schedule, the library for Home Assistant users: nearly 1,000 sources (municipalities and organizations from around thirty countries, including Bordeaux, Nantes, Angers, Montpellier, Toulouse…, and any ICS calendar link), executed as-is in the container.

The collections arrive in Gladys’ calendar: one calendar per source (« Waste Collection – Home ») for each user who activates the integration, with one event per collection and per type of waste.

Cloud transport: your Gladys queries the source every 12 hours; your address only goes to it. Gladys does not have a native integration equivalent.

Features

Next Collections widget, scene triggers collection tomorrow (evening reminder), type of waste collected tomorrow, collection today and update failure, actions read next collection and update dates, up to three sources.

  • Waste collection tomorrow → message « Tomorrow: {{triggerEvent.data.waste_types}}, remember to take out the bins ».
  • Type of waste collected tomorrow, « Glass » → the entrance light turns green for 10 minutes.
  • Gladys calendar trigger, 30 minutes before the « Sorting » event → a reminder to the household.
All features
  • Up to three sources (second home, or a second source for the same address).
  • Widget: the next collection, the next few days with a bin of the right color, the status of each source, a Refresh button.
  • Configuration buttons Find a source (by municipality, organization or country) and Test calendars.
  • Rename and hide waste types; texts in French, English, German and Spanish.
  • A reminder is only sent once per collection, even after a restart. The widget and triggers work even if no one activates the calendar.

Installation

Available in the store later today, pending indexing (or now from the repository URL: Integrations → Install an integration). Gladys 5.2.0 minimum.

  1. Configuration → Find a source with the name of your municipality: the response gives the source and the arguments to copy.
  2. Enter the source, its arguments (for example {"city": "Bordeaux", "address": "20 Cours Pasteur"}) and a name, save, then Test calendars.
  3. Each user clicks on Enable for me in My calendars (and Share with the household to use it in scenes).
  4. Add the widget to a dashboard.

In pictures

The « Next Collections » widget, with one calendar then two (generated illustration, not a screenshot)

Technical operation

A Node.js container (Gladys SDK) launches for each update a short Python process that executes the Waste Collection Schedule source, one at a time (256 MB for the whole). The calendars are republished when the source changes and once a day (35-day window in the past to 400 days in the future). Automatic release by Conventional Commits, multi-architecture image published before the manifest announces it, and a workflow that proposes each new version of Waste Collection Schedule.

Known limitations

  • Tested in real life with only a few sources (Bordeaux Métropole, Nantes Métropole, an ICS stream). A broken source in Waste Collection Schedule is also broken here.
  • No devices: the « days remaining » are obtained with the scene action « Read next collection ».
  • The arguments are entered in JSON (or key=value): « Find a source » helps, but it is not a step-by-step assistant.

Your feedback

Here or in a GitHub issue, with the versions of Gladys and the integration, the source and the logs (ideally with DEBUG=gladys-integration-sdk).

Apache 2.0 license. Thanks to Steffen Zimmermann and the contributors of Waste Collection Schedule.

Initial manifest issue:

you didn’t take the right repository

my repository is: https://github.com/William-De71/gladys-waste-collection-schedule

The repository you put up is the repository I based my development on.

Oh the terrible copy/paste job I did…! Sorry for the mess

no problem, but I’d love your feedback once you’ve tested it

Thanks. My town isn’t in the source repo, time to make a PR there :sweat_smile:
Oh yes, I’m testing

That’s the problem. I hesitated between starting from what they had done or doing it all over again.
I chose the quickest option, but if it becomes problematic, I’ll look for another solution.

I can’t find the source that suits me :confused: (Grand Sud Tarn et Garonne)

it’s problematic if no one finds the source :cry:

Yes lol, yet the list is already quite extensive!

have you found it now?

Yes
I’ll check the dates but it sounds good to me.

If there are ever things to improve, don’t hesitate

Thanks @Will_71 for this integration. I installed it and I want to configure it, but I don’t really understand what I need to fill in the 3 fields. I ran the ‹ find source › action for Besançon. And I got this:

1 source(s) found:
Grand Besançon Métropole (France) → source: grandbesancon_fr · arguments: {} · to complete: insee_code, street
hacs_waste_collection_schedule/doc/source/grandbesancon_fr.md at master · mampfes/hacs_waste_collection_schedule · GitHub

So what should I copy into the 3 fields?

Is it me who’s not connected? :sweat_smile:
But I can’t find the integration in the store even though I’m on 5.2.1?
I refreshed the integrations with no success :neutral_face:

No, it’s not in the catalog yet. They must have forced the installation.
It was released this afternoon and the last catalog update was at 1:41 p.m.
image

@StephaneB, I’ll install it and let you know because I haven’t had time to test it yet.

I admit it’s not simple with the json. I’m going to make a modification because I don’t like it much

Actually, I hadn’t noticed
I’ll wait then :wink:
Thanks

I was curious, so I did indeed install in « from the GitHub repository » mode.