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

Home Assisant - Not working for Leeds Council Since New Release. #493

Closed
4 tasks done
vishnurpatel opened this issue Dec 17, 2023 · 18 comments
Closed
4 tasks done

Home Assisant - Not working for Leeds Council Since New Release. #493

vishnurpatel opened this issue Dec 17, 2023 · 18 comments
Labels
bug Something isn't working home assistant custom component Something related to the home assistant custom component

Comments

@vishnurpatel
Copy link

vishnurpatel commented Dec 17, 2023

Home Assistant Version

2023.12

Installation Method

Using HACS

Name of Council (if relevant)

Leeds

Issue Information

Was working until i updated the HACS integration (UkBinCollection)
looking at the code i assume its because we have moved to used either UPRN or selenium?

i tried to install a previous version but dosent seem to be a supported feature with this add on.

Repo: try and use Leeds council returns 0 entities.

Verification

@vishnurpatel vishnurpatel added bug Something isn't working home assistant custom component Something related to the home assistant custom component labels Dec 17, 2023
@vishnurpatel
Copy link
Author

Note to self: Dont not update if everything is working fine

@robbrad
Copy link
Owner

robbrad commented Dec 17, 2023

@vishnurpatel the previous version was taking 3-4 minutes to download the ~150meg csv. We have been looking for ways to reduce this as a long standing issue.

Are you able to get this working with the new changes?

@robbrad
Copy link
Owner

robbrad commented Dec 17, 2023

Hold that thought - there is a bug in headless mode. Working on the fix now

@robbrad
Copy link
Owner

robbrad commented Dec 17, 2023

Reopening to wait for @vishnurpatel confirmation.

@robbrad
Copy link
Owner

robbrad commented Dec 17, 2023

Just some more justification for this change :

We only get 2000 free minutes of GitHub actions running time per month and 500mg - without reducing action time we were up to 30 mins per pipeline run - and id like to keep the project free.

@dp247 / @OliverCullimore FYI : https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions

@robbrad robbrad mentioned this issue Dec 17, 2023
3 tasks
@vishnurpatel
Copy link
Author

vishnurpatel commented Dec 17, 2023

Morning guys!
(surprised at the quick actions and response) :)

Still having issues after updating.
(last night when i logged the bug, i could still get a Manchester UPRN to work.
but Leeds now seems to be dead (providing a UPRN, Postcode & House no. as All are now required)

@dp247
Copy link
Collaborator

dp247 commented Dec 17, 2023

I actually installed HA Core this morning and also got no entities (I also don't understand HA words), but there's also no place to put the webdriver URL

@robbrad
Copy link
Owner

robbrad commented Dec 17, 2023

Works for me with the following (picked at random)

    "uprn": "72078487",
    "postcode": "LS8 5ER",
    
    and this from input.json 
    
    "uprn": "72041563",
    "postcode": "LS9 9JU"

@robbrad
Copy link
Owner

robbrad commented Dec 17, 2023

Ahh "web_driver": "http://selenium:4444",
is missing from the input.json

@robbrad
Copy link
Owner

robbrad commented Dec 17, 2023

Confirmed its working now

image

I added the following container and pointed the Selenium url at http://<server_ip>:4444

https://hub.docker.com/r/selenium/standalone-chrome

@robbrad robbrad reopened this Dec 17, 2023
@vishnurpatel
Copy link
Author

Resolved, had to spin up a docker running https://hub.docker.com/r/selenium/standalone-chrome
but yup, all working now.

thanks guys.

@dp247
Copy link
Collaborator

dp247 commented Dec 18, 2023

image

Is it usual to see this message all the time, or is it my standalone-chrome?

@vishnurpatel
Copy link
Author

image

Is it usual to see this message all the time, or is it my standalone-chrome?

Erm no, i have the same issue after rebooting. The Check My Bin Day site is up.
so not sure how its just broken again -_-
(deleted the Leeds Council entity in Home assistant, added it again with it pointing to selenium returning 0 entities again)

could just be an issue with Leeds council, as it was working fine like two hours ago.

@vishnurpatel
Copy link
Author

working fine for me this morning @dp247, how about you?

@vishnurpatel
Copy link
Author

vishnurpatel commented Dec 18, 2023

Edit, iv noticed the eneties seem to go "dead" after some time and stop reporting.
and show the message David posted.

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:361
Integration: Sensor (documentation, issues)
First occurred: 10:14:43 AM (3 occurrences)
Last logged: 10:18:37 AM

Error while setting up uk_bin_collection platform for sensor
Traceback (most recent call last):
File "/config/custom_components/uk_bin_collection/sensor.py", line 122, in _async_update_data
data = await self.hass.async_add_executor_job(self.ukbcd.run)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/uk_bin_collection/sensor.py", line 119, in _async_update_data
async with async_timeout.timeout(30) as cm:
File "/usr/local/lib/python3.11/site-packages/async_timeout/init.py", line 141, in aexit
self._do_exit(exc_type)
File "/usr/local/lib/python3.11/site-packages/async_timeout/init.py", line 228, in _do_exit
raise asyncio.TimeoutError
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/uk_bin_collection/sensor.py", line 68, in async_setup_entry
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 272, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady

@vishnurpatel
Copy link
Author

logically we should close this bug, as Leeds now works i think theres a bug for the scraper/selinum thing used for Home assistant.?

@dp247
Copy link
Collaborator

dp247 commented Dec 19, 2023

Your wish is my command

@dp247 dp247 closed this as completed Dec 19, 2023
@robbrad
Copy link
Owner

robbrad commented Dec 19, 2023

Edit, iv noticed the eneties seem to go "dead" after some time and stop reporting.

and show the message David posted.

Logger: homeassistant.components.sensor

Source: helpers/entity_platform.py:361

Integration: Sensor (documentation, issues)

First occurred: 10:14:43 AM (3 occurrences)

Last logged: 10:18:37 AM

Error while setting up uk_bin_collection platform for sensor

Traceback (most recent call last):

File "/config/custom_components/uk_bin_collection/sensor.py", line 122, in _async_update_data

data = await self.hass.async_add_executor_job(self.ukbcd.run)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh

self.data = await self._async_update_data()

            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/config/custom_components/uk_bin_collection/sensor.py", line 119, in _async_update_data

async with async_timeout.timeout(30) as cm:

File "/usr/local/lib/python3.11/site-packages/async_timeout/init.py", line 141, in aexit

self._do_exit(exc_type)

File "/usr/local/lib/python3.11/site-packages/async_timeout/init.py", line 228, in _do_exit

raise asyncio.TimeoutError

TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform

await asyncio.shield(task)

File "/config/custom_components/uk_bin_collection/sensor.py", line 68, in async_setup_entry

await coordinator.async_config_entry_first_refresh()

File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 272, in async_config_entry_first_refresh

raise ex

homeassistant.exceptions.ConfigEntryNotReady

This looks like it could be related to the custom component in some way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working home assistant custom component Something related to the home assistant custom component
Projects
None yet
Development

No branches or pull requests

3 participants