UKBinCollectionData: Selenium based councils don't seem to work in HASS

Home Assistant Version

2023.10.3

Installation Method

Using HACS

Name of Council (if relevant)

East Suffolk Council

Issue Information

Selenium based councils never create entities.

Using the custom deps deployment addon for hass i’ve made sure that chromium-chromedriver alpine package is installed.

Manually going into the hass container run by HassOS and using python works fine:

$ docker exec -it homeassistant bash      
homeassistant:/config# python3
Python 3.11.5 (main, Sep 28 2023, 17:11:18) [GCC 12.2.1 20220924] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from uk_bin_collection.uk_bin_collection.collect_data import UKBinCollectionApp
>>> bins = UKBinCollectionApp()
>>> bins.set_args(["--postcode=ip119fj","--uprn=10093544720","EastSuffolkCouncil","https://my.eastsuffolk.gov.uk/service/Bin_collection_dates_finder"])
>>> bins.run()
'{\n    "bins": [\n        {\n            "type": "General waste",\n            "collectionDate": "20/10/2023"\n        },\n        {\n            "type": "Recycling",\n            "collectionDate": "27/10/2023"\n        }\n    ]\n}'

Try adding any selenium based council into hass and you will not get entities; non-selenium based options work fine (for testing I used North Lanarkshire)

Verification

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Perfect, I’ll work on a PR to implement that plan

I wonder if @frenck would be open to having chromium added to home-assistant/docker@master/Dockerfile

apk add chromium

@bfayers - you could test this by cloneing the repo for HASS Docker - adding the line to the dockerfile and doing a docker build - this would then create an image locally for you to start the container - but obviously dont impact your existing hass install

I had already installed the chromium and chromium-chromedriver apk packages with the custom deps deployment addon for hass, prior to opening this issue.

We won’t add things to our images that we don’t use in our core ourselves.