Open OnSive opened 1 week ago
Same here with these settings
waste_collection_schedule:
sources:
- name: app_abfallplus_de
args:
app_id: de.k4systems.lkemmendingen
city: Biederbach
strasse: Alle Straßen
That's quite a neat bug. Did some initial digging: The app does return the correct data, but the reverse engineered way returns this super weird data (I do not know who's names these are and why they are returned here).
Debugging this is pretty annoying, as it's often not quite clear what went wrong exactly. I already did some trial and error but without success. I will take a deeper look in the coming days.
@5ila5 can you give me a hint where to start debugging? Couldn't find a starting point as first time user of ha and waste collection schedule.
Btw. I hope that those are not real people as there would be way to many less then 18 year old people in a waste collector database imo...
To compare the calls made by the source with the request of the real app, you need: an android (vm?) or IOS (don't know hot this works) device where you can inspect the traffic made by the phone (I use Http Toolkit to inspect the traffic made by my android VM running inside Android Studio)
Some changes like the User-Angent and client ID were made with an IPhone (as far as I can tell). But I tried to change them (Andoird has 2 different User-Agents for different requests and client_id must be 5 separate sections instead of one long integer string) and it did not solve anything, so I think the error is probably somewhere else.
@5ila5 thanks that's helpful, maybe i can find a hint to the bug. Got the dev env running 👍
I put together the requests that are made by the app. https://gist.github.com/5ila5/205672118616e30a2eaccbc89db42df4 Running this returns the XML with the names instead of the bin types, the app gets another XML (with the correct bin types), I do not find the difference between these requests and those made by the app.
BTW, I suggest you complain to your local council (that is responsible for this public service) about this data being gated behind a private company that actively tries to prevent citizens from accessing it.
The same Problem with these settings:
waste_collection_schedule: sources:
two days ago everything was still going.
Also the same for my city.
waste_collection_schedule: sources:
And here the same too. Waste collection schedulde is not running anymore:
waste_collection_schedule: sources:
@HenryLoenwind pretty sure that this is a issue with the HA Plugin and not the data provider. The apps from the waste companies runs pretty fine here and shows the right data.
Same issue for Rastatt (Abfallplus). Getting Names with Numbers
My sensors are all "unknown" since 29th of june...
waste_collection_schedule:
sources:
- name: app_abfallplus_de
args:
app_id: de.k4systems.abfallappbh
city: Au
strasse: Alle Straßen
Same here for:
- name: app_abfallplus_de args: app_id: de.k4systems.abfallappbh
Looks to me like birthdays....
@ReneNulschDE in my region de.k4systems.zawdw
I did not get strange names, but calendar was empty (sometimes a strange date for a single event). I changed the code before the self.get_collections()
call to set self._client
to an id, that I sniffed from the app and sure enough, the calendar was filled up again. So there seems to be a problem in the set-up phase. I tested your changes but they did not fix the problem.
My sensors are all "unknown" since 29th of june...
waste_collection_schedule: sources: - name: app_abfallplus_de args: app_id: de.k4systems.abfallappbh city: Au strasse: Alle Straßen
In your case i would suggest to check the log. I had the same (sensors going to unknown) a couple of days ago. In the logs i could see that my provider (also app_abfallplus_de) changed the required parameters for the config. The log said "Alle Straßen" is not a valid street name. And then gave a list of all the streetnames of my city.
btw thanks who ever is responsible for putting that return into the log. Very helpfull.
It was like in your case
city: real_city_name strasse: Alle Straßen (all streets)
and is now city: real_city_name strasse: real_street_name hsnr: real_number
I don't know if it helps, but from the looks of things on my end, abfallplus is still changing things atm.
2 days ago i did not have the name problem like the OP, but fantasy dates for the pickup. (between 60 and 200+ days in the future) on my sensors.
Now they are all unknown.
And as i said in the above post. 2-3 weeks ago the config for my city street changed. But this of course, could be a "normal" update on their side.
My sensors are all "unknown" since 29th of june...
waste_collection_schedule: sources: - name: app_abfallplus_de args: app_id: de.k4systems.abfallappbh city: Au strasse: Alle Straßen
In your case i would suggest to check the log. I had the same (sensors going to unknown) a couple of days ago. In the logs i could see that my provider (also app_abfallplus_de) changed the required parameters for the config. The log said "Alle Straßen" is not a valid street name. And then gave a list of all the streetnames of my city.
btw thanks who ever is responsible for putting that return into the log. Very helpfull.
It was like in your case
city: real_city_name strasse: Alle Straßen (all streets)
and is now city: real_city_name strasse: real_street_name hsnr: real_number
Thank you for the input! In their App its still "Alle Straßen" (all streets) in my case. Furthermore, nothing noticable in the logs:
2024-06-30 23:07:14.640 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration waste_collection_schedule which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-30 23:07:22.509 INFO (MainThread) [homeassistant.setup] Setting up waste_collection_schedule
2024-06-30 23:07:32.575 WARNING (MainThread) [homeassistant.setup] Setup of waste_collection_schedule is taking over 10 seconds.
2024-06-30 23:07:44.093 INFO (MainThread) [homeassistant.setup] Setup of domain waste_collection_schedule took 21.58 seconds
2024-06-30 23:07:44.095 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_collection_schedule.sensor
2024-06-30 23:07:44.116 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_collection_schedule.sensor
2024-06-30 23:07:44.119 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_collection_schedule.sensor
2024-06-30 23:07:44.131 INFO (MainThread) [homeassistant.components.sensor] Setting up waste_collection_schedule.sensor
2024-06-30 23:07:55.478 INFO (MainThread) [homeassistant.components.calendar] Setting up waste_collection_schedule.calendar
Yesterday I wrote an e-mail to support@abfallplus.de and explained the API problem getting person names back.
But till now I got no feedback, but it looks that someone is playing arround with the data, today I get "unkown" back.
Have a look to the data update date/time:
Same for me. After I tried it with street and house number and then undid it, I no longer have any names with numbers, just "unknown".
For me too.... I get only "unknown"
Crazy, but after a restart for other reasons its working as expected, witout changes.
waste_collection_schedule: sources:
I found the solution. At least in my case it works. I noticed that the sensor calendar.apps_by_abfall was present multiple times. calendar.apps_by_abfall_1 calendar.apps_by_abfall_2 and so on. After I deleted all but one and restarted home assistant everything works again.
(In Settings -> Devices and services -> Entities)
My calendar is empty meanwhile without any entry...
Crazy, but after a restart for other reasons its working as expected, witout changes.
waste_collection_schedule: sources:
- name: app_abfallplus_de args: app_id: de.k4systems.abfallinfoapp city: Weilerswist
Doesn't work for me... after reboot still "unknow"
I found the solution. At least in my case it works. I noticed that the sensor calendar.apps_by_abfall was present multiple times. calendar.apps_by_abfall_1 calendar.apps_by_abfall_2 and so on. After I deleted all but one and restarted home assistant everything works again.
(In Settings -> Devices and services -> Entities)
Thank you. I got the clones too. Deleted them too, followed by a reboot - but still the same problem : state of my sensors is still "unknown"
I found the solution. At least in my case it works. I noticed that the sensor calendar.apps_by_abfall was present multiple times. calendar.apps_by_abfall_1 calendar.apps_by_abfall_2 and so on. After I deleted all but one and restarted home assistant everything works again. (In Settings -> Devices and services -> Entities)
Thank you. I got the clones too. Deleted them too, followed by a reboot - but still the same problem : state of my sensors is still "unknown"
Same for me. No change after removing duplicates...
Oh, I just tested the abfallplus-app on my phone - it works without any problem... I even changed street and Number to see if it really gets new data...changed back, got my data back. Even checked there website - works well, all data is present there.
I found the solution. At least in my case it works. I noticed that the sensor calendar.apps_by_abfall was present multiple times. calendar.apps_by_abfall_1 calendar.apps_by_abfall_2 and so on. After I deleted all but one and restarted home assistant everything works again.
(In Settings -> Devices and services -> Entities)
Thank you. I got the clones too. Deleted them too, followed by a reboot - but still the same problem : state of my sensors is still "unknown"
The sensor that is left must not have a number at the end. Otherwise it must be renamed. It must be called calendar.apps_by_abfall.
The sensor that is left must not have a number at the end. Otherwise it must be renamed. It must be called calendar.apps_by_abfall.
I did exactly this. No change, still "unknown"
The sensor that is left must not have a number at the end. Otherwise it must be renamed. It must be called calendar.apps_by_abfall.
I did exactly this. No change, still "unknown"
I'm sorry. It helped me. Then there are probably other reasons. I wish you continued luck
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:
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)
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)
Hello!
Thank you very much! Seems to fix the Problem for me!
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.)
Thanks a lot, this fixes the issue also for me. Before i have had the strange entries with names and since monday an empty schedule. Clearing the double calendar.apps_by_abfall entries did not changed anything.
After HA restart, I got this errors:
Moving back to the original file, no errors showed, but still get "unkown".
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
Solved the problem in my case as well! Thank you!!
@AKGitH : Your screenshot does not show the error message. Please share the log entry and your config.
Hi "ReneNulschDE", I have downloaded the py-file again and now it works. Great Job!
For your information: I use:
-name: app_abfallplus_de
-app_id: de.ucom.abfallavr
Many thanks!
Btw, in case you need the information, Im using: name: app_abfallplus_de app_id: de.k4systems.zawdw
@ReneNulschDE
Solved the problem also in my case as well! Thank you!!
name: app_abfallplus_de app_id: de.idcontor.abfalllu
Many thanks again
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)
THAT solved it for me. Thanks a lot @ReneNulschDE
After the last core update I have the problem again. (sensor status unknown) Since I'm still a complete beginner and my English isn't great, I honestly don't understand what exactly solved the problem for you. Can someone please explain to me what exactly I need to do?
Or is there anything wrong with explaining it to me in German? As far as I can see, everyone here is German, right?
@Tigra16v You have to replace the content of the file AppAbfallplusDe.py with this: https://github.com/mampfes/hacs_waste_collection_schedule/commit/6051222586494d6e31c1e1bf37542e91dc780815
ok. and how exactly do I do that? I can't copy the text in the link (in the github app).
Press the Link, then Press the tree Points:
Press "View File" Press "Copy raw file" Paste in Homeassistant...
@Tigra16v You have to replace the content of the file AppAbfallplusDe.py with this: 6051222
worked. thank you!
OK. I got it working. But via the browser and not in the app. But now nothing works. The sensors are no longer available and I get the following error message
Logger: homeassistant.setup Quelle: setup.py:485 Erstmals aufgetreten: 17:22:14 (5 Vorkommnisse) Zuletzt protokolliert: 17:22:14
Unable to prepare setup for platform 'waste_collection_schedule.sensor': Unable to set up component.
@Tigra16v I think your AppAbfallplusDe.py is not correct, are you sure that you did the copy and replace correct.
@ReneNulschDE thanks for your effort and support, your update works fine for me
At least I'm not aware of what I did wrong. I also get the following error message:Logger: homeassistant.setup Quelle: setup.py:404 Erstmals aufgetreten: 18:25:35 (1 Vorkommnisse) Zuletzt protokolliert: 18:25:35
Error during setup of component waste_collection_schedule
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component
result = await task
^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/init.py", line 113, in async_setup
await hass.async_add_executor_job(
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, *self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/init.py", line 201, in add_source_shell
new_shell = SourceShell.create(
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 204, in create
source_module = importlib.import_module(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
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](https://github.com/mampfes/hacs_waste_collection_schedule/assets/55302242/353201a8-10a1-4449-ac07-89fa2adb1270)
Source (if relevant)
app_abfallplus_de / ZAK Abfall App
Logs
Relevant Configuration
Sensor (you can use the following wizard:
custom_components/waste_collection_schedule/waste_collection_schedule/wizard/app_abfallplus_de.py
)Checklist Source Error
Checklist Sensor Error
Required