Archived, because you now can subscribe to a calendar in ical format provided by Stadtreinigung Hamburg.
The Stadtreinigung Hamburg publishes the garbage collection dates at their website. You can also subscribe to an email reminder service as well as download all dates 6 month in advance.
However, both options aren't perfect:
- The email service spams your inbox.
- The ICS-Calendar file option requires a manual download at least every 6 months and doesn't capture short-term changes.
- Also, all events are dated to the day before collection at 17:00 which is the reminder date - not the actual collection date.
- It regularly checks the collection events from the Stadtreinigung Hamburg page at your address.
- It changes the date to the actual collection date.
- You can configure any Google notification.
- It sanitizes the event title and description.
- It sets the corresponding color (Paper = blue, Plastic = yellow, ...)
- It synchronizes these sanitized events with a given Google Calendar.
- Copy the
config-example.json
toconfig.json
.
You need a technical user that you will give access to your private calendar.
- Log in to https://console.cloud.google.com/apis/api/calendar-json.googleapis.com
- Click "activate"
- Click "create credentials"
- Select "Google Calendar API", "Webserver (eg NodeJS)", "Application Data"
- Download JSON credentials
- Open JSON and copy and paste the values of "client_email" and "private_key" into the
./config.json
file.
- Open calendar.google.com
- Create a new calendar (e.g. named "Müllabfuhr")
- Go to calendar settings
- Share calendar with the client email from the
config.json
(read and write access) - Copy the calendar ID (
something@group.calendar.google.com
) and paste it into the./config.json
file. - If you want each garbage entry with the corresponding color, remove the
"defaultCalendarEventColorId": "8"
. Otherwise all garbage entries will be in graphite. - Choose if you want to have whole day events or 2 hour events by setting the
calendarEntryWholeDay
in the config.
- Under notifications, add your preferred notification method and time. I use "popup" and "13h before". Which is 17:00 the day before as notification on my mobile phone.
- Set your street name and your house number in
config.json
. This has to match the data from Stadtreinigung Hamburg. You can verify it here
- Sync Frequency Stadtreinigung Hamburg states that they'll update the collection events every 4 weeks.
I suggest synchronizing the the garbage calendar at least once a week. My cron expression is:
"0 0 0 * * Mon"
which is every Monday at 00:00. You can find more information on cron scheduling at here. If you don't want to sync at all, setenableCron
tofalse
. This may be useful if you want to use an external cron daemon. - Colors You can disable the different colors for each garbage collection event by setting
disableColors
totrue
. Events will then have the default calendar color.
- Download and install Docker
- Run
docker build -t garbage_calendar_service .
- Run
docker run garbage_calendar_service
- First sync will start directly