mampfes / hacs_waste_collection_schedule

Home Assistant integration framework for (garbage collection) schedules
MIT License
988 stars 631 forks source link

[Bug]: abfall_havelland_de.md - stops working after time #2205

Closed adieball closed 2 months ago

adieball commented 2 months ago

I Have A Problem With:

A specific source

What's Your Problem

I configured waste collection as described and it’s working fine, but after a while it seems there is no update anymore. I believe it’s related to some sort of cockles required when calling anything from the website including the ics.

when I manually go to the website and go through he process of getting the url again (Which is exactly the same URL as before) it works again for a while (some days) and the stops again.

copying the url into a browser does indeed bring Error 404

Source (if relevant)

No response

Logs

Logger: waste_collection_schedule.source_shell
Quelle: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:147
Integration: waste_collection_schedule (Dokumentation)
Erstmals aufgetreten: 10:16:44 (1 Vorkommnisse)
Zuletzt protokolliert: 10:16:44

fetch failed for source ICS: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 145, in fetch entries = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py", line 179, in fetch return self.fetch_url(self._url, self._params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py", line 198, in fetch_url r.raise_for_status() File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://www.abfall-havelland.de/UserFiles/Files/Abfuhrtermine%20Glockenheidering%20Wustermark%20OT%20Elstal.ics

Relevant Configuration

No response

Checklist Source Error

Checklist Sensor Error

Required

5ila5 commented 2 months ago

Looks like they generate the files and save them at the cache folder which is cleared regularly, you can either download the ICS and reference the file in HA or use the newly created source (#2213), which will be part of the next release or is available now as master (git) version (3-dot menu -> redownload -> change version to master -> fully restart HA (this will increase update cycle by a lot)