diff --git a/fhem/FHEM/72_FRITZBOX.pm b/fhem/FHEM/72_FRITZBOX.pm index 2dae9ddef..b334da718 100644 --- a/fhem/FHEM/72_FRITZBOX.pm +++ b/fhem/FHEM/72_FRITZBOX.pm @@ -3590,7 +3590,8 @@ sub FRITZBOX_TR064_Get_ServiceList($) my $host = AttrVal( $name, "fritzBoxIP", "fritz.box" ); my $url = 'http://'.$host.":49000/tr64desc.xml"; - my $returnStr = "TR-064 service actions on the device '$host'\n"; + my $returnStr = "_" x 100 ."\n\n"; + $returnStr .= " List of TR-064 services and actions that are allowed on the device '$host'\n"; FRITZBOX_Log $hash, 5, "Getting service page $url"; my $agent = LWP::UserAgent->new( env_proxy => 1, keep_alive => 1, protocols_allowed => ['http'], timeout => 10); @@ -3615,10 +3616,6 @@ sub FRITZBOX_TR064_Get_ServiceList($) # Get actions of each service foreach (@serviceArray) { - $returnStr .= "_" x 100 ."\n\n"; - $returnStr .= "Service: '$_->[0]' Control: '$_->[1]' XML: '$_->[2]'\n"; - $returnStr .= "-" x 100 ."\n"; - $url = 'http://'.$host.":49000".$_->[2]; FRITZBOX_Log $hash, 5, "Getting action page $url"; @@ -3628,6 +3625,18 @@ sub FRITZBOX_TR064_Get_ServiceList($) return "ServiceSCPD $url does not exist" if $response->is_error(); my $content = $response->content; + +# get version + $content =~ /(.*?)<\/major>/isg; + my $version = $1; + $content =~ /(.*?)<\/minor>/isg; + $version .= ".".$1; + + $returnStr .= "_" x 100 ."\n\n"; + $returnStr .= " Service: ".$_->[0]." Control: ".$_->[1]."\n"; + $returnStr .= " Spec: http://".$host.":49000".$_->[2]." Version: ".$version."\n"; + $returnStr .= "-" x 100 ."\n"; + while( $content =~ /(.*?)<\/action>/isg ) { my $serviceXML = $1; @@ -3636,7 +3645,7 @@ sub FRITZBOX_TR064_Get_ServiceList($) $serviceXML =~ /(.*?)<\/argumentlist>/is; my $argXML = $1; - $returnStr .= "$action ("; + $returnStr .= " $action ("; my @argArray = ($argXML =~ /(.*?)<\/argument>/isg); my @argOut; @@ -4116,13 +4125,18 @@ sub FRITZBOX_fritztris($)
  • get <name> tr064Command <service> <control> <action> [[parameterName1 parameterValue1] ...]
    - Executes TR-064 actions (see API description of AVM and on the box) + Executes TR-064 actions (see API description of AVM)
    Example: get Fritzbox tr064Command X_AVM-DE_OnTel:1 x_contact GetDECTHandsetInfo NewDectID 1
    Only available if the attribute "allowTR064Command" is set.

  • +
  • get <name> tr064ServiceListe +
    + Shows a list of TR-064 services and actions that are allowed on the device. +

  • + @@ -4415,13 +4429,17 @@ sub FRITZBOX_fritztris($)
  • get <name> tr064Command <service> <control> <action> [[parameterName1 parameterValue1] ...]
    - Führt über TR-064 Aktionen aus (siehe Schnittstellenbeschreibung von AVM und auf der Box) + Führt über TR-064 Aktionen aus (siehe Schnittstellenbeschreibung von AVM)
    Beispiel: get Fritzbox tr064Command X_AVM-DE_OnTel:1 x_contact GetDECTHandsetInfo NewDectID 1
    Muss zuvor über das Attribute "allowTR064Command" freigeschaltet werden.

  • +
  • get <name> tr064ServiceListe +
    + Zeigt die Liste der TR-064-Dienste und Aktionen, die auf dem Gerät erlaubt sind. +