pippyn / Home-Assistant-Sensor-Afvalbeheer

Provides Home Assistant sensors for multiple Dutch and Belgium waste collectors
Apache License 2.0
272 stars 85 forks source link

RecycleApp: My street is no longer recognized #466

Closed JasperMaes closed 6 months ago

JasperMaes commented 6 months ago

Hi,

My street is no longer recognized since somewere today/yesterday (I didn't really notice until now) when using the RecycleApp waste collector. The error message I receive is: _Invalid response from server for streetid. When I use the RecyleApp website it still works, when I use another street name from around the corner it also works. It's only my street that seems to be an issue.

I'm running the latest version that was released today but also had the issue in the previous version (I upgraded in an attempt to fix the problem).

Do you have any idea what could be the cause? Maybe because it has a '-' in the name?

Kind regards,

Jasper

pippyn commented 6 months ago

Please share your config and an address to test with

JasperMaes commented 6 months ago

I've tried to disable as much as possible for testing. My address is: Sint- 8, postal code 1851. An address around the corner, oostvaartdijk 415 works without issues.

afvalbeheer:
  wastecollector: RecycleApp
  resources:
    - restafval
    - gft
    - papier
    - pmd
  postcode: 1851
  streetnumber: 8
  streetname: Sint-<abcdefg>
pippyn commented 6 months ago

Did you try this:

afvalbeheer:
  wastecollector: RecycleApp
  resources:
    - restafval
    - gft
    - papier
    - pmd
  postcode: 1851
  streetnumber: 8
  streetname: "Sint-Michaelshof"
JasperMaes commented 6 months ago

Thank you for the suggestion. Unfortunately it doesn't solve the problem.

nathan-gs commented 6 months ago

Exactly the same issue here, with an address in Ghent (zip: 9042), my street also has a "-". Using a nearby street it does work.

Ps. It used to work in version 5.2.8 and stopped working when I upgraded to 5.2.14 (currently on 5.3.1)

pippyn commented 6 months ago

When you downgrade to to 5.2.8 does it work again? I'll dive into this issue tomorrow

nathan-gs commented 6 months ago

(no hurry, the workaround of a neighboring street works well)

nathan-gs commented 6 months ago

Unfortunately a downgrade to 5.2.8 gives following error Invalid response from server for accessToken

pippyn commented 6 months ago

There is a problem with their API. A dash in the street name is no longer accepted. There also seems no way to escape it in the code. However the full street name is not required. So the following config works as expected.

afvalbeheer:
  - wastecollector: RecycleApp
    resources:
      - restafval
      - gft
      - papier
      - pmd
    postcode: 1851
    streetnumber: 8
    streetname: Michaelshof
JasperMaes commented 6 months ago

Thank you for looking into this so quickly.