Skip to content

feat: Migrate to new waste portal authentication system for fylde_gov_uk#5300

Open
j-webb wants to merge 1 commit intomampfes:masterfrom
j-webb:master
Open

feat: Migrate to new waste portal authentication system for fylde_gov_uk#5300
j-webb wants to merge 1 commit intomampfes:masterfrom
j-webb:master

Conversation

@j-webb
Copy link
Contributor

@j-webb j-webb commented Jan 6, 2026

Fylde Council migrated from a simple API endpoint to a new authenticated waste portal. This updated source now authenticates via email/password and extracts collection data from embedded JavaScript, from a "Syncfusion Schedule" component.

Changes:

  • Add email/password auth logic
  • Extract schedule data from server-rendered JavaScript
  • Make UPRN optional (only required if user has multiple properties in the waste portal)
  • Add GUI configuration helpers for better UX (inspired by the greyhound.ie source)
  • Improved regex for flexible bin type extraction

Test output:

Testing source fylde_gov_uk ...
  found 50 entries for Test1
    2025-10-10 : Grey Bin [mdi:trash-can]
    2025-10-17 : Blue Bin [mdi:recycle]
    2025-10-17 : Brown Bin [mdi:recycle]
    ...
    2026-03-27 : Grey Bin [mdi:trash-can]
    2026-04-03 : Blue Bin [mdi:recycle]
    2026-04-03 : Brown Bin [mdi:recycle]
  found 50 entries for Test2
    2025-10-10 : Grey Bin [mdi:trash-can]
    2025-10-17 : Blue Bin [mdi:recycle]
    2025-10-17 : Brown Bin [mdi:recycle]
    ...
    2026-03-27 : Grey Bin [mdi:trash-can]
    2026-04-03 : Blue Bin [mdi:recycle]
    2026-04-03 : Brown Bin [mdi:recycle]

Also tested on my local HA instance.

Note: There are some breaking changes.
Users will need to update their configuration to use email/password instead of just UPRN. To create a username and password, they must:

  1. Register at https://waste.fylde.gov.uk/
  2. Add a property to their account
  3. Update configuration with email/password credentials
    The original uprn parameter is still supported, but is now optional.

Fylde Council migrated from a simple API endpoint to a new authenticated waste portal.
This updated source now authenticates via email/password and extracts collection data
from embedded JavaScript, from a "Syncfusion Schedule" component.

Changes:
- Add email/password auth logic
- Extract schedule data from server-rendered JavaScript
- Make UPRN optional (only required if user has multiple properties in the waste portal)
- Add GUI configuration helpers for better UX (inspired by the `greyhound.ie` source)
- Improved regex for flexible bin type extraction
icon=ICON_MAP.get(jobName),
date=collection_date,
t=bin_type,
icon=ICON_MAP.get(bin_type),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the ICON_MAP still valid?

the regexp searches for :GREY|GREEN|BROWN|BLUE)\s+(?:BIN|BAG|BOX

but

ICON_MAP = {
    "Grey Bin": "mdi:trash-can",
    "Green Bin": "mdi:leaf",
    "Green Box": "mdi:recycle",
}

contains only 3 Items.

maybe use default Icon?

@bbr111 bbr111 self-assigned this Jan 27, 2026
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

Successfully merging this pull request may close these issues.

2 participants