From 4a32a0a51a0af292838d9bf5db485d26b4aa387d Mon Sep 17 00:00:00 2001 From: grompo <> Date: Mon, 1 Aug 2016 17:18:18 +0000 Subject: [PATCH] FRITZBOX: bugfix - no wlan git-svn-id: https://svn.fhem.de/fhem/trunk@11874 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/72_FRITZBOX.pm | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/fhem/FHEM/72_FRITZBOX.pm b/fhem/FHEM/72_FRITZBOX.pm index ad9bc18c7..1831bb212 100644 --- a/fhem/FHEM/72_FRITZBOX.pm +++ b/fhem/FHEM/72_FRITZBOX.pm @@ -1389,19 +1389,20 @@ sub FRITZBOX_Readout_Run_Web($) } FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->radioCount", $runNo; -# Create WLAN-List +# Create WLAN-List if my %wlanList; - foreach ( @{ $result->{wlanList} } ) { - my $mac = $_->{mac}; - $mac =~ s/:/_/g; - $wlanList{$mac}{speed} = $_->{speed}; - $wlanList{$mac}{speed_rx} = $_->{speed_rx}; - $wlanList{$mac}{rssi} = $_->{rssi}; - FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->wlanDevice->".$mac."->speed", $_->{speed}; - FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->wlanDevice->".$mac."->speed_rx", $_->{speed_rx}; - FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->wlanDevice->".$mac."->rssi", $_->{rssi}; + if ( ref $result->{wlanList} eq 'ARRAY' ) { + foreach ( @{ $result->{wlanList} } ) { + my $mac = $_->{mac}; + $mac =~ s/:/_/g; + $wlanList{$mac}{speed} = $_->{speed}; + $wlanList{$mac}{speed_rx} = $_->{speed_rx}; + $wlanList{$mac}{rssi} = $_->{rssi}; + FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->wlanDevice->".$mac."->speed", $_->{speed}; + FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->wlanDevice->".$mac."->speed_rx", $_->{speed_rx}; + FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->wlanDevice->".$mac."->rssi", $_->{rssi}; + } } - # Create LanDevice list and delete inactive devices my %oldLanDevice; #collect current mac-readings (to delete the ones that are inactive or disappeared)