From 9151a036d16c4b05b7014c4ecd8518044e718b7b Mon Sep 17 00:00:00 2001 From: justme1968 Date: Fri, 21 Dec 2018 08:17:28 +0000 Subject: [PATCH] 37_harmony.pm: fixed missing reconnect on websocket disconnect git-svn-id: https://svn.fhem.de/fhem/trunk@18018 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/37_harmony.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/37_harmony.pm b/fhem/FHEM/37_harmony.pm index f1259c1a5..b66f05e4c 100644 --- a/fhem/FHEM/37_harmony.pm +++ b/fhem/FHEM/37_harmony.pm @@ -1234,7 +1234,7 @@ harmony_Read($) $hash->{websocket} = 1; #buf = harmony_msg2hash($buf, 1); - Log3 $name, 3, "$name: notification websocket: Switching Protocols ok"; + Log3 $name, 3, "$name: websocket: Switching Protocols ok"; harmony_sendEngineGet($hash, "config"); harmony_sendIq($hash, "format=json"); @@ -1244,11 +1244,15 @@ harmony_Read($) } else { $close = 1; - Log3 $name, 2, "$name: notification websocket: Switching Protocols failed"; + Log3 $name, 2, "$name: websocket: Switching Protocols failed"; } if( $close ) { harmony_disconnect( $hash ); + + if( defined($hash->{discoveryinfo}) ) { + InternalTimer(gettimeofday()+2, "harmony_connect", $hash, 0); + } } return;