hacs_waste_collection_schedule icon indicating copy to clipboard operation
hacs_waste_collection_schedule copied to clipboard

[Service Provider Request] RMG Rohstoff Management GmbH / Kreis Euskirchen / Abfall.io

Open AlexSchmitz222 opened this issue 2 years ago • 9 comments

Recently, the Kreis Euskirchen changed it's Waste Collector from SCHOENMACKERS to RMG Rohstoffmanagement.

Since then, the MÜLLALARM App gave way for the "new" Abfallinfoapp (also provided by Abfall.IO) and the "download .ics" feature has been deleted from the website of my home county, thus I can't extract the required information anymore.

Would it be possible to add RMG Rohstoff Management to WCS?

AlexSchmitz222 avatar Aug 24 '22 08:08 AlexSchmitz222

Well I managed to get it to work by intercepting network traffic between the app and the server. Of course, that's not something for everyday so a better solultion might be needed. @mampfes If there's anything I can share with you, just tell me :)

AlexSchmitz222 avatar Aug 24 '22 11:08 AlexSchmitz222

Sure, for abfall.io we need the unique district ID: https://github.com/mampfes/hacs_waste_collection_schedule/blob/master/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/abfall_io.py

mampfes avatar Aug 27 '22 07:08 mampfes

Just to be curios: How did you manage to intercept the app traffic?

mampfes avatar Aug 27 '22 08:08 mampfes

ADB Debugging (with a rooted Testing device, altough Root Access isn't strictly necessary if you can enable ADB Debugging, IIRC) and HTTP Toolkit :) The Toolkit installs a "fake" Root Cert (thus this may not be used on a production phone ;) ) and creates a VPN Tunnel which is used to intercept the HTTPS requests

AlexSchmitz222 avatar Aug 27 '22 08:08 AlexSchmitz222

Btw. this is the App Key of the "Abfallinfoapp" App. I'm not quite sure if it is of any use for you tho. Screenshot_20220827-105109.jpg

AlexSchmitz222 avatar Aug 27 '22 08:08 AlexSchmitz222

I tried the key2 as district ID, but it doesn't return valid results 👎

mampfes avatar Aug 27 '22 09:08 mampfes

Where did you scrape the other District IDs from? Maybe I can go back into the app and scrape one there

AlexSchmitz222 avatar Aug 27 '22 19:08 AlexSchmitz222

As it seems to me, the App(s) (I've tested "Abfallinfoapp" and compared the setup process to the MüllALARM App, mentioned in the Wizard) do not use such a District ID at all. During the setup process, it uses a completely District ID Format (see here for the MüllALARM App: grafik

And here from the Abfallinfoapp App: grafik

I'll try to get a Python Script working

AlexSchmitz222 avatar Aug 27 '22 20:08 AlexSchmitz222

Where did you scrape the other District IDs from?

The IDs are extracted by intercepting the network traffic in a brower. Maybe the app(s) use a different API - then we have to write an extra "source".

mampfes avatar Aug 28 '22 09:08 mampfes

I added the app_abfallplus_de source with support for all apps by abfallplus including Abfallinfoapp. It will be part of release 1.43.0 or is available now as master/git version

5ila5 avatar Oct 09 '23 19:10 5ila5