From 63371a5049a1ccce2f2363256a05c18d25e1cf27 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Thu, 16 Nov 2023 19:54:27 +0100 Subject: [PATCH] [optional scope]: [optional body] [Ticket: no] --- controls_LGTV_WebOS.txt | 2 +- lib/FHEM/Devices/LGTV/LGTVWebOS.pm | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/controls_LGTV_WebOS.txt b/controls_LGTV_WebOS.txt index 7baf3a6..5920657 100644 --- a/controls_LGTV_WebOS.txt +++ b/controls_LGTV_WebOS.txt @@ -1,2 +1,2 @@ UPD 2023-11-15_19:19:41 19028 FHEM/82_LGTV_WebOS.pm -UPD 2023-11-16_19:49:21 55997 lib/FHEM/Devices/LGTV/LGTVWebOS.pm +UPD 2023-11-16_19:54:21 56056 lib/FHEM/Devices/LGTV/LGTVWebOS.pm diff --git a/lib/FHEM/Devices/LGTV/LGTVWebOS.pm b/lib/FHEM/Devices/LGTV/LGTVWebOS.pm index 532ddec..84dfca4 100644 --- a/lib/FHEM/Devices/LGTV/LGTVWebOS.pm +++ b/lib/FHEM/Devices/LGTV/LGTVWebOS.pm @@ -643,6 +643,7 @@ sub Open { my $hash = shift; my $name = $hash->{NAME}; my $host = $hash->{HOST}; + my $port = 3000; my $timeout = 0.1; ::Log3( $name, 4, "LGTV_WebOS ($name) - Baue Socket Verbindung auf" ); @@ -654,20 +655,22 @@ sub Open { PeerHost => $host, PeerPort => 3001, Proto => 'tcp', - SSL_startHandshake => 1, #( $proto eq 'wss' ? 1 : 0 ), - SSL_verify_mode => 'SSL_VERIFY_NONE', - KeepAlive => 1, - Timeout => $timeout + SSL_startHandshake => 1, #( $proto eq 'wss' ? 1 : 0 ), + SSL_verify_mode => SSL_VERIFY_NONE, + + # Blocking => 1 + KeepAlive => 1, + Timeout => $timeout ) || IO::Socket::INET->new( PeerHost => $host, - PeerPort => 3000, + PeerPort => $port, Proto => 'tcp', KeepAlive => 1, Timeout => $timeout ) - or - return ::Log3( $name, 4, "LGTV_WebOS ($name) Couldn't connect to $host" ) + or return ::Log3( $name, 4, + "LGTV_WebOS ($name) Couldn't connect to $host:$port/3001" ) ; # open Socket $hash->{FD} = $socket->fileno();