From 05101fc07a5467615c96427b5bcf8b2062cc7203 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 1 Feb 2022 10:37:50 +0000 Subject: [PATCH] 00_FHZ.pm: get without queue (Forum #125844) git-svn-id: https://svn.fhem.de/fhem/trunk@25605 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/00_FHZ.pm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/00_FHZ.pm b/fhem/FHEM/00_FHZ.pm index 0e496c5e3..212db0aeb 100644 --- a/fhem/FHEM/00_FHZ.pm +++ b/fhem/FHEM/00_FHZ.pm @@ -269,7 +269,7 @@ FHZ_Get($@) Log3 $name, 2, "FHZ get $v"; FHZ_ReadAnswer($hash, "Flush", 0); - FHZ_Write($hash, $fn, $arg) if(!IsDummy($hash->{NAME})); + FHZ_DirectWrite($hash, $fn, $arg) if(!IsDummy($hash->{NAME})); my $msg = FHZ_ReadAnswer($hash, $a[1], 1.0); Log3 $name, 5, "GET Got: $msg" if(defined($msg)); @@ -589,6 +589,23 @@ FHZ_XmitLimitCheck($$) $hash->{NR_CMD_LAST_H} = int(@b); } +##################################### +# Skip the QUEUE +sub +FHZ_DirectWrite($$$) +{ + my ($hash,$fn,$msg) = @_; + + if(!$hash || !defined($hash->{PortObj})) { + Log3 $hash, 5, "FHZ device $hash->{NAME} is not active, cannot send"; + return; + } + + my $bstring = FHZ_CompleteMsg($fn, $msg); + Log3 $hash, 5, "Sending " . unpack('H*', $bstring); + $hash->{PortObj}->write($bstring) if($hash->{PortObj}); +} + ##################################### sub FHZ_Write($$$)