system(„mplayer --af=volume=-20“ (IVNTTS_saveMP3(42182,„Guten Morgen! Heute ist „.$Wochentag.“ der „.strftime(“%e. %B“).", die aktuelle Außentemperatur beträgt „.$outtemp,“")));
Hat jemand einen Plan für mich?
Hi Christian und Thorsten. Erstmal vielen Dank an Dich Christian. Hast mir viel Arbeit abgenommen Hab das og. Script bei mir erfolgreich umgesetzt (bisher…Sonosintegration steht jetzt noch aus )
Jedoch wird mir der Monat in englisch ausgegeben. Hier mal mein gesamtes Script. Was muss ich hier och ändern?
<?
$outtemp = GetValueFormatted(33952 /*[Draußen\Klima\Temperatur]*/);
$outtemp = str_replace('.',',',$outtemp);
$Wochentage_Array = array(1=>"Montag",2=>"Dienstag",3=>"Mittwoch",4=>"Donnerstag",5=>"Freitag",6=>"Samstag",0=>"Sonntag");
$Wochentag_Heute = date("w");
$Wochentag = $Wochentage_Array[$Wochentag_Heute];
$time = strftime;
IVNTTS_saveMP3(53149 /*[Ivona]*/,"Guten Morgen! Heute ist ".$Wochentag."der ".strftime("%e. %B").",die aktuelle Außentemperatur beträgt ".$outtemp);
?>
Nachtrag: Das File wird mit o.g. Script ohne Probleme erstellt. In der Sonos Bibliothek kann ich es auch abrufen und über den Player abspielen lassen.
Nun habe ich versucht, das File direkt mit dem Befehl von Seite 1 über den entsprechenden Player abspielen zu lassen. Hier das Script:
<?
$outtemp = GetValueFormatted(33952 /*[Draußen\Klima\Temperatur]*/);
$outtemp = str_replace('.',',',$outtemp);
$Wochentage_Array = array(1=>"Montag",2=>"Dienstag",3=>"Mittwoch",4=>"Donnerstag",5=>"Freitag",6=>"Samstag",0=>"Sonntag");
$Wochentag_Heute = date ("w");
$Wochentag = $Wochentage_Array[$Wochentag_Heute];
//$time = date;
SNS_PlayFiles(16606 /*[Sonos_neu\Küche]*/,array(IVNTTS_saveMP3(53149 /*[Ivona]*/,"Guten Morgen! Heute ist ".$Wochentag.",die aktuelle Außentemperatur beträgt ".$outtemp)));
?>
$time = date; musste ich ausklammern, da direkt eine Fehlermeldung kam. Nun generiert er zwar das File und legt es ab, jedoch bekomme ich folgende Rückmeldung:
Warning: Missing argument 3 for SNS_PlayFiles(), called in /var/lib/symcon/scripts/39806.ips.php on line 8 and defined in /var/lib/symcon/scripts/__generated.inc.php on line 213
Notice: Undefined variable: volumeChange in /var/lib/symcon/scripts/__generated.inc.php on line 217
Fatal error: Uncaught exception 'Exception' with message 'File (/home/pi/ivona/d0394857819a9550b214cb79b0854043.mp3) has to be located on a Samba share (e.g. //ipsymcon.fritz.box/tts/text.mp3) or a HTTP server (e.g. http://ipsymcon.fritz.box/tts/text.mp3)' in /var/lib/symcon/modules/SymconSonos/Sonos/module.php:433
Stack trace:
#0 /var/lib/symcon/scripts/__generated.inc.php(217): Sonos->PlayFiles(Array, NULL)
#1 /var/lib/symcon/scripts/39806.ips.php(8): SNS_PlayFiles(16606, Array)
#2 {main}
thrown in /var/lib/symcon/modules/SymconSonos/Sonos/module.php on line 433
Abort Processing during Fatal-Error: Uncaught exception 'Exception' with message 'File (/home/pi/ivona/d0394857819a9550b214cb79b0854043.mp3) has to be located on a Samba share (e.g. //ipsymcon.fritz.box/tts/text.mp3) or a HTTP server (e.g. http://ipsymcon.fritz.box/tts/text.mp3)' in /var/lib/symcon/modules/SymconSonos/Sonos/module.php:433
Stack trace:
#0 /var/lib/symcon/scripts/__generated.inc.php(217): Sonos->PlayFiles(Array, NULL)
#1 /var/lib/symcon/scripts/39806.ips.php(8): SNS_PlayFiles(16606, Array)
#2 {main}
thrown
Error in Script /var/lib/symcon/modules/SymconSonos/Sonos/module.php on Line 433
Entsprechende SMB Freigabe auf dem Raspi besteht. Wie gesagt, per Sonos App kann ich ebenfalls ohne Probleme auf die erstellte File zugreifen
Viele Grüße
Flo