I’m still unfortunately having problems with Forest of Dean…although I’m wondering if the problem is with my Selenium installation.
I thought I’d turn on debugging and then analyse through VNC what was happening with Selenium.
It turns out I’m getting an error (see the image here): fbsetbg: Something went wrong while setting the wallpaper. Run ‘Esetroot -c /usr/share/images/fluxbox/ubuntu-light.png’ from an xterm to find out what suggests there’s a problem with the wallpaper setting process
I know this isn’t strictly relating to this, but does anyone know how I might be able to resolve (I’ve got Selenium loaded in Portainer, which is stored as an add-on in my HA instance).
This is the extract of the error in the code I’m getting:
`File “/config/custom_components/uk_bin_collection/init.py”, line 323, in _async_update_data raise UpdateFailed(f"Timeout while updating data: {exc}") from exc homeassistant.helpers.update_coordinator.UpdateFailed: Timeout while updating data:
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File “/config/custom_components/uk_bin_collection/init.py”, line 190, in async_setup_entry await coordinator.async_config_entry_first_refresh() File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 314, in async_config_entry_first_refresh raise ex`
Hi Robbrad
ok, my setup is currently home assistant on a Win 11 PC running Hyper-v. would I be able to run Selenium on this setup?
having issues trying to understand how to setup & whether it would be possible
thanks
Chelmsford council stopped working for me, three items in logs (headlines below). Council website (myhome - Chelmsford City Council) when testing directly is quick to respond compared to the past. Any ideas? Thanks.
[UKBinCollection] Unexpected error: HTTPConnectionPool(host=‘192.168.0.63’, port=4444): Max retries exceeded with url: /session/5b0ccc202dc5c5c8774ec152b40bf262 (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x1475c207b890>: Failed to establish a new connection: [Errno 111] Connection refused’))
Should I raise this as a fault on github?
I’ve been doing what (little) I can to try to determine the cause of the issue.
Created a test setup to muck about with (unraid server with HA & standalone-chrome dockers).
Using a script I found online I was able to run this from a standalone PC and confirm Selenium received & acted upon the request (viewed in VNC). Which I believe proves the selenium docker is working & is accessible.
To ensure the HA docker can connected to selenium, uploaded the same script to HA config folder, and run it from the HA docker CLI. And again it worked. So this excludes any networking issues between HA & selenium on unraid.
But whenever the HA integration runs, although a session is created in selenium, the VNC is just blank screen (unticked run in headless mode)
from selenium import webdriver
import time
print(“Test Execution Started”)
options = webdriver.ChromeOptions()
options.add_argument(‘–ignore-ssl-errors=yes’)
options.add_argument(‘–ignore-certificate-errors’)
driver = webdriver.Remote(
command_executor=‘http://192.168.0.148:4444/wd/hub’,
options=options
) #maximize the window size
driver.maximize_window()
time.sleep(10) #navigate to browserstack.com
driver.get(“https://www.browserstack.com/”)
time.sleep(10) #click on the Get started for free button
driver.find_element_by_link_text(“Get started free”).click()
time.sleep(10) #close the browser
driver.close()
driver.quit()
print(“Test Execution Successfully Completed!”)
Hi All. While trying to set this up, what URL are you supposed to use?
When I try the URL I enter here directly in my browser, with my UPRN, I see a correct JSON response.
When I use the same URL (see image) I see error in logs saying “* [UKBinCollection] Unexpected error in async_setup_entry: Unexpected error: HTTPSConnectionPool(host=‘www.harrow.gov.uk%20-u%20’, port=443): Max retries exceeded with url: /?User-Agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F108.0.0.0+Safari%2F537.36 (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x7fda9a442e90>: Failed to establish a new connection: [Errno -2] Name does not resolve’))”


I know I am doing something silly, but can't figure it out!
Thanks!

There does seem to be an issue at the moment that does seem to be affecting a lot of councils. Somebody mentioned that it might be down to AWS blocking the default Python UserAgent, but I have no idea how to change that! Any tips?
I’m very happy for you to either copy that fix for your council, or to factor it out so that councils using requests to get their data fix share a common configuration with the custom user agent.
Hopefully, the UA I chose (“HomeAssistant UK Bin Collection integration”) makes it clear to any council that sees it that this is a good thing, not an evil bot.
For Ealing Council, since around 1500hrs 10th October, the integration is no longer providing the entities for the Blue recycling bin. The intergration is showing these as unavailable. The entities for the Food bin, the Black bin, and Garden Waste appear to be working fine though.
Is their website up and the relevant webpage unchanged? Have you checked their website yourself before raising a bug report? Council web developers like to tinker - sometimes with seasonal cheer at this time of year, with celebratory banners wishing you a merry season of confusion as your screen scraping integration falls over due to unexpected free text where carefully placed values are expected.
Are your bin schedules cancelled for a public holiday, and therefore showing as unavailable?
Hi there, has anyone managed to get Forest of Dean Council successfully working?
I’ve had lots of attempts and never got this working - it appears to time out in Selenium.
I’d be interested in knowing to try and find out if this is an issue at my end or not.