Skip to content
/ affalddk Public

Home Assistant Integration to retrieve Garbage Collection data from danish Municipalities

License

Notifications You must be signed in to change notification settings

briis/affalddk

Repository files navigation

Affaldshåndtering DK

GitHub Release GitHub Activity License hacs Project Maintenance

Buy Me A Coffee

The Affaldshåndtering DK integration adds support for retreiving Garbage Collection data from Municipalities around Denmark.

INTRODUCTION

This integration replaces the RenoWeb integration, which will no longer be maintained.

This is a complete rewrite of the RenowWeb V1.x Integration as the API this uses is slowly being phased out, and we needed to find a new way of collecting the data.

DESCRIPTION

Municipalities in Denmark, do not have one standard for how to expose the Pickup Calendars for their citizens, and different Municipalities have different solutions. This integration currently supports the Municipalities that uses the solution from Renoweb and that accounts for more than 50% of all Municipalities.

As of release 2.2.0, there is now also a possibility to read an iCalendar file (.ics file) which a few municipalities offer for their customers. If your municipality is not on the list, and you have the option for that, please create a Feature Request, and I will do my best to get it added.

Go to the Municipality List to see if your Municipality will work with this integration.

The biggest issue is, that there is NO standard for the way municipalities mix the content of containers. Some have glas & metal in one container, others have glas and paper in one container, etc and also even though they do mix the same content in a container, they do not name it the same. In order to have some structure I need them grouped together and this is a bit of a challenge with all these different types. If a new pickup-type is found, the system will log a warning, which you can put in an issue and I will add it to the list. Please enable logging for the wrapper module in Home assistant to get this warning in Home Assistant, by adding this code to your configuration.yaml:

logger:
  default: warning
  logs:
    custom_components.affalddk: debug
    pyaffalddk: debug

This integration will set up the following platforms.

Platform Description
sensor A Home Assistant sensor entity, with all available sensor from the API. State value will be the days until next pick-up
calendar An entry will be made in to a local Home Assistant calendar. There will be a full-day event every time there is a pick-up, describing what is collected.

CREDITS

A big thank you to @thomaspalmdk for finding the new API, and to the people who helped Beta test it. Also thank you to @LordMike for making the embedded image functionality.

INSTALLATION

HACS Installation

This Integration is not yet part of the default HACS store, (Work in progress, but that can take some time) but you can add it as a Custom repository in HACS by doing the following:

  1. Go to HACS in your HA installation, and click on Integrations
  2. Click the three vertical dots in the upper right corner, and select Custom repositories
  3. Add https://github.com/briis/affalddk and select Integration as Category, and then click Add

You should now be able to find this Integration in HACS. After the installation of the files, you must restart Home Assistant, or else you will not be able to add Affald-DK from the Devices & Services Page.

If you are not familiar with HACS, or haven't installed it, I would recommend to look through the HACS documentation, before continuing. Even though you can install the Integration manually, I would recommend using HACS, as you would always be reminded when a new release is published.

Manual Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called affalddk.
  4. Download all the files from the custom_components/affalddk/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Affald*"

CONFIGURATION

To add Affald-DK to your installation, do the following:

  • Go to Settings and Devices & Services

  • Click the + ADD INTEGRATION button in the lower right corner.

  • Search for Affald* and click the integration.

  • When loaded, there will be a configuration box, where you must select and enter:

    Parameter Required Default Value Description
    Municipality Yes None Select your Municipality from the Dropdown list. You can press the first letter of your municipality to quickly scroll down.
    Zipcode Yes None Enter the Zipcode of the address. This is required as some municipalities use the same road name in several cities, so we need to make sure we pick the right street.
    Road name Yes None Type the name of the road you want to get collection data for. Without house number.
    House Number Yes None The house number of the address. Also accepts letters. If you have a house number like 2A or similar, and it does not work, try putting a space between the number and the letter, like 2 A
  • Click on SUBMIT to save your data. If all goes well you should now have entities under the Affaldshåndtering DK integration

You can configure more than 1 instance of the Integration by using a different Address.

MORE INFORMATION

Around every New Year a bunch of Pickup Types will have no dates for the next pickup, as the calendar for the following year has not yet been created. That will result in some Sensors with Undefined or Unavailable in their value, and they will be unavailable, until they have a date again. As of version 2.1.20, they will now get an artificial date which is always December 31. the following year. As soon as a valid date is found for these sensors, this date will be used instead.

MUNICIPALITIES

Here is the list of currently supported Municipalities (57)

- Aabenraa
- Aalborg
- Aarhus
- Albertslund
- Allerød
- Billund
- Bornholm
- Brøndby
- Brønderslev
- Dragør
- Egedal
- Esbjerg
- Faxe
- Fredensborg
- Frederiksberg
- Frederikssund
- Gentofte
- Gladsaxe
- Glostrup
- Greve
- Gribskov
- Halsnæs
- Hedensted
- Helsingør
- Herlev
- Hillerød
- Hjørring
- Horsens
- Hvidovre
- Høje-Taastrup
- Hørsholm
- Jammerbugt
- Kerteminde
- Køge
- Lejre
- Lyngby-Taarbæk
- Mariagerfjord
- Næstved
- Odense
- Odsherred
- Randers
- Ringkøbing-Skjern
- Ringsted
- Roskilde
- Rudersdal
- Rødovre
- Samsø
- Slagelse
- Solrød
- Sorø
- Stevns
- Svendborg
- Sønderborg
- Tårnby
- Varde
- Vejen
- Vordingborg

About

Home Assistant Integration to retrieve Garbage Collection data from danish Municipalities

Topics

Resources

License

Stars

Watchers

Forks