alors j’ai bricolé le snips.binding.action.class.php, j’ai commenté (cf dessous), pour forcer le check et le reste s’éxecute normalement ! Enfin autant que faire se peut, car je me doute que le check n’était pas tout à fait là au hasard … Il m’exécute toutes les actions pour tous les bindings de l’intent reconnu (Cecece:CloseCoverJeedom dans l’exemple dessous) qui ont juste le bon nombre de Slots… il ne matche pas les valeurs des slots, normal ça doit être le rôle de la fonction…
Donc, en remettant la fonction telle qu’elle était, il faut comprendre pourquoi cette fonction ne retourne pas true, alors qu’il devrait y avoir en effet un seul et unique match si windows_devices et house_room matchent tous les deux avec les valeurs dans le binding. Mauvaise récupération des valeurs envoyées par SNIPS ??
Tu me diras s’il y a d’autres tests qui seraient intéressants pour trouver.
Fonction modifiée:
function is_all_condition_matched()
{
$res = 1;
/*// check each condition expression
foreach ($this->conditions as $condition) {
$res *= $condition->is_true() ? 1 : 0;
}*/
return $res ? true : false;
}
Log avec Fonction commentée
[2021-01-10 15:25:31][DEBUG] : [SnipsHermes] <mqtt_on_message> received message. topic:hermes/intent/Cecece:CloseCoverJeedom
[2021-01-10 15:25:31][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"sessionId":"88c44a91-3064-4ffa-878e-39e817a6a352"} to topic: hermes/dialogueManager/endSession
[2021-01-10 15:25:31][INFO] : [SnipsHandler] <intent_detected> jeedom intent detected :Cecece:CloseCoverJeedom
[2021-01-10 15:25:31][DEBUG] : [SnipsUtils] <extract_slots_value>
[2021-01-10 15:25:31][DEBUG] : [SnipsUtils] <set_slot_cmd>
[2021-01-10 15:25:31][DEBUG] : [SnipsUtils] <set_slot_cmd> slots name is :window_devices
[2021-01-10 15:25:31][DEBUG] : [SnipsUtils] <set_slot_cmd> slots name is :house_room
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_condition> bindings found :17
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_condition> coming slot number :2
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name>
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Store Terrasse Sud (Close)
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet chambre ABC (Close)
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet chambre XYZ (Close)
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet escalier (Close)
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet chambre d'ami (Close)
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet baie vitrée rochelle (Close)
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet fenêtre droite rochelle (Close)
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet fenêtre gauche rochelle (Close)
[2021-01-10 15:25:31][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet étage (Close)
[2021-01-10 15:25:31][INFO] : [SnipsBindingAction] <execute> cmd: ##209##
[2021-01-10 15:25:31][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :[Voilà|Ok|Compris], c'est fait! Le {#} de la {#} est fermé.
[2021-01-10 15:25:31][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1153#
[2021-01-10 15:25:31][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1152#
[2021-01-10 15:25:31][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Compris, c'est fait! Le volet de la \u00e9tage est ferm\u00e9."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:31][INFO] : [SnipsBindingAction] <execute> cmd: ##1256##
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :Voilà, c'est fait! Le volet de la {#} est totalement fermé.
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1152#
[2021-01-10 15:25:32][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Voil\u00e0, c'est fait! Le volet de la \u00e9tage est totalement ferm\u00e9."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:32][INFO] : [SnipsBindingAction] <execute> cmd: ##1284##
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :Voilà, c'est fait! Le volet de la {#} est totalement fermé.
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1152#
[2021-01-10 15:25:32][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Voil\u00e0, c'est fait! Le volet de la \u00e9tage est totalement ferm\u00e9."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:32][INFO] : [SnipsBindingAction] <execute> cmd: ##1336##
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :Voilà, c'est fait! Le volet de l'{#} est totalement fermé.
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1152#
[2021-01-10 15:25:32][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Voil\u00e0, c'est fait! Le volet de l'\u00e9tage est totalement ferm\u00e9."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:32][INFO] : [SnipsBindingAction] <execute> cmd: ##1350##
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :Voilà, c'est fait! Le volet de la {#} est totalement fermé.
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1152#
[2021-01-10 15:25:32][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Voil\u00e0, c'est fait! Le volet de la \u00e9tage est totalement ferm\u00e9."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:32][INFO] : [SnipsBindingAction] <execute> cmd: ##1270##
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :[Voilà|Ok|Compris], c'est fait! Le volet de la {#} est totalement fermé.
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1153#
[2021-01-10 15:25:32][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Compris, c'est fait! Le volet de la volet est totalement ferm\u00e9."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:32][INFO] : [SnipsBindingAction] <execute> cmd: ##1322##
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :[Voilà|Ok|Compris], c'est fait! Le volet de la {#} est totalement fermé.
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1153#
[2021-01-10 15:25:32][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Voil\u00e0, c'est fait! Le volet de la volet est totalement ferm\u00e9."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:32][INFO] : [SnipsBindingAction] <execute> cmd: ##1308##
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :[Voilà|Ok|Compris], c'est fait! Le volet de la {#} est totalement fermé.
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> cmd is #1153#
[2021-01-10 15:25:32][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Ok, c'est fait! Le volet de la volet est totalement ferm\u00e9."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:32][INFO] : [SnipsBindingScenario] <execute> scenario: Fermeture volets étage
[2021-01-10 15:25:32][DEBUG] : [SnipsTts] <fill_vars_to_raw> fill vars to raw :Voilà, c'est fait! Tous les volets de l'étage sont fermés.
[2021-01-10 15:25:32][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"notification","text":"Voil\u00e0, c'est fait! Tous les volets de l'\u00e9tage sont ferm\u00e9s."}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:33][DEBUG] : [SnipsUtils] <reset_slots_cmd>
[2021-01-10 15:25:33][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"siteId":"default","init":{"type":"action","sendIntentNotRecognized":true}} to topic: hermes/dialogueManager/startSession
[2021-01-10 15:25:33][DEBUG] : [SnipsHermes] <mqtt_on_message> received message. topic:hermes/dialogueManager/sessionEnded
[2021-01-10 15:25:33][DEBUG] : [SnipsHandler] <session_ended>
Log avec Fonction d'origine
[2021-01-10 16:09:28][DEBUG] : [SnipsHermes] <mqtt_on_message> received message. topic:hermes/hotword/default/detected
[2021-01-10 16:09:28][DEBUG] : [SnipsHandler] <hotword_detected>
[2021-01-10 16:09:28][DEBUG] : [SnipsHermes] <mqtt_on_message> received message. topic:hermes/dialogueManager/sessionStarted
[2021-01-10 16:09:28][DEBUG] : [SnipsHandler] <check_site_id_existnce>
[2021-01-10 16:09:28][DEBUG] : [SnipsUtils] <get_snips_intent_object> Jeedom >= 3.3.3
[2021-01-10 16:09:28][DEBUG] : [SnipsUtils] <get_snips_intent_object> Jeedom >= 3.3.3
[2021-01-10 16:09:28][DEBUG] : [SnipsHandler] <session_started>
[2021-01-10 16:09:33][DEBUG] : [SnipsHermes] <mqtt_on_message> received message. topic:hermes/intent/Cecece:CloseCoverJeedom
[2021-01-10 16:09:33][DEBUG] : [SnipsHermes] <mqtt_publish> published message: {"sessionId":"a2b1ad80-2b0c-443b-8412-8af09711721c"} to topic: hermes/dialogueManager/endSession
[2021-01-10 16:09:33][INFO] : [SnipsHandler] <intent_detected> jeedom intent detected :Cecece:CloseCoverJeedom
[2021-01-10 16:09:33][DEBUG] : [SnipsUtils] <extract_slots_value>
[2021-01-10 16:09:33][DEBUG] : [SnipsUtils] <set_slot_cmd>
[2021-01-10 16:09:33][DEBUG] : [SnipsUtils] <set_slot_cmd> slots name is :window_devices
[2021-01-10 16:09:33][DEBUG] : [SnipsUtils] <set_slot_cmd> slots name is :house_room
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_condition> bindings found :17
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_condition> coming slot number :2
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name>
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Store Terrasse Sud (Close)
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet chambre ABC (Close)
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet chambre XYZ (Close)
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet escalier (Close)
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet chambre d'ami (Close)
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet baie vitrée rochelle (Close)
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet fenêtre droite rochelle (Close)
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet fenêtre gauche rochelle (Close)
[2021-01-10 16:09:33][DEBUG] : [SnipsBinding] <get_bindings_match_slots_name> binding has good number of slot: Volet étage (Close)
[2021-01-10 16:09:33][ERROR] : Erreur sur snips::deamon_hermes() : Too few arguments to function SnipsBindingCondition::is_true(), 0 passed in /var/www/html/plugins/snips/core/class/snips.binding.class.php on line 116 and exactly 1 expected
[2021-01-10 16:09:33][DEBUG] : [SnipsHermes] <mqtt_on_disconnect> disconnected from the broker with code: 0