mampfes / hacs_waste_collection_schedule

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

[Bug]: app_abfallplus_de returns names with numbers instead of the types #2197

Open OnSive opened 1 week ago

OnSive commented 1 week ago

I Have A Problem With:

A specific source

What's Your Problem

https://community.home-assistant.io/t/waste-collection-schedule-framework/186492/542

The attribute of my sensor do only contain names with numbers. image

Source (if relevant)

app_abfallplus_de / ZAK Abfall App

Logs

N/A

Relevant Configuration

Sensor (you can use the following wizard: custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py)

waste_collection_schedule:
    sources:
    - name: app_abfallplus_de
      args:
        app_id: de.k4systems.abfallappzak
        city: Fischen
        bezirk: Ortsteile

Checklist Source Error

Checklist Sensor Error

Required

Tigra16v commented 3 days ago

@Tigra16v bist du noch in einem anderen Forum aktiv, bei dem man dir direkt schreiben kann?

Leider nicht. Aber bin offen für Vorschläge

ReneNulschDE commented 3 days ago

@Tigra16v : I strongly recommend to wait until the code has been merged into the official repo, especially if you have not yet gained so much experience. (My code example was just for testing for "experienced users" and to validate my tests).

If you can't/won't wait, click on this link and copy the complete content into the service/AppAbfallplusDe.py. Then restart HA.

Translated with DeepL.com (free version)

@Tigra16v : Ich empfehle dringend zu warten bis der Code in das offizielle Repo eingeflossen ist, speziell wenn Du noch nicht so viel Erfahrung gesammelt hast. (Mein Code Beispiel war nur zum Testen für "erfahrene User" und zur Validierung meiner Arbeit.)

Wenn Du nicht warten kannst/willst, klicke auf diesen Link und kopiere den kompletten Inhalt in die service/AppAbfallplusDe.py. Starte danach HA neu.

Tigra16v commented 3 days ago

It's done. I've got it working now. I copied the file into the directory again using the command line. Now everything works. Great 👍 Thank you for the help!

AndiHaas85 commented 3 days ago

@ReneNulschDE thanks for your work

tried your AppAbfallplusDe.py and it worked for me too

chrizzo84 commented 2 days ago

I spend some more hours on this topic. Here is a code that can be checked. (The code is not final but a starting point.)

Changes:

  • Custom request header structure for the first request
  • Not more than one request per second
Testing source app_abfallplus_de ...
  found 84 entries for de.k4systems.abfallappnf Ahrenviöl alle Straßen
  found 26 entries for de.albagroup.app Braunschweig Hauptstraße 7A  
  found 70 entries for de.k4systems.bonnorange Auf dem Hügel
  found 139 entries for de.ucom.abfallavr Brühl Habichtstr. 4A
  found 45 entries for de.k4systems.abfallappwug Bergen hauptstr. 1
  found 78 entries for de.k4systems.abfallappcux Wurster Nordseeküste Aakweg Alle Hausnummern
  found 40 entries for de.abfallwecker Mutzschen, Am Lindigt 1
  found 48 entries for de.k4systems.leipziglk Brandis Brandis
  found 46 entries for de.k4systems.leipziglk Machern Machern
  found 64 entries for de.k4systems.lkgoettingen, Abfallwirtschaft Altkreis Göttingen,  Adelebsen, Alle Straßen

manual testing (abfallappzak - Fischen, lkemmendingen - Biederbach, abfallinfoapp - Weilerswist) image

Thx a lot!! Also working for me :)

specularius commented 1 day ago

tried the modified AppAbfallplusDe.py. And bingo it works for me...

ronnyadam commented 1 day ago

the modified AppAbfallplusDe.py also works for me, thx!

`waste_collection_schedule: sources:

anderl78 commented 9 hours ago

Hmm, is it just me, but the integration stopped working again here... the sensores became"unknown" since yesterday during the afternoon

anderl78 commented 6 hours ago

It's working again... I have changed the address, then did a HA restart = Data for the changed address (only one street away from my home) are there. Then changed back to my address, reboot and the data is back... did even a waste_collection_schedule.fetch_data' withouta problem

tgessendorfer commented 6 hours ago

Had same issue here and found this since had 'unknown' waste sensors since around 7days...

The updated .py file fixed it as well for me! Thanks!

sources:

  • name: app_abfallplus_de args: app_id: de.k4systems.zawdw city: Hengersberg strasse: ABC hnr: 0815