mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 11:26:55 +00:00
FRITZBOX: speed infos added to mac_Readings
git-svn-id: https://svn.fhem.de/fhem/trunk@11351 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9e7b64202d
commit
193b1df3d1
@ -586,7 +586,7 @@ sub FRITZBOX_Get($@)
|
|||||||
Log3 $name, 3, "FRITZBOX: get $name $cmd ".join(" ", @val);
|
Log3 $name, 3, "FRITZBOX: get $name $cmd ".join(" ", @val);
|
||||||
my ($a, $h) = parseParams( join (" ", @val) );
|
my ($a, $h) = parseParams( join (" ", @val) );
|
||||||
@val = @$a;
|
@val = @$a;
|
||||||
#{ use Data::Dumper;; Dumper parseParams("{ a;;b };;c;;{ d;;e }", ';;') }
|
|
||||||
return "Wrong number of arguments, usage: get $name tr064command service control action [argName1 argValue1] [argName2 argValue2] ..."
|
return "Wrong number of arguments, usage: get $name tr064command service control action [argName1 argValue1] [argName2 argValue2] ..."
|
||||||
if int @val <3 || int(@val) %2 !=1;
|
if int @val <3 || int(@val) %2 !=1;
|
||||||
|
|
||||||
@ -1252,8 +1252,11 @@ sub FRITZBOX_Readout_Run_Web($)
|
|||||||
my $queryStr = "&radio=configd:settings/WEBRADIO/list(Name)"; # Webradio
|
my $queryStr = "&radio=configd:settings/WEBRADIO/list(Name)"; # Webradio
|
||||||
$queryStr .= "&box_dect=dect:settings/enabled"; # DECT Sender
|
$queryStr .= "&box_dect=dect:settings/enabled"; # DECT Sender
|
||||||
$queryStr .= "&handset=dect:settings/Handset/list(User,Manufacturer,Model,FWVersion)"; # DECT Handsets
|
$queryStr .= "&handset=dect:settings/Handset/list(User,Manufacturer,Model,FWVersion)"; # DECT Handsets
|
||||||
$queryStr .= "&lanDevice=landevice:settings/landevice/list(ip,name,mac,active,wlan)"; # LAN devices
|
$queryStr .= "&wlanList=wlan:settings/wlanlist/list(mac,speed_rx)"; # WLAN devices
|
||||||
# $queryStr .= "&wlanList=wlan:settings/wlanlist/list(state,is_guest,mac)"; # WLAN devices
|
#wlan:settings/wlanlist/list(hostname,mac,UID,state,quality,cipher,wmm_active,powersave,is_ap,ap_state,flags,flags_set,mode,speed,speed_rx,channel_width,streams)
|
||||||
|
$queryStr .= "&lanDevice=landevice:settings/landevice/list(ip,ethernet,ethernet_port,name,mac,active,online,wlan,speed)"; # LAN devices
|
||||||
|
#landevice:settings/landevice/list(name,ip,mac,UID,dhcp,wlan,ethernet,active,static_dhcp,manu_name,wakeup,deleteable,source,online,speed,wlan_UIDs,auto_wakeup,guest,url,wlan_station_type,vendorname)
|
||||||
|
#landevice:settings/landevice/list(name,ip,mac,parentname,parentuid,ethernet_port,wlan_show_in_monitor,plc,ipv6_ifid,parental_control_abuse,plc_UIDs)
|
||||||
$queryStr .= "&init=telcfg:settings/Foncontrol"; # Init
|
$queryStr .= "&init=telcfg:settings/Foncontrol"; # Init
|
||||||
$queryStr .= "&box_stdDialPort=telcfg:settings/DialPort"; #Dial Port
|
$queryStr .= "&box_stdDialPort=telcfg:settings/DialPort"; #Dial Port
|
||||||
$queryStr .= "&dectUser=telcfg:settings/Foncontrol/User/list(Id,Name,Intern,IntRingTone,AlarmRingTone0,RadioRingID,ImagePath,G722RingTone,G722RingToneName)"; # DECT Numbers
|
$queryStr .= "&dectUser=telcfg:settings/Foncontrol/User/list(Id,Name,Intern,IntRingTone,AlarmRingTone0,RadioRingID,ImagePath,G722RingTone,G722RingToneName)"; # DECT Numbers
|
||||||
@ -1386,6 +1389,13 @@ sub FRITZBOX_Readout_Run_Web($)
|
|||||||
}
|
}
|
||||||
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->radioCount", $runNo;
|
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->radioCount", $runNo;
|
||||||
|
|
||||||
|
# Create WLAN-List
|
||||||
|
my %wlanList;
|
||||||
|
foreach ( @{ $result->{wlanList} } ) {
|
||||||
|
$wlanList{$_->{mac}} = $_->{speed_rx};
|
||||||
|
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->wlanDevice->".$_->{mac}, $_->{speed_rx};
|
||||||
|
}
|
||||||
|
|
||||||
# Create LanDevice list and delete inactive devices
|
# Create LanDevice list and delete inactive devices
|
||||||
my %oldLanDevice;
|
my %oldLanDevice;
|
||||||
#collect current mac-readings (to delete the ones that are inactive or disappeared)
|
#collect current mac-readings (to delete the ones that are inactive or disappeared)
|
||||||
@ -1397,11 +1407,25 @@ sub FRITZBOX_Readout_Run_Web($)
|
|||||||
foreach ( @{ $result->{lanDevice} } ) {
|
foreach ( @{ $result->{lanDevice} } ) {
|
||||||
my $dIp = $_->{ip};
|
my $dIp = $_->{ip};
|
||||||
my $dName = $_->{name};
|
my $dName = $_->{name};
|
||||||
$dName .= " (WLAN)" if $_->{wlan} == 1;
|
|
||||||
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->landevice->$dIp", $dName;
|
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "fhem->landevice->$dIp", $dName;
|
||||||
$landevice{$dIp}=$dName;
|
$landevice{$dIp}=$dName;
|
||||||
# Create a reading if a landevice is connected
|
# Create a reading if a landevice is connected
|
||||||
if ($_->{active} == 1) {
|
if ($_->{active} == 1) {
|
||||||
|
if ($_->{ethernet} == 0 && $_->{wlan} == 1) {
|
||||||
|
$dName .= " (";
|
||||||
|
$dName .= "guest" if $_->{guest};
|
||||||
|
$dName .= "WLAN";
|
||||||
|
$dName .= ", " . $wlanList{$_->{mac}} . " Mbit/s" if defined $wlanList{$_->{mac}};
|
||||||
|
$dName .= ")";
|
||||||
|
}
|
||||||
|
if ( $_->{ethernet} == 1 ) {
|
||||||
|
$dName .= " (";
|
||||||
|
$dName .= "guest" if $_->{guest};
|
||||||
|
$dName .= "LAN" . $_->{ethernet_port};
|
||||||
|
$dName .= ", 1 Gbit/s" if $_->{speed} == 1000;
|
||||||
|
$dName .= ", " . $_->{speed} . " Mbit/s" if $_->{speed} != 1000 && $_->{speed} != 0;
|
||||||
|
$dName .= ")";
|
||||||
|
}
|
||||||
my $rName = "mac_".$_->{mac};
|
my $rName = "mac_".$_->{mac};
|
||||||
$rName =~ s/:/_/g;
|
$rName =~ s/:/_/g;
|
||||||
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, $rName, $dName;
|
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, $rName, $dName;
|
||||||
@ -4800,7 +4824,9 @@ sub FRITZBOX_fritztris($)
|
|||||||
|
|
||||||
<li><code>get <name> tr064Command <service> <control> <action> [[argName1 argValue1] ...] </code>
|
<li><code>get <name> tr064Command <service> <control> <action> [[argName1 argValue1] ...] </code>
|
||||||
<br>
|
<br>
|
||||||
Executes TR-064 actions (see <a href="http://avm.de/service/schnittstellen/">API description</a> of AVM)
|
Executes TR-064 actions (see <a href="http://avm.de/service/schnittstellen/">API description</a> of AVM).
|
||||||
|
<br>
|
||||||
|
argValues with spaces have to be enclosed in quotation marks.
|
||||||
<br>
|
<br>
|
||||||
Example: <code>get Fritzbox tr064Command X_AVM-DE_OnTel:1 x_contact GetDECTHandsetInfo NewDectID 1</code>
|
Example: <code>get Fritzbox tr064Command X_AVM-DE_OnTel:1 x_contact GetDECTHandsetInfo NewDectID 1</code>
|
||||||
<br>
|
<br>
|
||||||
@ -5169,7 +5195,9 @@ sub FRITZBOX_fritztris($)
|
|||||||
|
|
||||||
<li><code>get <name> tr064Command <service> <control> <action> [[argName1 argValue1] ...] </code>
|
<li><code>get <name> tr064Command <service> <control> <action> [[argName1 argValue1] ...] </code>
|
||||||
<br>
|
<br>
|
||||||
Führt über TR-064 Aktionen aus (siehe <a href="http://avm.de/service/schnittstellen/">Schnittstellenbeschreibung</a> von AVM)
|
Führt über TR-064 Aktionen aus (siehe <a href="http://avm.de/service/schnittstellen/">Schnittstellenbeschreibung</a> von AVM).
|
||||||
|
<br>
|
||||||
|
argValues mit Leerzeichen müssen in Anführungszeichen eingeschlossen werden.
|
||||||
<br>
|
<br>
|
||||||
Beispiel: <code>get Fritzbox tr064Command X_AVM-DE_OnTel:1 x_contact GetDECTHandsetInfo NewDectID 1</code>
|
Beispiel: <code>get Fritzbox tr064Command X_AVM-DE_OnTel:1 x_contact GetDECTHandsetInfo NewDectID 1</code>
|
||||||
<br>
|
<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user