diff --git a/FHEM/34_SWAP.pm b/FHEM/34_SWAP.pm index 9d114d581..27d78e8bd 100755 --- a/FHEM/34_SWAP.pm +++ b/FHEM/34_SWAP.pm @@ -932,14 +932,12 @@ SWAP_Parse($$) $rhash->{product} = $products->{$productcode} if( defined($productcode) && defined($products->{$productcode} ) ); - #SWAP_Set( $rhash, $rname, "getConfig" ) if( !$first ); - SWAP_Set( $rhash, $rname, "statusRequest" ) if( $first ); - } - - if( my $parse = $modules{$rhash->{TYPE}}{SWAP_ParseFn} ) { - no strict "refs"; - &{$parse}($rhash,$reg,$func,$data); - use strict "refs"; + if( $first ) { + SWAP_Set( $rhash, $rname, "statusRequest" ); + } else { + SWAP_Send($rhash, $rhash->{addr}, QUERY, "01" ); + SWAP_Send($rhash, $rhash->{addr}, QUERY, "02" ); + } } my @list; @@ -989,6 +987,12 @@ SWAP_Parse($$) } } + if( my $parse = $modules{$rhash->{TYPE}}{SWAP_ParseFn} ) { + no strict "refs"; + &{$parse}($rhash,$reg,$func,$data); + use strict "refs"; + } + if( !defined($rhash->{SWAP_nonce}) || hex($nonce) < hex($rhash->{SWAP_nonce}) ) { delete( $rhash->{SWAP_MISSED} );