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

Jointwastesolutions_org.py support for Surrey Heath #1131

Open
CacheMinimal opened this issue Aug 2, 2023 · 8 comments
Open

Jointwastesolutions_org.py support for Surrey Heath #1131

CacheMinimal opened this issue Aug 2, 2023 · 8 comments
Labels
source request Request to add a new source

Comments

@CacheMinimal
Copy link

Joint Waste Solutions appear to provide waste collections for the Surrey boroughs of Woking, Elmbridge, Mole Valley and Surrey Heath. The current jointwastesolutions_org.py source currently only supports the Woking borough due to the refer URL passed into the various calls and/or headers.

I have edited the script and tested it with an address in Surrey Heath, requiring the four POST/GET calls and two header parameters to be updated from:

https://asjwsw-wrpwokingmunicipal-live.whitespacews.com/

to:

https://asjwsw-wrpsurreyheathmunicipal-live.whitespacews.com/

Sadly there is no easy way (that I know of) to determine which borough a postcode is in. Therefore my solution would be to rename jointwastesolutions_org.py to woking_gov_uk.py and create a second source of surreyheath_gov_uk.py with the updated URL and description. This way the Home Assistant end-user can determine who they pay their Council Tax to.

If this sounds like a good plan, I can possibly have a go at a PR for it?

Thanks for your contributions to making Home Assistant really useful.

Ian.

@5ila5
Copy link
Collaborator

5ila5 commented Aug 2, 2023

You're right it works with Surrey Heath as well but Elmbridge and Mole Valley use a different System and just changing the URL does not seem to work.

it's a pretty fresh source #1124 and not yet part of any release we could add an additional parameter to change the url
(maybe with Woking as default)

@5ila5
Copy link
Collaborator

5ila5 commented Aug 2, 2023

Did you find any easy way for Elmbridge or Mole Valley? Any improvements for the Source? If not I would just merge my changes suggested in #1132

@dt215git
Copy link
Contributor

dt215git commented Aug 2, 2023

There's already a source for Elmbridge.
I'm assuming all four councils will migrate to JWS over time as the JWS website currently redirects to the separate councils collection query websites, which seems odd for a consolidated service. That's why I named it JWS rather than Woking, but if you want to change things, I've no problem with that.
Back when the Elmbridge source was written I don't remember seeing any reference to JWS.

@CacheMinimal
Copy link
Author

I didn't manage to find any easy way for Elmbridge or Mole Valley. Although it is the same company providing the service, these two boroughs seem to use a different web UI. It appears there are only two UIs to scrape for the information; the Woking/Surrey Heath and Elmbridge/Mole Valley ones.

Not sure what the best way of handling this is?

@5ila5
Copy link
Collaborator

5ila5 commented Aug 3, 2023

I merged #1132 which adds support for Surrey Heath Elmbridge got it's own source.

We could write an additional source for Mole Valley.

If Mole Valley or Elmbridge ever change to the other system/UI they are already supported by the Jointwastesolutions_org source and we can just update the EXTRA_INFO variable and add them to the md file

@5ila5 5ila5 added the source request Request to add a new source label Aug 14, 2023
@bushbrother
Copy link

bushbrother commented Sep 11, 2024

Hi, it seems the elmbridge pages are stuck in July and are no longer updating on the normal pages, it shows as 300+ days to my next collection due to this! Looks like they may have swapped to this new source?

This page shows correct data:

https://elmbridge-self.achieveservice.com/AchieveForms/?mode=fill&consentMessage=yes&form_uri=sandbox-publish://AF-Process-be7d38c3-325c-4028-95c9-140e896d3ad4/AF-Stage-6ee0ea94-54aa-4c8b-9286-08c91e00b4b0/definition.json&process=1&process_uri=sandbox-processes://AF-Process-be7d38c3-325c-4028-95c9-140e896d3ad4&process_id=AF-Process-be7d38c3-325c-4028-95c9-140e896d3ad4

This one doesn't seem to update anymore:

https://emaps.elmbridge.gov.uk/myElmbridge.aspx?tab=0

@5ila5
Copy link
Collaborator

5ila5 commented Sep 27, 2024

I fixed Elmbridge in #2757

This will be part of the next release or is available now as master (git) version

install master/git: Developer tools -> actions -> select update: Install update -> click Coose entity and select WCS -> select version and type master in the input field -> run the action -> restart HA

Older versions of HACS:

install master with HACS version < 2.0: (3-dot menu -> redownload -> change version to master -> fully restart HA (this will increase update cycle by a lot)

@bushbrother
Copy link

bushbrother commented Sep 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source request Request to add a new source
Projects
None yet
Development

No branches or pull requests

4 participants