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

tasmota doing blocking calls at homeassistant/components/tasmota/sensor.py:295 #90305

Closed
Cougar opened this issue Mar 26, 2023 · 5 comments
Closed

Comments

@Cougar
Copy link
Contributor

Cougar commented Mar 26, 2023

The problem

I see errors like this since 23.03.2023 after I updated to 2023.3.6. HA suggest to report it. Line itself is here

2023-03-26 17:44:51.621 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue for tasmota doing blocking calls at homeassistant/components/tasmota/sensor.py, line 295: self.async_write_ha_state()

I'm not sure if the preceding stack trace is related with it or not but I still included it. Might be another unrelated issue.

What version of Home Assistant Core has the issue?

2023.3.6

What was the last working version of Home Assistant Core?

2023.3.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tasmota

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

This is in the log less than second before async warning:


2023-03-26 17:44:50.837 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _UnixReadPipeTransport._call_connection_lost(OSError(5, 'I/O error'))
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.10/asyncio/unix_events.py", line 582, in _call_connection_lost
    self._pipe.close()
  File "/usr/local/lib/python3.10/site-packages/pexpect/pty_spawn.py", line 327, in close
    self.ptyproc.close(force=force)
  File "/usr/local/lib/python3.10/site-packages/ptyprocess/ptyprocess.py", line 403, in close
    time.sleep(self.delayafterclose)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 159, in protected_loop_func
    check_loop(func, strict=strict)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 116, in check_loop
    raise RuntimeError(
RuntimeError: Detected blocking call to sleep inside the event loop. Use `await hass.async_add_executor_job()`; This is causing stability issues. Please report issue


### Additional information

_No response_
@home-assistant
Copy link

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

Code owner commands

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

(message by CodeOwnersMention)


tasmota documentation
tasmota source
(message by IssueLinks)

@emontnemery
Copy link
Contributor

I think the error message is incorrect; there's no blocking sleep in the Tasmota integration

@joostlek
Copy link
Member

Do you use one of

# homeassistant.components.aruba
# homeassistant.components.cisco_ios
# homeassistant.components.pandora
# homeassistant.components.unifi_direct

@issue-triage-workflows
Copy link

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.

@Cougar
Copy link
Contributor Author

Cougar commented Oct 16, 2023

I haven't seen this issue any more. Probably fixed already or it was related with some other problem which is gone now

@Cougar Cougar closed this as completed Oct 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants