Autor Thema: Velux KLF200 & SSL librairies  (Gelesen 798 mal)

Offline @lex99

  • New Member
  • *
  • Beiträge: 15
Velux KLF200 & SSL librairies
« am: 27 Mai 2022, 09:26:35 »
Hi,

I have gotten KLF200 to be able to control my VELUX windows with FHEM.

The device works OK (tested in a test installation of Openhab).

I cannot get it to log in correctly in FHEM (I keep getting "connection refused (111)").

I suspect it got to do with the SSL librairies.

I have done a clean install of Bullseye on a Pi3B+.

What do I miss ?

Here are my packages:

Package                         Class Description
libcrypt-ssleay-perl 0.73.06-1+b3 K-O arm64 OpenSSL support for LWP
libcurl4 7.74.0-1.3+deb11u1         K-O arm64 easy-to-use client-side URL transfer library (OpenSSL flavour)
libio-socket-ssl-perl 2.069-1         K-O Perl module implementing object oriented interface to SSL sockets
libnet-smtp-ssl-perl 1.04-1         K-O Perl module providing SSL support to Net::SMTP
libnet-ssleay-perl 1.88-3+b1         K-O arm64 Perl module for Secure Sockets Layer (SSL)
libssl-dev 1.1.1n-0+deb11u2         K-O arm64 Secure Sockets Layer toolkit - development files
libssl1.1 1.1.1n-0+deb11u2         K-O arm64 Secure Sockets Layer toolkit - shared libraries
libzstd1 1.4.8+dfsg-2.1         K-O arm64 fast lossless compression algorithm
openssl 1.1.1n-0+deb11u2         K-O arm64 Secure Sockets Layer toolkit - cryptographic utility
perl-openssl-defaults 5         P-T arm64 version compatibility baseline for Perl OpenSSL packages
python3-certifi 2020.6.20-1         P-T root certificates for validating SSL certs and verifying TLS hosts (python3)
ssl-cert 1.1.0+nmu1                 P-T simple debconf wrapper for OpenSSL

This is what is needed as per the documentation:
    IO::Socket::SSL
    Net::SSL
    Net::SSLeay
    Net::SSLeay::Handle
    Crypt::SSLeay
    Net::Server::Proto::SSL

This is what I have:

Module              Submodules      Description                                 Version
IO::Socket::SSL 3 SSL sockets with IO::Socket interface 2.069-1
Net::SMTP::SSL 0 SSL support for Net::SMTP 1.04
Net::SSLeay 1 Perl extension for using OpenSSL 1.88-3+b1
Net::SSLeay::Handle                                                           1.88
Crypt::SSLeay 7 OpenSSL support for LWP 0.73.06-1+b3
Net::Server::Proto
Server::Proto::SSL

I am not a Perl expert, so I don't know if I have all the required packages - and how to get them if I miss any.

I feel I miss Net::SSL, correct ?

Thanks !


Offline rudolfkoenig

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 25400
Antw:Velux KLF200 & SSL librairies
« Antwort #1 am: 27 Mai 2022, 09:41:45 »
"Connection refused" is usually not an SSL problem. I suspect, that either the service is not running on the host/port specified (likely), or there is a firewall in between (unlikely, as firewalls typically cause a "Connection timed out").

If a FHEM module is missing a perl library, then you can find a message specifying the library in the FHEM Log.
To install a missing library I recommend using the OS supplied version: entering "debian Net::Server::Proto" in a search engine tells me that the debian package name is libnet-server-perl.
If there is no corresponding package from the OS, then it can be installed via "cpan -i <package-name>"


Offline @lex99

  • New Member
  • *
  • Beiträge: 15
Antw:Velux KLF200 & SSL librairies
« Antwort #2 am: 27 Mai 2022, 16:50:59 »
Thanks for your reply.

There is no firewall, and I can ping the KLF200.

What do you mean by "the service is not running on the host/port specified" ?

I have powered ON the KLF200, it is connected to the LAN (same LAN as FHEM).  I can access its configuration page via its own WiFi and everything looks OK (there is not much to configure).


Offline rudolfkoenig

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 25400
Antw:Velux KLF200 & SSL librairies
« Antwort #3 am: 27 Mai 2022, 17:26:42 »
Zitat
What do you mean by "the service is not running on the host/port specified" ?
There is no program servicing the TCP port on the host specified by the KLF200 definition in FHEM.

If I understand the code correctly in 83_KLF200.pm, you have to define the hostname (or IP) of the KLF200, but the port is hardcoded to 51200 in the module. Either you specified a wrong IP, the port 51200 is not the right one for your KLF200, or something else :)

Since I have no experience with this module, I suggest to describe your problem here: https://forum.fhem.de/index.php?topic=92907.0

Offline @lex99

  • New Member
  • *
  • Beiträge: 15
Antw:Velux KLF200 & SSL librairies
« Antwort #4 am: 27 Mai 2022, 17:34:19 »
Thanks.

The port 51200 is opened on the KLF200 (I just checked).

I'll go to the dedicated thread, I'll try to post in English as my German is really not good.

Have a good WE !