home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.98k stars 30.53k forks source link

OpenWeatherMap sensors randomly unavailable #103666

Closed bigboban closed 3 months ago

bigboban commented 11 months ago

The problem

All sensors are part time unavailable. All graphs seems like example here:

image

What version of Home Assistant Core has the issue?

2023.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

OpenWeatherMap

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Config: hourly + en.

home-assistant[bot] commented 11 months ago

Hey there @fabaff, @freekode, @nzapponi, mind taking a look at this issue as it has been labeled with an integration (openweathermap) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `openweathermap` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign openweathermap` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


openweathermap documentation openweathermap source (message by IssueLinks)

lukbe commented 11 months ago

I have the same problem, in the settings of the openweather is onecall_daily.

Error message in the log: Error fetching openweathermap data: API call timeouted

Landshark77 commented 11 months ago

Seeing same thing on my end:

Logger: homeassistant.components.openweathermap.weather_update_coordinator
Source: helpers/update_coordinator.py:322
Integration: OpenWeatherMap ([documentation](https://www.home-assistant.io/integrations/openweathermap), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+openweathermap%22))
First occurred: 10:01:02 AM (1 occurrences)
Last logged: 10:01:02 AM

Error fetching openweathermap data: API call timeouted
SkyTakes commented 11 months ago

Same thing here. And I would like to add that when the weather card (custom:weather-card) is blank, I reload the integration and it immediately get the infos. This happens many times a day.

freekode commented 11 months ago

Seeing same thing on my end:

Logger: homeassistant.components.openweathermap.weather_update_coordinator
Source: helpers/update_coordinator.py:322
Integration: OpenWeatherMap ([documentation](https://www.home-assistant.io/integrations/openweathermap), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+openweathermap%22))
First occurred: 10:01:02 AM (1 occurrences)
Last logged: 10:01:02 AM

Error fetching openweathermap data: API call timeouted

It looks like you have bad internet connection or OWM server couldn't respond in time. In any case, this is not on HA side.

trip5 commented 11 months ago

Same thing here. Surely there must be a way then to retry the API, increase the timeout, or customize something?

Actually by the look of the history, since I'm also making 2 API calls (one daily, one hourly), only one fails at one time while the other goes through... while later, it goes opposite. So there's no loss of connectivity it seems. Perhaps OWM just doesn't like getting 2 API calls from the same IP simultaneously?

Edit: I'm wondering if this issue (which a search reveals come sup often enough) is related to 2 API calls at once and one gets rejected by OWM server.

There was some interest in getting all the sensor data in one API call. Is that not viable?

https://github.com/home-assistant/core/pull/55841 https://github.com/home-assistant/core/issues/56690 ...probably others

ObviousInvestor commented 9 months ago

Same issue for a couple of weeks now. This is the error I'm getting:

Logger: homeassistant.components.openweathermap.weather_update_coordinator Source: helpers/update_coordinator.py:332 Integration: OpenWeatherMap (documentation, issues) First occurred: 8:31:07 AM (2 occurrences) Last logged: 10:05:26 AM

Error fetching openweathermap data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/weather?APPID=59fcaac22d9407bf558b71d4163945ac&lang=en&lon=-9.094126224517824&lat=39.40875189475633 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6f82a61d10>: Failed to establish a new connection: [Errno -5] Name has no usable address')) Error fetching openweathermap data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/weather?APPID=59fcaac22d9407bf558b71d4163945ac&lang=en&lon=-9.094126224517824&lat=39.40875189475633 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6f7fba9a50>: Failed to establish a new connection: [Errno -5] Name has no usable address'))

markturner commented 7 months ago

This started happening to me a couple of weeks back too, exactly the same logs as the last poster.

Sooty70 commented 7 months ago

+1 for me too. Restarting the integration brings the sensors back, until they randomly drop out again...

Logger: homeassistant.components.openweathermap.weather_update_coordinator Source: helpers/update_coordinator.py:350 integration: OpenWeatherMap (documentation, issues) First occurred: 16:08:41 (1 occurrences) Last logged: 16:08:41

Error fetching openweathermap data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/weather?APPID=1dc4c83fa36cbe9b18f4d6ace20a7dd6&lang=en&lon=-0.581878423690796&lat=53.05821349493244 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff45a0d460>: Failed to establish a new connection: [Errno -3] Try again'))

r0bb10 commented 6 months ago
2024-04-24 07:02:09.937 ERROR (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Error fetching openweathermap data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/weather?APPID=1df8da2fe14424a83de809eac2fc3be8&lang=en&lon=8.xxx&lat=44.xxx (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4aa7c9b0>: Failed to establish a new connection: [Errno -3] Try again'))
2024-04-24 07:12:12.428 INFO (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Fetching openweathermap data recovered
2024-04-24 07:22:16.939 ERROR (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Error fetching openweathermap data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/weather?APPID=1df8da2fe14424a83de809eac2fc3be8&lang=en&lon=8.xxx&lat=44.xxx (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f44504e60>: Failed to establish a new connection: [Errno -3] Try again'))
2024-04-24 07:32:19.457 INFO (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Fetching openweathermap data recovered
2024-04-24 08:42:35.940 ERROR (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Error fetching openweathermap data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/weather?APPID=1df8da2fe14424a83de809eac2fc3be8&lang=en&lon=8.xxx&lat=44.xxx (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f55d81640>: Failed to establish a new connection: [Errno -3] Try again'))
2024-04-24 08:52:38.467 INFO (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Fetching openweathermap data recovered
2024-04-24 10:22:58.941 ERROR (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Error fetching openweathermap data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/weather?APPID=1df8da2fe14424a83de809eac2fc3be8&lang=en&lon=8.xxx&lat=44.xxx (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4690b860>: Failed to establish a new connection: [Errno -3] Try again'))
2024-04-24 10:33:01.503 INFO (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Fetching openweathermap data recovered
2024-04-24 11:23:14.935 ERROR (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Error fetching openweathermap data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/weather?APPID=1df8da2fe14424a83de809eac2fc3be8&lang=en&lon=8.xxx&lat=44.xxx (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f595582f0>: Failed to establish a new connection: [Errno -3] Try again'))
2024-04-24 11:33:17.403 INFO (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Fetching openweathermap data recovered

Same here, happens a lot.

issue-triage-workflows[bot] commented 3 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.