diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 271ae2fcc..ccde67c1d 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -5982,6 +5982,10 @@ sub CUL_HM_statCntRfresh($) {# update statistic once a day sub CUL_HM_respPendRm($) {#del response related entries in messageing entity my ($hash) = @_; + if (!defined($hash->{DEF})){ + Log 1,"CUL_HM error removing pending commands";#General remove once found + return; + } $modules{CUL_HM}{prot}{rspPend}-- if($hash->{helper}{prt}{rspWait}{cmd}); delete $hash->{helper}{prt}{rspWait}; delete $hash->{helper}{prt}{wuReSent}; @@ -5993,9 +5997,14 @@ sub CUL_HM_respPendRm($) {#del response related entries in messageing entity $respRemoved = 1; } sub CUL_HM_respPendTout($) { - my ($HMid) = @_; - (undef,$HMid) = split(":",$HMid,2); + my ($HMidIn) = @_; + my(undef,$HMid) = split(":",$HMidIn,2); my $hash = $modules{CUL_HM}{defptr}{$HMid}; + if (!defined($hash)){ + Log 1,"CUL_HM error removing timer for $HMidIn";#General remove once found + return; + } + my $pHash = $hash->{helper}{prt};#shortcut if ($hash && $hash->{DEF} ne '000000'){# we know the device my $name = $hash->{NAME};