2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

FRITZBOX: bugfix - no wlan

git-svn-id: https://svn.fhem.de/fhem/trunk@11874 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
grompo 2016-08-01 17:18:18 +00:00
parent d5e0c03dcc
commit 4a32a0a51a

View File

@ -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)