PLCHome / velux-klf200-api

Provide node to Veluxl® KLF-200 io-homecontrol® Gateway API
42 stars 7 forks source link

KLF "connection refused" #8

Closed volkerrichert closed 4 years ago

volkerrichert commented 4 years ago

Hi!

After a few days of usage the connection to my KLF ist disconnected and I_m unable to reconnect until I reboot it.

While I'm connected it works perfect!

I'm sending a "GW_REBOOT_REQ" every day at night. Any Idea?

THX,

Volker

volkerrichert commented 4 years ago

ok, i found a hint in your velux-klf200 repo. klf may crash on unstable connections.

PLCHome commented 4 years ago

Sorry i have a lot going on now. It is due to a bug in the KLF. I tried to write to VELUX vbut they did not answer and did not slove the problem. The connection aborts are related to the home monitor. When the home monitor is off it doesn't seem to happen. For the encrypted connection, the KLF has to confirm the handshake, but it doesn't after an timeout. I made a recording in the WireShark. If you margin I can send you the information and contact velux sometimes you may be more lucky.

pawlizio commented 3 years ago

@PLCHome : I use pyvlx implementation and face also TLS problems. I tried to disable the HOUSE_STATUS_MONITOR before closing the connection, but this does not solve the issue. Do you have any other suggestions or experience how to catch this issue?

PLCHome commented 3 years ago

As long as the connection is closed correctly, I have no problem under nodeJS. The third connection is not possible until the application breaks down and is stopped hard.

Now I understand the problem: The KLF only allows 2 connections. If the connection is lost, the connection remains open internally. And after two times it's over.

I am currently using the ioBroker implementation. During this, the KLF is rebooted via the AP at midnight.

As a recommendation: keep the connection open. If the connection is lost, reboot the KLF via the API. Then establish the connection again.