pawlizio / my_velux

Custom component of velux integration for Home Assistant
32 stars 9 forks source link

after daily reboot no connection #49

Closed evilmumi closed 4 months ago

evilmumi commented 5 months ago

i have created a daily reboot of klf. but after it connection is lost. What is recommended?

2024-06-26 00:03:00.387 WARNING (MainThread) [pyvlx] KLF 200 reboot initiated 2024-06-26 00:03:00.537 WARNING (MainThread) [pyvlx] KLF200 is rebooting 2024-06-26 00:03:11.540 ERROR (MainThread) [homeassistant.components.automation.klf200_durchstarten] Velux KLF200 durchstarten: Error executing script. Unexpected error for call_service at pos 1: <PyVLXException description="Unable to reboot gateway." /> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/velux/__init__.py", line 79, in async_reboot_gateway await pyvlx.reboot_gateway() File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 86, in reboot_gateway await self.klf200.reboot() File "/usr/local/lib/python3.12/site-packages/pyvlx/klf200gateway.py", line 112, in reboot await self.pyvlx.disconnect() File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 111, in disconnect await self.klf200.reboot() File "/usr/local/lib/python3.12/site-packages/pyvlx/klf200gateway.py", line 111, in reboot raise PyVLXException("Unable to reboot gateway.") pyvlx.exception.PyVLXException: <PyVLXException description="Unable to reboot gateway." /> 2024-06-26 00:03:11.545 ERROR (MainThread) [homeassistant.components.automation.klf200_durchstarten] While executing automation automation.klf200_durchstarten Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 723, in async_trigger return await self.action_script.async_run( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1769, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 464, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 528, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 558, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/velux/__init__.py", line 79, in async_reboot_gateway await pyvlx.reboot_gateway() File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 86, in reboot_gateway await self.klf200.reboot() File "/usr/local/lib/python3.12/site-packages/pyvlx/klf200gateway.py", line 112, in reboot await self.pyvlx.disconnect() File "/usr/local/lib/python3.12/site-packages/pyvlx/pyvlx.py", line 111, in disconnect await self.klf200.reboot() File "/usr/local/lib/python3.12/site-packages/pyvlx/klf200gateway.py", line 111, in reboot raise PyVLXException("Unable to reboot gateway.") pyvlx.exception.PyVLXException: <PyVLXException description="Unable to reboot gateway." />

pawlizio commented 4 months ago

Actually a daily reboot is not necessary and does not help. Important is a reboot before HA disconnect in case of a restart, so on shut down. Does a restart of KLF200 stove this?

evilmumi commented 4 months ago

Hi, deleted the daily reboot and after this it works. we will sie how it exactly will work after some updates with connected restarts.