ufozone / ha-zcs-mower

ZCS Lawn Mower Robots (Ambrogio, Techline, Wiper) platform as a Custom Component for Home Assistant.
MIT License
19 stars 0 forks source link

Losing ZCS integration after update HomeAssistant #148

Closed githubdebit closed 3 months ago

githubdebit commented 3 months ago

¡Hi there!

Everytime I update Home Assistant I loose ZCS integration (wich is very useful for my Ambrogio L250i). I'm resolving this issue adding again ZCS to integrations and reconfiguring all.

I don't know much about the problem but I can give the register's info:

Detected blocking call to open inside the event loop by custom integration 'zcsmower' at custom_components/zcsmower/image.py, line 161: map_image = Image.open(map_image_path, "r") (offender: /usr/local/lib/python3.12/site-packages/PIL/Image.py, line 3277: fp = builtins.open(filename, "rb")), please create a bug report at https://github.com/ufozone/ha-zcs-mower/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 "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/zcsmower/init.py", line 68, in async_setup_entry await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2032, in async_forward_entry_setups await asyncio.gather( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2034, in create_eagertask( File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/image/init.py", line 125, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eagertask(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/zcsmower/image.py", line 78, in async_setup_entry async_add_entities( File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 515, in _async_schedule_add_entities_for_entry task = self.config_entry.async_create_task( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1134, in async_create_task task = hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 828, in async_create_task_internal task = create_eagertask(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 649, in async_add_entities await add_func(coros, entities, timeout) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 555, in _async_add_and_update_entities tasks = [create_eagertask(coro, loop=self.hass.loop) for coro in coros] File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 729, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1289, in async_device_update await self.async_update() File "/config/custom_components/zcsmower/image.py", line 429, in async_update self._generate_image() File "/config/custom_components/zcsmower/image.py", line 161, in _generate_image map_image = Image.open(map_image_path, "r") Detected blocking call to open inside the event loop by custom integration 'zcsmower' at custom_components/zcsmower/image.py, line 161: map_image = Image.open(map_image_path, "r") (offender: /usr/local/lib/python3.12/site-packages/PIL/Image.py, line 3277: fp = builtins.open(filename, "rb")), please create a bug report at https://github.com/ufozone/ha-zcs-mower/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/zcsmower/coordinator.py", line 224, in lambda: self.async_update_listeners(), File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 165, in async_update_listeners update_callback() File "/config/custom_components/zcsmower/image.py", line 435, in _handle_coordinator_update self._generate_image() File "/config/custom_components/zcsmower/image.py", line 161, in _generate_image map_image = Image.open(map_image_path, "r") Detected blocking call to open inside the event loop by custom integration 'zcsmower' at custom_components/zcsmower/image.py, line 247: map_marker = Image.open(map_marker_path, "r") (offender: /usr/local/lib/python3.12/site-packages/PIL/Image.py, line 3277: fp = builtins.open(filename, "rb")), please create a bug report at https://github.com/ufozone/ha-zcs-mower/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/zcsmower/coordinator.py", line 224, in lambda: self.async_update_listeners(), File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 165, in async_update_listeners update_callback() File "/config/custom_components/zcsmower/image.py", line 435, in _handle_coordinator_update self._generate_image() File "/config/custom_components/zcsmower/image.py", line 247, in _generate_image map_marker = Image.open(map_marker_path, "r") Detected blocking call to open inside the event loop by custom integration 'zcsmower' at custom_components/zcsmower/image.py, line 161: map_image = Image.open(map_image_path, "r") (offender: /usr/local/lib/python3.12/site-packages/PIL/Image.py, line 3277: fp = builtins.open(filename, "rb")), please create a bug report at https://github.com/ufozone/ha-zcs-mower/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 "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 255, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 411, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 165, in async_update_listeners update_callback() File "/config/custom_components/zcsmower/image.py", line 435, in _handle_coordinator_update self._generate_image() File "/config/custom_components/zcsmower/image.py", line 161, in _generate_image map_image = Image.open(map_image_path, "r") Detected blocking call to open inside the event loop by custom integration 'zcsmower' at custom_components/zcsmower/image.py, line 247: map_marker = Image.open(map_marker_path, "r") (offender: /usr/local/lib/python3.12/site-packages/PIL/Image.py, line 3277: fp = builtins.open(filename, "rb")), please create a bug report at https://github.com/ufozone/ha-zcs-mower/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 "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 255, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 411, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 165, in async_update_listeners update_callback() File "/config/custom_components/zcsmower/image.py", line 435, in _handle_coordinator_update self._generate_image() File "/config/custom_components/zcsmower/image.py", line 247, in _generate_image map_marker = Image.open(map_marker_path, "r")

ufozone commented 3 months ago

That's a lot of unformatted log... But I think it's the same problem as in #143.

Please download the integration directly from the main-branch again: grafik

Then restart Home Assistant and let us know if the problem has disappeared.

githubdebit commented 3 months ago

Thank you very much!

That solved the problem!

ufozone commented 3 months ago

@githubdebit thank you for your response and feedback.

A new version was released: https://github.com/ufozone/ha-zcs-mower/releases/tag/v1.5