diff --git a/FHEM/72_FRITZBOX.pm b/FHEM/72_FRITZBOX.pm index 74156e8a4..553def859 100644 --- a/FHEM/72_FRITZBOX.pm +++ b/FHEM/72_FRITZBOX.pm @@ -252,8 +252,9 @@ FRITZBOX_Set($$@) my $resultStr = ""; my $list = "alarm" - . " customerRingTone" . " convertRingTone" + . " createPwdFile" + . " customerRingTone" . " diversity" . " guestWlan:on,off" . " message" @@ -275,23 +276,32 @@ FRITZBOX_Set($$@) readingsSingleUpdate($hash,"alarm".$val[0]."_state",$val[1], 1); return undef; } - } - elsif ( lc $cmd eq 'convertringtone') - { + + } elsif ( lc $cmd eq 'convertringtone') { if (int @val > 0) { return FRITZBOX_ConvertRingTone $hash, @val; } - } - elsif ( lc $cmd eq 'customerringtone') - { + + } elsif ( lc $cmd eq 'createpwdfile') { + if (int @val > 0) + { + my $pwdFile = AttrVal( $name, "pwdFile", "fb_pwd.txt"); + open( FILE, ">".$pwdFile) + or return "Error when opening password file '$pwdFile': ".$!; + print FILE join( " ", @val); + close FILE + or return "Error when closing password file '$pwdFile': ".$!; + return "Created password file '$pwdFile'"; + } + + } elsif ( lc $cmd eq 'customerringtone') { if (int @val > 0) { return FRITZBOX_SetCustomerRingTone $hash, @val; } - } - elsif ( lc $cmd eq 'diversity') - { + + } elsif ( lc $cmd eq 'diversity') { if ( int @val == 2 && defined( $hash->{READINGS}{"diversity".$val[0]} ) && $val[1] =~ /^(on|off)$/ ) { my $state = $val[1]; @@ -301,9 +311,8 @@ FRITZBOX_Set($$@) readingsSingleUpdate($hash,"diversity".$val[0]."_state",$val[1], 1); return undef; } - } - elsif ( lc $cmd eq 'guestwlan') - { + + } elsif ( lc $cmd eq 'guestwlan') { if (int @val == 1 && $val[0] =~ /^(on|off)$/) { my $state = $val[0]; @@ -1538,22 +1547,26 @@ sub FRITZBOX_fritztris($)
Switches the alarm number (1, 2 or 3) on or off.
-
  • set <name> guestWLAN <on|off> -
    - Switches the guest WLAN on or off. -

  • +
  • set <name> convertRingTone <fullFilePath>
    - Converts the mp3-file fullFilePath to a G722 format and puts it in the same path. + Converts the mp3-file fullFilePath to the G722 format and puts it in the same path.
    - The file has to be placed on the file system of the fritzbox. + The file has to be placed on the file system of the Fritz!Box.

  • +
  • set <name> convertMusicOnHold <fullFilePath>
    Not implemented yet. Converts the mp3-file fullFilePath to a format that can be used for "Music on Hold".
    The file has to be placed on the file system of the fritzbox.

  • + +
  • set <name> createPwdFile <password> +
    + Creates a file that contains the telnet password. The file name corresponds to the one used for remote telnet access. +

  • +
  • set <name> customerRingTone <internalNumber> <fullFilePath>
    Uploads the file fullFilePath on the given handset. Only mp3 or G722 format is allowed. @@ -1562,6 +1575,7 @@ sub FRITZBOX_fritztris($)
    The upload takes about one minute before the tone is available.

  • +
  • set <name> diversity <number> <on|off>
    Switches the call diversity number (1, 2 ...) on or off. @@ -1569,6 +1583,12 @@ sub FRITZBOX_fritztris($)
    Note! The Fritz!Box allows also forwarding in accordance to the calling number. This is not included in this feature.

  • + +
  • set <name> guestWLAN <on|off> +
    + Switches the guest WLAN on or off. +

  • +
  • set <name> musicOnHold <fullFilePath>
    Not implemented yet. Uploads the file fullFilePath as "Music on Hold". Only mp3 or the MOH-format is allowed. @@ -1623,7 +1643,7 @@ sub FRITZBOX_fritztris($)
  • get <name> ringTones
    - Shows a list of ring tones that can be used. + Shows the list of ring tones that can be used.

  • @@ -1711,4 +1731,232 @@ sub FRITZBOX_fritztris($) =end html +=begin html_DE + + +

    FRITZBOX

    +
    + +
    + +=end html_DE + =cut- \ No newline at end of file