Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rova: 'Paper/Papier recognized as PMD' #399

Open
JanTjalling opened this issue May 21, 2023 · 6 comments
Open

Rova: 'Paper/Papier recognized as PMD' #399

JanTjalling opened this issue May 21, 2023 · 6 comments

Comments

@JanTjalling
Copy link

JanTjalling commented May 21, 2023

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 JanTjalling changed the title Rova: 'Papier recognized as PMD' Rova: 'Paper/Papier recognized as PMD' May 21, 2023
@pippyn
Copy link
Owner

pippyn commented May 22, 2023

Do you have an address for me to test with?

@JanTjalling
Copy link
Author

Postalcode 8333DT
Housenumber 25

@pippyn
Copy link
Owner

pippyn commented Jun 1, 2023

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.

@JanTjalling
Copy link
Author

JanTjalling commented Jun 1, 2023

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

@amink1-nl
Copy link

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

@JanTjalling
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants