ha-samsungtv-tizen icon indicating copy to clipboard operation
ha-samsungtv-tizen copied to clipboard

Detected blocking call to sleep inside the event loop

Open Merril-r opened this issue 2 years ago • 12 comments

After setup in the integration and making necessary changes to configuration file, the following error pops up after each boot:

Logger: homeassistant.util.async_ Source: util/async_.py:150 First occurred: 4:40:04 PM (1 occurrences) Last logged: 4:40:04 PM

Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_tizen doing blocking calls at custom_components/samsungtv_tizen/websockets.py, line 115: time.sleep(self.key_press_delay)

The dashboard with media player is also very slow to refresh with the player added to it

Merril-r avatar Apr 29 '22 14:04 Merril-r

Had the same issue Logger: homeassistant.util.async_ Source: util/async_.py:150 First occurred: 14:16:15 (1 occurrences) Last logged: 14:16:15

Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_tizen doing blocking calls at custom_components/samsungtv_tizen/websockets.py, line 115: time.sleep(self.key_press_delay)

fcortijos avatar May 02 '22 17:05 fcortijos

Same issue here

Logger: homeassistant.util.async_ Source: util/async_.py:150 First occurred: 13:15:18 (143 occurrences) Last logged: 14:51:19

Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_tizen doing blocking calls at custom_components/samsungtv_tizen/websockets.py, line 115: time.sleep(self.key_press_delay)

coasttech avatar May 13 '22 04:05 coasttech

Hi all, I get the same indeed, with a "Samsung The Frame". Reading the error it could have something todo with the delay of the off button for the Frame? Just guessing.

2022-05-16 13:28:25 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_tizen doing blocking calls at custom_components/samsungtv_tizen/websockets.py, line 115: time.sleep(self.key_press_delay)

2022-05-16 13:28:54 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_tizen doing blocking calls at custom_components/samsungtv_tizen/websockets.py, line 115: time.sleep(self.key_press_delay)

It is an error around this code block, should that not be task.sleep?

    if key_press_delay is None:
        time.sleep(self.key_press_delay)
    else:
        time.sleep(key_press_delay)

pvh0 avatar May 16 '22 11:05 pvh0

Same error here:

Logger: homeassistant.util.async_
Source: util/async_.py:150
First occurred: 12:03:08 AM (1 occurrences)
Last logged: 12:03:08 AM

Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_tizen doing blocking calls at custom_components/samsungtv_tizen/websockets.py, line 115: time.sleep(self.key_press_delay)

pr0fetul avatar Jun 01 '22 05:06 pr0fetul

I just installed ha-samsungtv-tizen and I'm also having this issue with my frame tv. Home Assistant has been very slow since installing. Any updates?

WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_tizen doing blocking calls at custom_components/samsungtv_tizen/websockets.py, line 115: time.sleep(self.key_press_delay)

stobra avatar Jul 18 '22 07:07 stobra

Same error in my log. However everything seems to work fine.

CAP-Team avatar Aug 03 '22 21:08 CAP-Team

I am also repeatedly getting this warning with a Samsung 8 Series TV. As noted in the OP, this seems to be causing dashboards to take a long time to load.

MMK21Hub avatar Aug 04 '22 10:08 MMK21Hub

Same issue here as well! It's slowing things down a bit, but the log is flooded completely

haknick avatar Nov 23 '22 11:11 haknick

Same issue here. :(

blackerking avatar Dec 08 '22 12:12 blackerking

Same issue here.

vedymin avatar Dec 18 '22 17:12 vedymin

Still same issue here as well!

koen241 avatar Jan 26 '23 13:01 koen241

The following integration is forked from this integration:

https://github.com/ollo69/ha-samsungtv-smart

Just install this one, and everything works perfectly!

koen241 avatar Jan 26 '23 14:01 koen241