Code : Tout sélectionner
if ($this->getConfiguration('jpiAction') == 'tts') {
$action = 'http://' . $eqLogic->getConfiguration('jpiIp') . ':' . $eqLogic->getConfiguration('jpiPort') . '/?action=tts&message=' . urlencode($_options['message']) . $this->getConfiguration('jpiParametres') . '&volume=' . urlencode($_options['title']) . '&' . $this->getConfiguration('jpiOptions') . '&__JPIPLUG=1';
$eqLogic->executerequest($action);
}
Il est donc normal que "volume" contienne le message.[2017-11-11 00:11:10][SCENARIO] Exécution du sous-élément de type [action] : action
[2017-11-11 00:11:10][SCENARIO] Affectation de la variable ASK_TTS => rien = rien
[2017-11-11 00:11:10][SCENARIO] Demande Array
(
[title] => Fait-il beau aujourd'hui ?
[message] => Fait-il beau aujourd'hui ?
[answer] => Array
(
[0] => oui
[1] => non
)
[timeout] => 15
[variable] => ASK_TTS
)
[2017-11-11 00:11:17][SCENARIO] Réponse peut-être
Voilà la modification que j'ai testé et qui permet de faire fonctionner le tout:
"JPI.class.php":
Code : Tout sélectionner
573 if ($this->getConfiguration('jpiAction') == 'tts') {
574 // we setup default volume at system volume (-1)
575 $_ttsVolume = -1;
576 if (is_numeric($_options['title'])) {
577 $_ttsVolume = $_options['title'];
578 }
579 log::add('JPI', 'DEBUG', 'Le volume est setté à: '.$_ttsVolume);
580 // $action = 'http://' . $eqLogic->getConfiguration('jpiIp') . ':' . $eqLogic->getConfiguration('jpiPort') . '/?action=tts&message=' . urlencode($_options['message']) . $this->getConfiguration('jpiParametres') . '&volume=' . urlencode($_options['title']) . '
&' . $this->getConfiguration('jpiOptions') . '&__JPIPLUG=1';
581 $action = 'http://' . $eqLogic->getConfiguration('jpiIp') . ':' . $eqLogic->getConfiguration('jpiPort') . '/?action=tts&message=' . urlencode($_options['message']) . $this->getConfiguration('jpiParametres') . '&volume=' . urlencode($_ttsVolume) . '&' . $this
->getConfiguration('jpiOptions') . '&__JPIPLUG=1';
582 $eqLogic->executerequest($action);
583 }