pawlizio / my_velux

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

Unknown error occurred when setting up via UI #15

Closed fabir-git closed 2 years ago

fabir-git commented 2 years ago

I tried to switch to the UI configuration because yaml is no longer supported. Sadly I get the following error when I try to set it up (after inserting the ip and the password):

Unknown error occurred

There are no messages in the logfile (even with debug).

Versions: my velux: 2.6 HomeAssistant: 2022.7.0 & 2022.6.7 (tried both) HomeAssistantOS: 8.2

EDIT:

I tried to downgrade to 2.4 (with several uninstalling attempts and restarts) but sadly the problem does not vanish. Before the upgrade to 2.6 it worked flawless for months.

pawlizio commented 2 years ago

Basically, if the Velux component was already configured, it should not be necessary to set it up again via UI, even if the YAML entry was removed. However, please explain the steps you did after the update to 2.6 and how it was configured before.

Please set up the debug for both, custom_component.velux and pyvlx:

logger:
  default: warning
  logs:
    pyvlx: debug
    custom_components.velux: debug

Please reboot also KLF200 first and then HA. Afterwards check the logs if you can find some more useful information or share it.

fabir-git commented 2 years ago

Thanks for the fast response.

I already rebooted the KLF200 before HA.

My steps:

after that I tried restarts, deinstalling and reinstalling of my_velux, restarts of the host, the new HA version, ...

Here are the logs (sadly nothing from my_velux shows up):

I exchanged the ip´s, netmask and the first two password chars with X

2022-07-06 23:24:30 DEBUG (MainThread) [pyvlx] Loading https://github.com/pawlizio/pyvlx.git@master v0.1.28
2022-07-06 23:24:30 DEBUG (MainThread) [pyvlx] Connecting to KLF 200 on <pyvlx.pyvlx.PyVLX object at 0x7f60373220>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] Amount of connections since last HA start: 1
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] SEND: <FramePasswordEnterRequest password="XX****"/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] REC: <FramePasswordEnterConfirmation status="PasswordEnterConfirmationStatus.SUCCESSFUL"/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] SEND: <FrameGetVersionRequest/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] REC: <FrameGetVersionConfirmation software_version="0.2.0.0.71.0" hardware_version="6" product="KLF 200"/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] SEND: <FrameGetProtocolVersionRequest/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] REC: <FrameGetProtocolVersionConfirmation version="3.14"/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] Connected to: <DtoVersion softwareversion="0.2.0.0.71.0" hardwareversion="6" productgroup="14" producttype="3"/>, <DtoProtocolVersion majorversion="3" minorversion="14"/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] SEND: <FrameHouseStatusMonitorDisableRequest/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] REC: <FrameHouseStatusMonitorDisableConfirmation/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] SEND: <FrameGetStateRequest/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] REC: <FrameGetStateConfirmation gateway_state="GatewayState.GATEWAY_MODE_WITH_ACTUATORS" gateway_sub_state="GatewaySubState.IDLE"/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] SEND: <FrameSetUTCRequest time="2022-07-06 23:22:28"/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] REC: <FrameSetUTCConfirmation/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] SEND: <FrameGetNetworkSetupRequest/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] REC: <FrameGetNetworkSetupConfirmation ipaddress="XXX.XXX.XXX.XX" netmask="XXX.XXX.XXX.X" gateway="XXX.XXX.XXX.X" dhcp="DHCPParameter.DISABLE"/>
2022-07-06 23:24:35 DEBUG (MainThread) [pyvlx] SEND: <FrameHouseStatusMonitorEnableRequest/>
2022-07-06 23:24:37 DEBUG (MainThread) [pyvlx] REC: <FrameHouseStatusMonitorEnableConfirmation/>
2022-07-06 23:24:37 DEBUG (MainThread) [pyvlx] Heartbeat started
2022-07-06 23:24:37 DEBUG (MainThread) [pyvlx] SEND: <FrameHouseStatusMonitorDisableRequest/>
2022-07-06 23:24:37 DEBUG (MainThread) [pyvlx] SEND: <FrameGetStateRequest/>
2022-07-06 23:24:38 DEBUG (MainThread) [pyvlx] REC: <FrameHouseStatusMonitorDisableConfirmation/>
2022-07-06 23:24:38 DEBUG (MainThread) [pyvlx] REC: <FrameGetStateConfirmation gateway_state="GatewayState.GATEWAY_MODE_WITH_ACTUATORS" gateway_sub_state="GatewaySubState.IDLE"/>
pawlizio commented 2 years ago

So far the pyvlx logs don't show any problem. Do you manually search the Velux integration in the integration list or is Velux autodiscovered via zeroconf? Are you able to install 2.7? I created it as a pre-release and inserted again YAML support.

fabir-git commented 2 years ago

It shows up via auto-doscovery.

I just installed 2.7 and it is working fine. Thank you very much for your work. This custom component should definitiv be in HA core.

I'll try to install 2.6 over this working instance later this day (to see if the issue was caused by some corrupt config or similar)

fabir-git commented 2 years ago

After installing version 2.6 over the working 2.7 it automatically imported the config data. Now it works even with 2.6 and without the yaml config.

Thank you very much, I think it was some form of corrupted config data.