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
71.9k stars 30.12k forks source link

Dakin integration does blocking I/O in the event loop to import modules and ssl certificates #114345

Closed tomlut closed 1 month ago

tomlut commented 6 months ago

The problem

As per private discussion with bdraco about relatively long Daikin integration start up times, he discovered that the Daikin integration does I/O blocking in the event loop:

... it does blocking I/O in the event loop

https://bitbucket.org/mustang51/pydaikin/src/45f5ead619d861727626a7ab0522a0c18f00e0ba/pydaikin/daikin_base.py#lines-59

these imports do blocking I/O in the event loop

creating an ssl context does blocking I/O in the event loop https://bitbucket.org/mustang51/pydaikin/src/45f5ead619d861727626a7ab0522a0c18f00e0ba/pydaikin/daikin_brp072c.py#lines-24 (edited)

What version of Home Assistant Core has the issue?

core-2024.4.0b0

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

Daikin

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 6 months ago

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

Code owner commands Code owners of `daikin` 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 daikin` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


daikin documentation daikin source (message by IssueLinks)

cremor commented 5 months ago

@frenck Since this issue is still open I assume the milestone 2024.4.0 you assigned is not correct?

cremor commented 5 months ago

@tomlut The PyDaikin source code is now on GitHub. You might want to change the links in your issue description and/or create an issue in that repository: https://github.com/fredrike/pydaikin

tomlut commented 4 months ago

https://github.com/fredrike/pydaikin/issues/3

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

tomlut commented 1 month ago

Still an issue core-2024.7.4