Open Sergeant-Steve opened 5 days ago
@Sergeant-Steve If you are setting up Renfrewshire Council, you will need to provide a URL for Selenium
https://github.com/robbrad/UKBinCollectionData/wiki/Councils#renfrewshire-council
I was under the impression that the "Run Selenium in Headless mode" tick box kinda did that for you, and that running your own Selenium Server instance was optional in case you already used it for something else.
So what you're saying is I need to run my own version of Selenium somewhere else other than in Home Assistant and input the URL & port under the "Remote selenium server" box?
@Sergeant-Steve There is multiple ways to run Selenium but essentially yeah.
Lots of examples here - https://github.com/robbrad/UKBinCollectionData?tab=readme-ov-file#selenium
So I've installed Selenium along with chromium & chromium-chromedriver packages via the AppDaemon Add-on in Home Assistant, but now I get the following:
Logger: custom_components.uk_bin_collection.sensor
Source: helpers/update_coordinator.py:354
integration: UK Bin Collection Data (documentation, issues)
First occurred: 19:39:56 (9 occurrences)
Last logged: 20:00:14
Unexpected error fetching xxxxxx data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/uk_bin_collection/sensor.py", line 172, in _async_update_data
data = await self.hass.async_add_executor_job(self.ukbcd.run)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 101, in run
return self.client_code(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 121, in client_code
return get_bin_data_class.template_method(address_url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 61, in template_method
bin_data_dict = self.get_and_parse_data(this_url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 84, in get_and_parse_data
bin_data_dict = self.parse_data("", url=address_url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/councils/RenfrewshireCouncil.py", line 30, in parse_data
driver = create_webdriver(web_driver, headless, None, __name__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/common.py", line 323, in create_webdriver
return webdriver.Remote(command_executor=web_driver, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 212, in __init__
self.start_session(capabilities)
File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 299, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 354, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: 405: Method Not Allowed
I set the remote Selenium Server to http://127.0.0.1:5050
which is the default port AppDaemon programs itself onto, and I even tried using http://localhost:5050/wd/hub
with the same error message.
I'm not sure if this is a restriction in AppDaemon, or something else I've misconfigured somewhere.
Same issue but for Dover District Council, was working fine and then last updated it stopped working. I've rolled back to v0.103 and it's working again.
Home Assistant Version
2024.10.3
Installation Method
Using HACS
Name of Council (if relevant)
Renfrewshire
Issue Information
Fresh install using the latest version (0.104.0, published 14/15 hours ago or so) does not load any information and shows errors in the logs:
Running Home Assistant OS on a Raspberry Pi 4, I believe I followed the correct setup procedure, and didn't tick any boxes that weren't ticked by default, or enter any custom URL's for Selenium.
Verification