-
Notifications
You must be signed in to change notification settings - Fork 92
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
Warning: Detected blocking call to open inside the event loop by custom integration 'tapo_control' #612
Comments
thank you very much!
I see, it stills want to put data in the default place defined by integrations. Please see second line of the logger. I have configured to save in media folder because I do not want to back up this files(the are bigger) |
@catalinbordan when you try to play a recording via HA, it needs to copy it into the HA www folder temporarily. It will auto delete it after an hour. |
thanks for explanations and for the updated code. I have installed, restarted and again watched some videos. seems ok, no errors. |
* changes * tapo-siren-fix * getMost-list-breaking-change * siren-and-select * comments * fixes-and-comments * numbers * siren * unneded-mapings * cleanup * testing-fixes * cleanup * Fix: PR does not work with C200 1.0 1.3.6 * fix-siren * Update README.md to add instructions in case the cloud password does not work. * Update README.md * Update README.md * Update README.md * Implement color mode Reference: https://developers.home-assistant.io/docs/core/entity/light#color-modes > New integrations must implement both color_mode and supported_color_modes. > If an integration is upgraded to support color mode, both color_mode and > supported_color_modes should be implemented. This also fixes this warning at startup: ``` WARNING (MainThread) [homeassistant.components.light] None (<class 'custom_components.tapo_control.light.TapoWhitelight'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues ``` * Create ru.json * Update README.md * Update README.md * Update README.md * Update README.md * Fix #568: IP address is not a supported Tapo device * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml * Update issues.yml Temporarily disable cloud password close bot * Update issues.yml * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * changes * tapo-siren-fix * getMost-list-breaking-change * siren-and-select * comments * fixes-and-comments * numbers * siren * unneded-mapings * cleanup * testing-fixes * cleanup * fix-siren * Handle cleanup of config entry * Fix: PR does not work with C200 1.0 1.3.6 * alarm-status-false-default * Fix #616: Warning for async_forward_entry_setup * Fix #612, #615, #530, #525 * Fix: Blocking call when copying file from cold to hot storage * Add: Binary sensor with details about media sync setup * Fix #572: ffmpeg for sound detection doesn't terminate on Home Assistant restart * Fix #561: Unexpected error fetching Tapo resource status data * Fix #571: Incorrect device_class for D230 doorbell battery sensor * Fix: Descalate "Recording is currently in progress." warning to info on media sync * Add: HDR switch * Add: Experimental optimization for battery cameras * Fix: Update interval is now based on whether the device has a battery or not * Update: Automatically determine whether the device is currently running on battery or not and adjust update interval * Fix: Camera entities ignoring update threshold * Update README.md * Update README.md * Create add_camera_with_new_firmware.md * Update README.md * Update add_camera_with_new_firmware.md * Update add_camera_with_new_firmware.md * Fix #629, #621: Setup for switch entities fails for some cameras * Add #457: Battery optimization for solar cameras * Update: Migrate update interval to config entry storage * Add: Configurable update interval * Update: Bump version * Update: Guides for new firmwares workaround * Update: Readme instructions about stopping use of tapo app not required * Update: Readme formatting * Update README.md * Update add_camera_with_new_firmware.md * Update README.md * Fix: Removal of disabled device results in error and warning, time sync debug log * Fix #450: Config entry name resets on reconfiguration * Update: Bump version * Fix: stopManualAlarm instead of start on siren off * Fix: Mute error on siren on/off * Update: Revert result_has_error changes * Update: Ensure compatibility with #632 --------- Co-authored-by: marcosngomezi <[email protected]> Co-authored-by: Antoine Buchser <[email protected]> Co-authored-by: L. López <[email protected]> Co-authored-by: Virenbar <[email protected]> Co-authored-by: Nathan Spencer <[email protected]>
Description
I think it is coming from new version of Home Assistant 2024.6.3
Almost 19k hits from the last 12h.
I also have this warning: Recording is currently in progress.
I did not see any issues in regarding the use of integration.
Reproduction Steps
I had activated media sync for all my 3 cameras in /media/tapo
Expected behavior
no warning about
If applicable, add error logs.
Logger: homeassistant.util.loop
Source: util/loop.py:84
First occurred: 17 June 2024 at 19:35:02 (18096 occurrences)
Last logged: 10:40:11
Detected blocking call to open inside the event loop by custom integration 'tapo_control' at custom_components/tapo_control/utils.py, line 513: downloadedFile = await downloader.downloadFile( (offender: /usr/local/lib/python3.12/site-packages/pytapo/media_stream/convert.py, line 25: file = open(tempVideoFileLocation, "wb")), please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/tapo_control/init.py", line 752, in mediaSync await getRecording( File "/config/custom_components/tapo_control/utils.py", line 513, in getRecording downloadedFile = await downloader.downloadFile(
Detected blocking call to open inside the event loop by custom integration 'tapo_control' at custom_components/tapo_control/utils.py, line 513: downloadedFile = await downloader.downloadFile( (offender: /usr/local/lib/python3.12/site-packages/pytapo/media_stream/convert.py, line 29: file = open(tempAudioFileLocation, "wb")), please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/tapo_control/init.py", line 752, in mediaSync await getRecording( File "/config/custom_components/tapo_control/utils.py", line 513, in getRecording downloadedFile = await downloader.downloadFile(
Detected blocking call to open inside the event loop by custom integration 'tapo_control' at custom_components/tapo_control/utils.py, line 513: downloadedFile = await downloader.downloadFile( (offender: /usr/local/lib/python3.12/site-packages/pytapo/media_stream/downloader.py, line 45: with open(fileName, "rb") as f:), please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/tapo_control/init.py", line 752, in mediaSync await getRecording( File "/config/custom_components/tapo_control/utils.py", line 513, in getRecording downloadedFile = await downloader.downloadFile(
Detected blocking call to open inside the event loop by custom integration 'tapo_control' at custom_components/tapo_control/utils.py, line 265: with open(filePathThumb, "wb") as binary_file: (offender: /config/custom_components/tapo_control/utils.py, line 265: with open(filePathThumb, "wb") as binary_file:), please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/tapo_control/init.py", line 752, in mediaSync await getRecording( File "/config/custom_components/tapo_control/utils.py", line 540, in getRecording await processDownload( File "/config/custom_components/tapo_control/utils.py", line 233, in processDownload await generateThumb( File "/config/custom_components/tapo_control/utils.py", line 265, in generateThumb with open(filePathThumb, "wb") as binary_file:
Device Firmware
last fw without issues related to cloud pswd
Integration Version
5.4.18
Using stream component
Yes
Does camera work via official integrations?
Yes
Camera has all attributes filled out in developer tools
Yes
HASS Environment
Home assistant on VM
Search for similar issues
Yes
Additional information
No response
The text was updated successfully, but these errors were encountered: