Home-Assistant-Sensor-Afvalbeheer icon indicating copy to clipboard operation
Home-Assistant-Sensor-Afvalbeheer copied to clipboard

Rova: 'Paper/Papier recognized as PMD'

Open JanTjalling opened this issue 1 year ago • 6 comments

Rova API is sending 'Paper' with garbageType "PD" in json payload. {"index":21,"garbageTypeCode":"PD","garbageType":"Los papier","date":"2023-05-25T00:00:00Z","regular":true}

in API.py PD is defined as WASTE_TYPE_PACKAGES not as WASTE_TYPE_PAPER

Result: Pickup is shown as PMD, not Paper and the calendar also shows this as PMD.

Fix: I believe, not sure of effect on other collectors in "Afvalwijzercollector",
is changeing the waste_type_mapping for 'pd' to WASTE_TYPE_PAPER. At least this is what made it work for me

JanTjalling avatar May 21 '23 13:05 JanTjalling

Do you have an address for me to test with?

pippyn avatar May 22 '23 07:05 pippyn

Postalcode 8333DT Housenumber 25

JanTjalling avatar May 22 '23 22:05 JanTjalling

This is an issue with the waste collectors naming. As the fraction PD is always known as "Plastic en Drankenkarton afval" and not "Los papier". Therefore I'm reluctant to change the mapping of this sensor, because this will change the fraction also for a lot of other people to paper (when it should not).

About handling this issue; I'm not sure what we can do.. You can always change the name yourself in HA, but that will not work for the today and tomorrow sensors.

pippyn avatar Jun 01 '23 07:06 pippyn

Hi

If you allow me, I could see 2 directions to work on this: A. Specific to 'ROVA' Wouldn't this be a 'ROVA' wide issue?, and thus in the 'Afvalwijzercollector' make a branch specific for Rova

B. Local setttings file Generic to any collector make a local settings file, that if present overrules the setting in distributed files

Now I made my correction direct in the distributed file and will be overwriten with each update.

Just a thought, happy to test together

JanTjalling avatar Jun 01 '23 20:06 JanTjalling

I have the same problem with ROVA but how can i solve it?

amink1-nl avatar Mar 11 '24 18:03 amink1-nl

For me it was solved as of Jan 2024. Rova in my area started reporting paper collection with the right code.

Previously I had edited the API.py file, to chenge the way the returned (incorreclty) code was considered in the API. Correcting for the incorrect usage. I had to apply this fix each time I updated the version - or skip a version :-)

I used a manual API call to find out which code was send https://www.rova.nl/api/waste-calendar/upcoming?postalcode=[POSTALCODE]&houseNumber=[HOUSENUMBER]&addition=&take=5

And use this to correct the code interpretation in API.py

Crude, but effective.

JanTjalling avatar Mar 31 '24 14:03 JanTjalling