From a878d8a5464931283f9e5d9b0970fdef485738f5 Mon Sep 17 00:00:00 2001 From: "klaus.schauer" <> Date: Fri, 25 Sep 2020 04:30:57 +0000 Subject: [PATCH] 00_ElsnserWS: processing of raw data improved. git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@22843 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/00_ElsnerWS.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/FHEM/00_ElsnerWS.pm b/FHEM/00_ElsnerWS.pm index 82972666a..b1e448f8e 100644 --- a/FHEM/00_ElsnerWS.pm +++ b/FHEM/00_ElsnerWS.pm @@ -193,6 +193,7 @@ sub ElsnerWS_Read($) { my $buf = DevIo_SimpleRead($hash); return "" if(!defined($buf)); my $name = $hash->{NAME}; + $hash->{PARTIAL} = '' if(length($hash->{PARTIAL}) > 203); my $data = $hash->{PARTIAL} . uc(unpack('H*', $buf)); #Log3 $name, 5, "ElsnerWS $name received DATA: " . uc(unpack('H*', $buf)); Log3 $name, 5, "ElsnerWS $name received DATA: $data"; @@ -1173,12 +1174,12 @@ sub ElsnerWS_Delete($$) { Priority of custom commands. If both the up and down command are triggered, only the prioritized command is executed.