bremor / bureau_of_meteorology

Custom component for retrieving weather information from the Bureau of Meteorology.
MIT License
190 stars 31 forks source link

Failure to load location #182

Closed Dart2112 closed 1 year ago

Dart2112 commented 1 year ago

My integration stopped working and was showing unavailable for observations. the following error occurred for me after a HA docker update.

2023-08-16 14:49:50.362 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Elizabeth South for bureau_of_meteorology Traceback (most recent call last): File "/lsiopy/lib/python3.11/site-packages/homeassistant/config_entries.py", line 388, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bureau_of_meteorology/__init__.py", line 70, in async_setup_entry await collector.async_update() File "/config/custom_components/bureau_of_meteorology/PyBoM/collector.py", line 87, in async_update self.locations_data = await resp.json() ^^^^^^^^^^^^^^^^^ File "/lsiopy/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1104, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://api.weather.bom.gov.au/v1/locations/r1fd7h')

To troubleshoot I attempted to reinstall the integration. But now it won't accept any lat long in setup. "Unsupported Lat/Lon"

craigmate commented 1 year ago

HI.. yes, I just received this as well. I was wondering if it is something on the BOM side... I haven't done any updates, I just noticed that all the forecasts/observations were not working, so tried to reload the integration, but it failed.
I was just about to remove it from HACS and re-add it, but I think it probably won't make any difference. Its a great intergration, so hopefully the BOM has restricted access to the data

Dart2112 commented 1 year ago

HI.. yes, I just received this as well. I was wondering if it is something on the BOM side... I haven't done any updates, I just noticed that all the forecasts/observations were not working, so tried to reload the integration, but it failed. I was just about to remove it from HACS and re-add it, but I think it probably won't make any difference. Its a great intergration, so hopefully the BOM has restricted access to the data

I received errors simular to what is shown at the end of my first post. If I manually load the links it works just fine and shows the data that the integration was exposed previously. So I think it might be a change to the structure of the data rather than it being removed.

DavidFW1960 commented 1 year ago

It's also killing integration already configured

Makin-Things commented 1 year ago

1.1.20 has been released on HACS to address this issue. I don't believe it was a deliberate action by the BOM but most likely just a library update that imposed a new requirement. Please report any ongoing issues if it doesn't fix it for you.

lionslair commented 1 year ago

1.1.20 has been released on HACS to address this issue. I don't believe it was a deliberate action by the BOM but most likely just a library update that imposed a new requirement. Please report any ongoing issues if it doesn't fix it for you.

Thank you. Was trying to work out what I had done with other changes today then saw the update. It fixed it. Thank you very much.

Dart2112 commented 1 year ago

I've updated but am still unable to configure location. It used to say "Unsupported Lat/Lon" now it says "Unknown error"

Error in log as follows 2023-08-16 23:16:58.681 ERROR (MainThread) [custom_components.bureau_of_meteorology.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/bureau_of_meteorology/config_flow.py", line 66, in async_step_user await self.collector.get_locations_data() File "/config/custom_components/bureau_of_meteorology/PyBoM/collector.py", line 35, in get_locations_data async with aiohttp.ClientSession(headers=headers) as session: ^^^^^^^ NameError: name 'headers' is not defined

TH3xR34P3R commented 1 year ago

I've updated but am still unable to configure location. It used to say "Unsupported Lat/Lon" now it says "Unknown error"

Error in log as follows 2023-08-16 23:16:58.681 ERROR (MainThread) [custom_components.bureau_of_meteorology.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/bureau_of_meteorology/config_flow.py", line 66, in async_step_user await self.collector.get_locations_data() File "/config/custom_components/bureau_of_meteorology/PyBoM/collector.py", line 35, in get_locations_data async with aiohttp.ClientSession(headers=headers) as session: ^^^^^^^ NameError: name 'headers' is not defined

Yup getting that error after updating to the current build as of this reply, restarted my HA install to reload it all properly but still get it at the moment.

firefox_TKrbdl7wNe

Makin-Things commented 1 year ago

1.1.21 release to fix the configuring problem. I made a type in my haste to do the initial fix.

TH3xR34P3R commented 1 year ago

1.1.21 release to fix the configuring problem. I made a type in my haste to do the initial fix.

Had to use the redownload option to update to this version until reloading the instance. it's working now as it should, moved to having my govee sensor as backup should future issues crop up.

craigmate commented 1 year ago

Thanks for the quick fix. Very much appreciated. this is by far the best integration for getting accurate weather in Australia, I setup the pirate weather app, but it not very good...

Automan69 commented 1 year ago

Thanks for the quick fix Mr. Maker!

Daralm commented 1 year ago

Thanks. The update fixed the issue.

TrialMaster commented 1 year ago

1.1.21 release to fix the configuring problem. I made a type in my haste to do the initial fix.

Thanks so much for quick update.