diff --git a/fhem/FHEM/72_FRITZBOX.pm b/fhem/FHEM/72_FRITZBOX.pm
index 496291e71..73c2be1e7 100644
--- a/fhem/FHEM/72_FRITZBOX.pm
+++ b/fhem/FHEM/72_FRITZBOX.pm
@@ -131,7 +131,8 @@ sub FRITZBOX_Initialize($)
$hash->{SetFn} = "FRITZBOX_Set";
$hash->{GetFn} = "FRITZBOX_Get";
$hash->{AttrFn} = "FRITZBOX_Attr";
- $hash->{AttrList} = "disable:0,1 "
+ $hash->{AttrList} = "allowShellCommand:0,1 "
+ ."disable:0,1 "
."defaultCallerName "
."defaultUploadDir "
."fritzBoxIP "
@@ -418,7 +419,7 @@ sub FRITZBOX_Set($$@)
##########################################
sub FRITZBOX_Get($@)
{
- my ($hash, $name, $cmd) = @_;
+ my ($hash, $name, $cmd, @val) = @_;
my $returnStr;
if (lc $cmd eq "ringtones")
@@ -428,8 +429,14 @@ sub FRITZBOX_Get($@)
$returnStr .= join "\n", sort values %ringTone;
return $returnStr;
}
-
+ elsif ( lc $cmd eq "shellcommand" && int @val && AttrVal( $name, "allowShellCommand", 0 ) )
+ {
+ my $shCmd = join " ", @val;
+ return FRITZBOX_Exec( $hash, $shCmd );
+ }
my $list = "ringTones:noArg";
+ $list .= " shellCommand"
+ if AttrVal( $name, "allowShellCommand", 0 );
return "Unknown argument $cmd, choose one of $list";
} # end FRITZBOX_Get
@@ -2676,13 +2683,26 @@ sub FRITZBOX_fritztris($)
Shows the list of ring tones that can be used.
+
+
get <name> shellCommand <Command>
+ defaultCallerName
+ allowShellCommand <0 | 1>
+ defaultCallerName <Text>
fritzBoxIP
+ fritzBoxIP <IP Address>
get <name> shellCommand <Befehl>
+ defaultCallerName
+ allowShellCommand <0 | 1>
+ defaultCallerName <Text>
fritzBoxIP
+ fritzBoxIP <IP-Adresse>