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

Problem with Republic schedule: Yard Waste misclassified as Recycle #1238

Closed
qbaza opened this issue Sep 5, 2023 · 6 comments
Closed

Problem with Republic schedule: Yard Waste misclassified as Recycle #1238

qbaza opened this issue Sep 5, 2023 · 6 comments

Comments

@qbaza
Copy link

qbaza commented Sep 5, 2023

Hi,

I realize this is not a problem with integration but rather with the source, but I wanted to ask for guidance.

I use here one of the addresses from the test, but I get the same thing on my residential address.

r = requests.get("https://www.republicservices.com/api/v1/addresses",
                    params={"addressLine1": "8957 Park Meadows Dr, Elk Grove, CA 95624"}
)
addr_hash = r.json()['data'][0]['addressHash']
r = requests.get("https://www.republicservices.com/api/v1/publicPickup",
                    params={'siteAddressHash' : addr_hash}
)
containers = r.json()['data']['contract']
# print(containers)
for c in containers:
    print('='*20)
    print(c['productDescription'])
    print(c['wasteTypeDescription'])
    print(c['nextServiceDays'])

and response:

====================
YARD WASTE CART 95/96 GAL
Recycle
['2023-09-12']
====================
RECYCLE CART 64/65 GAL
Recycle
['2023-09-19', '2023-10-03', '2023-10-17', '2023-10-31', '2023-11-14', '2023-11-28']
====================
TRASH CART 64/65 GAL
Solid Waste
['2023-09-12']
====================
UNIT
Solid Waste
[]

Notice how YARD WASTE CART 95/96 GAL is categorized as Recycle. This messes up some of my automations. Any suggestions how to fix it?

Also how to report this to Republic?

Thanks.

@dt215git
Copy link
Contributor

dt215git commented Sep 8, 2023

Any suggestions how to fix it?

I guess it depends on whether that misclassification is wrong for every instance of that collection type irrespective of which part of the country it occurs in, or not.

If it is, then it could probably be done in the script by making the scripts waste_type allocation conditional on both the returned productDesctiption and wasteTypeDescription. If the misclassifications varies region to region, then you'd have to extend that conditional to include some aspect of the address.

Better solution would be for Republic to fix it their side.

Also how to report this to Republic?

Via their website? https://www.republicservices.com/customer-support/contact-us

@TScalzott
Copy link

Same issue here, in Virginia, for what it is worth. productDescription appears to get mapped to waste_description in the script, but then it is dropped and not returned anywhere where we can use it.

@PapaMater
Copy link

PapaMater commented Sep 21, 2023

Ditto, greater Seattle area.

Looks to me like the final schedule is built with conditional on "recycle" first, then "yard", then assumed "waste". Seems to me simply reordering so that the primary if statement looks for yard, the events would be appropriately categorized. Lines 115 - 130 in republicservices_com.py

@qbaza
Copy link
Author

qbaza commented Sep 30, 2023

I have reported the issue to republic, but I don't have much hope that customer service would pass it to the engineers.

@TScalzott
Copy link

I have reported the issue to republic, but I don't have much hope that customer service would pass it to the engineers.

I have reported it as well, and share your lack of hope.

@5ila5
Copy link
Collaborator

5ila5 commented Nov 18, 2023

I Will close this as complete as there is nothing more we can do. You can now change the behaviour yourself since #1348 (part of next release 1.44.0 or master version (HACS: 3-dot menu -> re-download -> change version to master))

@5ila5 5ila5 closed this as completed Nov 18, 2023
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

5 participants