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
74.09k stars 31.1k forks source link

ZAMG closes aiohttp session #99371

Closed farmio closed 1 year ago

farmio commented 1 year ago

The problem

Hi 👋! The ZAMG integration yields some log entries which leads me to think its error handling has room for improvement.

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:124 
First occurred: 12. August 2023 um 21:30:15 (1 occurrences) 
Last logged: 12. August 2023 um 21:30:15

Detected integration that closes the Home Assistant aiohttp session. Please report issue for zamg using this method at homeassistant/components/zamg/coordinator.py, line 44: device = await self.zamg.update()

and

Logger: homeassistant.components.zamg
Source: helpers/update_coordinator.py:229 
Integration: Zentralanstalt für Meteorologie und Geodynamik (ZAMG) (documentation, issues) 
First occurred: 4. August 2023 um 03:13:55 (10 occurrences) 
Last logged: 30. August 2023 um 11:04:14

Timeout fetching zamg data
Error fetching zamg data: Invalid response from API: Cannot connect to host dataset.api.hub.zamg.ac.at:443 ssl:default [Try again]
Error fetching zamg data: Invalid response from API: Cannot connect to host dataset.api.hub.zamg.ac.at:443 ssl:default [Connect call failed ('138.22.160.100', 443)]

What version of Home Assistant Core has the issue?

core-2023.8.0

What was the last working version of Home Assistant Core?

not sure, seeing this the first time

What type of installation are you running?

Home Assistant Container

Integration causing the issue

zamg

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zamg/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

# probably reconnect - this appears multiple times

2023-08-12 21:30:15.263 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that closes the Home Assistant aiohttp session. Please report issue for zamg using this method at homeassistant/components/zamg/coordinator.py, line 44: device = await self.zamg.update()
2023-08-12 21:30:15.265 ERROR (MainThread) [homeassistant.components.zamg] Error fetching zamg data: Invalid response from API: Cannot connect to host dataset.api.hub.zamg.ac.at:443 ssl:default [Try again]
2023-08-12 21:50:21.500 INFO (MainThread) [homeassistant.components.zamg] Fetching zamg data recovered

2023-08-30 11:04:14.009 ERROR (MainThread) [homeassistant.components.zamg] Error fetching zamg data: Invalid response from API: Cannot connect to host dataset.api.hub.zamg.ac.at:443 ssl:default [Connect call failed ('138.22.160.100', 443)]
2023-08-30 11:14:15.105 INFO (MainThread) [homeassistant.components.zamg] Fetching zamg data recovered

Additional information

No response

home-assistant[bot] commented 1 year ago

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

Code owner commands Code owners of `zamg` 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 zamg` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


zamg documentation zamg source (message by IssueLinks)

issue-triage-workflows[bot] commented 1 year 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.

farmio commented 1 year ago

Still happening in 2023.11.2 occasionally.