Erreur Jeedom - SNIPS


#1

Bonjour,

Je rencontre quelques soucis pour la gestion des intents dans mon Jeedom.

  • La reconnaissance est bien prise en compte dans le satellite et la VM
  • La détection de la phrase est excellente

Par contre comme me l’a fait remarqué Cedcox, l’intent n’est pas le bon

Ce que donne le SAM Watch :

Blockquote
pi@snips-sat-salle:~ $ sam watch
[11:03:24] Watching on snips-vm1:1883 (MQTT)
[11:03:37] [Hotword] detected on site salle, for model default
[11:03:37] [Asr] was asked to stop listening on site salle
[11:03:37] [Hotword] was asked to toggle itself ‘off’ on site salle
[11:03:37] [Dialogue] session with id ‘6939fa8d-4bb7-46cf-b9da-a6a07e7ade26’ was started on site salle
[11:03:37] [AudioServer] was asked to play a wav of 41.1 kB with id ‘d4839c93-f615-4683-9802-4d0195d0a43e’ on site salle
[11:03:38] [AudioServer] finished playing wav with id ‘d4839c93-f615-4683-9802-4d0195d0a43e’
[11:03:38] [Asr] was asked to listen on site salle
[11:03:42] [Asr] captured text “allume la lumière de la chambre parentale” in 3.0s
[11:03:42] [Asr] was asked to stop listening on site salle
[11:03:42] [AudioServer] was asked to play a wav of 93.1 kB with id ‘0a45bcc3-bda3-4133-860f-998de2770841’ on site salle
[11:03:43] [AudioServer] finished playing wav with id ‘0a45bcc3-bda3-4133-860f-998de2770841’
[11:03:43] [Nlu] was asked to parse input “allume la lumière de la chambre parentale”
[11:03:43] [Nlu] detected intent valf:TurnOnJeedom with probability 1.000 for input “allume la lumière de la chambre parentale”
Slots ->
device_name -> lumière (confidence: 1.000)
house_room -> chambre parentale (confidence: 1.000)
[11:03:43] [Dialogue] New intent detected valf:TurnOnJeedom with probability 1.000
Slots ->
device_name -> lumière (confidence: 1.000)
house_room -> chambre parentale (confidence: 1.000)
[11:03:43] [Dialogue] was ask to end session with id 6939fa8d-4bb7-46cf-b9da-a6a07e7ade26 by saying ‘Désolé, je ne trouve pas les actions !’
[11:03:43] [Tts] was asked to say “Désolé, je ne trouve pas les actions !”
[11:03:43] [AudioServer] was asked to play a wav of 83.9 kB with id ‘eda92767-7e20-4986-aa66-ba68c3715fa1’ on site salle
[11:03:46] [AudioServer] finished playing wav with id ‘eda92767-7e20-4986-aa66-ba68c3715fa1’
[11:03:46] [Tts] finished speaking with id ‘0aaefc43-b954-47cd-a159-c844a95583b4’
[11:03:46] [Dialogue] session with id ‘6939fa8d-4bb7-46cf-b9da-a6a07e7ade26’ was ended on site salle. The session ended as expected
[11:03:46] [Asr] was asked to stop listening on site salle
[11:03:46] [Hotword] was asked to toggle itself ‘on’ on site salle

Et pour ce qui est du plugin SNIPS

Blockquote
[2019-01-28 12:03:37][DEBUG] : [logmq] code: 16 : Client mosq/[43vQa?^Jw55QbW8O9 received PUBLISH (d0, q0, r0, m0, ‘hermes/hotword/default/detected’, … (169 bytes))
[2019-01-28 12:03:37][DEBUG] : [message] Received message. Topic:hermes/hotword/default/detected
[2019-01-28 12:03:37][DEBUG] : [message] Set salle => snipsMsgSiteId
[2019-01-28 12:03:37][DEBUG] : [logmq] code: 16 : Client mosq/[43vQa?^Jw55QbW8O9 received PUBLISH (d0, q0, r0, m0, ‘hermes/dialogueManager/sessionStarted’, … (119 bytes))
[2019-01-28 12:03:37][DEBUG] : [message] Received message. Topic:hermes/dialogueManager/sessionStarted
[2019-01-28 12:03:37][DEBUG] : [message] Set salle => snipsMsgSiteId
[2019-01-28 12:03:43][DEBUG] : [logmq] code: 16 : Client mosq/[43vQa?^Jw55QbW8O9 received PUBLISH (d0, q0, r0, m0, ‘hermes/intent/valf:TurnOnJeedom’, … (1307 bytes))
[2019-01-28 12:03:43][DEBUG] : [message] Received message. Topic:hermes/intent/valf:TurnOnJeedom
[2019-01-28 12:03:43][DEBUG] : [message] Set salle => snipsMsgSiteId
[2019-01-28 12:03:43][DEBUG] : [message] Find a snips device which is not in the list:salle [2019-01-28 12:03:43][DEBUG] : [postSave] post saved
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Intent:valf:TurnOnJeedom siteId:salle sessionId:6939fa8d-4bb7-46cf-b9da-a6a07e7ade26
[2019-01-28 12:03:43][DEBUG] : [extractSlotsValues] Checking slots: device_name
[2019-01-28 12:03:43][DEBUG] : [extractSlotsValues] No, this does not exist in the array :device_name
[2019-01-28 12:03:43][DEBUG] : [extractSlotsValues] Checking slots: house_room
[2019-01-28 12:03:43][DEBUG] : [extractSlotsValues] No, this does not exist in the array :house_room
[2019-01-28 12:03:43][DEBUG] : [setSlotsCmd] Set slots cmd values
[2019-01-28 12:03:43][DEBUG] : [setSlotsCmd] Slots name is :device_name
[2019-01-28 12:03:43][DEBUG] : [setSlotsCmd] Slots name is :house_room
[2019-01-28 12:03:43][DEBUG] : [executeCallbackScenario] Intent: valf:TurnOnJeedom
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Cur binding name : Commande Conditionnelle [2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Binding count is : 1
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Snips count is : 2
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Cur binding name : Commande non Conditionnelle
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Binding count is : 0 [2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Snips count is : 2
[2019-01-28 12:03:43][DEBUG] : [generateFeedback] Generating feedback text
[2019-01-28 12:03:43][DEBUG] : [generateFeedback] The 0 variable cmd is not set
[2019-01-28 12:03:43][DEBUG] : [playTTS] Player: #[Snips-Intents][Snips-TTS-salle][say]# Message: Désolé, je ne trouve pas les actions ! Title: default
[2019-01-28 12:03:43][DEBUG] : [execute] cmd: say
[2019-01-28 12:03:43][DEBUG] : [execute] siteId: salle asked to say :Désolé, je ne trouve pas les actions !
[2019-01-28 12:03:43][DEBUG] : [sayFeedback] Publish: Désolé, je ne trouve pas les actions !
[2019-01-28 12:03:43][DEBUG] : [publish] published message: {“text”:“D\u00e9sol\u00e9, je ne trouve pas les actions !”,“sessionId”:“6939fa8d-4bb7-46cf-b9da-a6a07e7ade26”} to topic: hermes/dialogueManager/endSession
[2019-01-28 12:03:44][DEBUG] : [resetSlotsCmd] Reset all the slots
[2019-01-28 12:03:44][DEBUG] : [resetSlotsCmd] Set => snipsMsgSiteId
[2019-01-28 12:03:46][DEBUG] : [logmq] code: 16 : Client mosq/[43vQa?^Jw55QbW8O9 received PUBLISH (d0, q0, r0, m0, ‘hermes/dialogueManager/sessionEnded’, … (122 bytes))
[2019-01-28 12:03:46][DEBUG] : [message] Received message. Topic:hermes/dialogueManager/sessionEnded
[2019-01-28 12:03:46][DEBUG] : [message] Set salle => snipsMsgSiteId

Les log du scénario

Blockquote
[2019-01-28 11:55:25][SCENARIO] Start : Lancement provoque.
[2019-01-28 11:55:25][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 11:55:25][SCENARIO] Evaluation de la condition : [""== “”] = Vrai
[2019-01-28 11:55:25][SCENARIO] Exécution du sous-élément de type [action] : then
[2019-01-28 11:55:25][SCENARIO] Exécution d’un bloc élément : 208
[2019-01-28 11:55:25][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 11:55:25][SCENARIO] Evaluation de la condition : [""==“default” OU “”==“null”] = Faux [2019-01-28 11:55:25][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 11:55:25][SCENARIO] Affectation de la variable snips_house_room => =
[2019-01-28 11:55:25][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 11:55:25][SCENARIO] Evaluation de la condition : [""==“LightsSetJeedom”] = Faux
[2019-01-28 11:55:25][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 11:55:25][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 11:55:25][SCENARIO] Evaluation de la condition : [""==“LightsTurnOffJeedom”] = Faux [2019-01-28 11:55:25][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 11:55:25][SCENARIO] Fin correcte du scénario

Cedcox m’a fait remonter le défaut suivant
Intent: valf:TurnOnJeedom
qui devrait être
snips:LightsSetJeedom

Pourtant Jeedom ne me propose pas de version plus récente du plugin SNIPS

Apparemment on pourrait savoir d’ou vient le problème dans les lignes ci-dessous :

Blockquote

[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Cur binding name : Commande Conditionnelle
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Binding count is : 1
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Snips count is : 2
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Cur binding name : Commande non Conditionnelle
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Binding count is : 0
[2019-01-28 12:03:43][DEBUG] : [findAndDoAction] Snips count is : 2

Savez-vous d’ou cela peut venir ?

Merci


#2

Hello,

Comme répondu sur le forum jeedom, c’est l’app jeedom dans la console snips qui doit être mis à jour vers la version “snips” et non plus celle de “valf”.

Mais on vient de me souffler dans l’oreillette que ça devrait quand même marcher avec l’app faite par “valf”.

Attendons donc un indice des experts :slight_smile:

Ced


#3

Hello @maxrephenix :

It shouldn’t be an issue if using Val titled assistant of Snips titled assistant. As long as the loaded assistant corresponds to the one currently installed.

From the log, I guess the issue is caused by unmatching.

Snips plugin bindings match the used slots number first, which mean that if your binding has 3 used slots(This is shown on the binding card), it will only be executed when there are 3 slots mentioned in the coming message. Your logs seem that there is 1 slot used and 0 slots used for the bindings under this intent, but the coming message contains 2 slots. So there is no matching found. Then it replies your désolé…

About the scenario, since I don’t see where this scenario is triggered, I am a bit confused why the intent name is empty. Could you provide more information?


#4

Ok so, here is where we are.

Now, the number of binding is OK with number of slot.

We try this ( https://docs.snips.ai/articles/raspberrypi/jeedom/fr#i-combiner-une-liaison-snips-avec-un-scenario-jeedom )

Here is the config :

Here is the scenario :

There is a little error in intent name but you’ll understand bellow :wink:

Here is the log of the plugin when we try “Eteins la lumière de la chambre parentale” (Switch off light in bedroom)
In snips, all is Ok, Good intent, good slots.

[2019-01-28 20:38:15][DEBUG] : [logmq] code: 16 : Client mosq/GkwEfp0r\pjIODB\At received PUBLISH (d0, q0, r0, m0, 'hermes/hotword/default/detected', ... (169 bytes))
[2019-01-28 20:38:15][DEBUG] : [message] Received message. Topic:hermes/hotword/default/detected
[2019-01-28 20:38:15][DEBUG] : [logmq] code: 16 : Client mosq/GkwEfp0r\pjIODB\At received PUBLISH (d0, q0, r0, m0, 'hermes/dialogueManager/sessionStarted', ... (119 bytes))
[2019-01-28 20:38:15][DEBUG] : [message] Received message. Topic:hermes/dialogueManager/sessionStarted
[2019-01-28 20:38:20][DEBUG] : [logmq] code: 16 : Client mosq/GkwEfp0r\pjIODB\At received PUBLISH (d0, q0, r0, m0, 'hermes/intent/lightsSetJeedom', ... (1126 bytes))
[2019-01-28 20:38:20][DEBUG] : [message] Received message. Topic:hermes/intent/lightsSetJeedom
[2019-01-28 20:38:20][DEBUG] : [message] Find a snips device which is not in the list:salle
[2019-01-28 20:38:20][DEBUG] : [postSave] post saved
[2019-01-28 20:38:20][DEBUG] : [findAndDoAction] Intent:lightsSetJeedom siteId:salle sessionId:6176a73d-1201-477c-aef4-dc563c5651b9
[2019-01-28 20:38:20][DEBUG] : [extractSlotsValues] Checking slots: house_room
[2019-01-28 20:38:20][DEBUG] : [extractSlotsValues] No, this does not exist in the array :house_room
[2019-01-28 20:38:20][DEBUG] : [setSlotsCmd] Set slots cmd values
[2019-01-28 20:38:20][DEBUG] : [setSlotsCmd] Slots name is :house_room
[2019-01-28 20:38:21][DEBUG] : [executeCallbackScenario]  Intent: lightsSetJeedom
[2019-01-28 20:38:21][DEBUG] : [findAndDoAction] Cur binding name : Commande Conditionnelle
[2019-01-28 20:38:21][DEBUG] : [findAndDoAction] Binding count is : 1
[2019-01-28 20:38:21][DEBUG] : [findAndDoAction] Snips count is : 1
[2019-01-28 20:38:21][DEBUG] : [findAndDoAction] Binding has corr number of slot: Commande Conditionnelle
[2019-01-28 20:38:21][DEBUG] : [findAndDoAction] [Condition] Condition Aft string: chambre parentale
[2019-01-28 20:38:21][DEBUG] : [findAndDoAction] [Condition] Condition Aft value index: 0 value: chambre1
[2019-01-28 20:38:21][DEBUG] : [findAndDoAction] [Condition] Condition Aft value index: 1 value: chambreparentale
[2019-01-28 20:38:21][DEBUG] : [findAndDoAction] [Condition] Condition Aft value index: 2 value: chambreprincipale
[2019-01-28 20:38:21][DEBUG] : [generateFeedback] Generating feedback text
[2019-01-28 20:38:21][DEBUG] : [generateFeedback] The 0 variable cmd is not set
[2019-01-28 20:38:21][DEBUG] : [playTTS] Player: #[Snips-Intents][Snips-TTS-salle][say]# Message: Désolé, je ne trouve pas les actions ! Title: default
[2019-01-28 20:38:21][DEBUG] : [execute] cmd: say
[2019-01-28 20:38:21][DEBUG] : [execute] siteId: salle asked to say :Désolé, je ne trouve pas les actions !
[2019-01-28 20:38:21][DEBUG] : [sayFeedback] Publish: Désolé, je ne trouv pas les actions !
[2019-01-28 20:38:21][DEBUG] : [publish] published message: {"text":"D\u00e9sol\u00e9, je ne trouve pas les actions !","sessionId":"6176a73d-1201-477c-aef4-dc563c5651b9"} to topic: hermes/dialogueManager/endSession
[2019-01-28 20:38:22][DEBUG] : [resetSlotsCmd] Reset all the slots
[2019-01-28 20:38:24][DEBUG] : [logmq] code: 16 : Client mosq/GkwEfp0r\pjIODB\At received PUBLISH (d0, q0, r0, m0, 'hermes/dialogueManager/sessionEnded', ... (122 bytes))
[2019-01-28 20:38:24][DEBUG] : [message] Received message. Topic:hermes/dialogueManager/sessionEnded

Here is the log of scenario when action binding call it :

[2019-01-28 20:37:07][SCENARIO] Start : Lancement provoque.
[2019-01-28 20:37:07][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:37:07][SCENARIO] Evaluation de la condition : [""== ""] = Vrai
[2019-01-28 20:37:07][SCENARIO] Exécution du sous-élément de type [action] : then
[2019-01-28 20:37:07][SCENARIO] Exécution d'un bloc élément : 208
[2019-01-28 20:37:07][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:37:07][SCENARIO] Evaluation de la condition : [""=="default" OU ""=="null"] = Faux
[2019-01-28 20:37:07][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 20:37:07][SCENARIO] Affectation de la variable snips_house_room =>  =
[2019-01-28 20:37:07][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:37:07][SCENARIO] Evaluation de la condition : [""=="ightsSetJeedom"] = Faux
[2019-01-28 20:37:07][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 20:37:07][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:37:07][SCENARIO] Evaluation de la condition : [""=="ightsTurnOffJeedom"] = Faux
[2019-01-28 20:37:07][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 20:37:07][SCENARIO] Fin correcte du scénario

it seems that variables are not passed to scenario (room_house, intent name etc…)

So, as workaround, we try to activate the callback. That’s work but i think there is a litle bug. The first letter of intent disappeared :

but, if we modify the intent name in scenario condition, it’s OK, the scenario is executed and all works. here is the log of scenario with callback.

------------------------------------
[2019-01-28 20:50:08][SCENARIO] Start : Lancement provoque. Tags : {"#plugin#":"snips","#intent#":"ightsSetJeedom","#siteId#":"salle","#probability#":"0.54042584","#house_room#":"chambre parentale"}
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:50:08][SCENARIO] Evaluation de la condition : ["chambre parentale"== ""] = Faux
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 20:50:08][SCENARIO] Affectation de la variable snips_house_room => chambre parentale = chambre parentale
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:50:08][SCENARIO] Evaluation de la condition : ["ightsSetJeedom"=="ightsSetJeedom"] = Vrai
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [action] : then
[2019-01-28 20:50:08][SCENARIO] Exécution d'un bloc élément : 210
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:50:08][SCENARIO] Evaluation de la condition : ["chambre parentale"=="salon" OU "chambre parentale"=="salle" OU "chambre parentale"=="salle à manger"] = Faux
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 20:50:08][SCENARIO] Exécution d'un bloc élément : 213
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:50:08][SCENARIO] Evaluation de la condition : ["chambre parentale"=="cuisine"] = Faux
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [action] : else
[2019-01-28 20:50:08][SCENARIO] Exécution d'un bloc élément : 214
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [condition] : if
[2019-01-28 20:50:08][SCENARIO] Evaluation de la condition : ["chambre parentale"=="chambre 1" OU "chambre parentale"=="ma chambre" OU "chambre parentale"=="chambre parentale" OU "chambre parentale"=="chambre principale"] = Vrai
[2019-01-28 20:50:08][SCENARIO] Exécution du sous-élément de type [action] : then
[2019-01-28 20:50:08][SCENARIO] Exécution de la commande [Chambre 1][Lumière][On]
[2019-01-28 20:50:08][SCENARIO] Exécution d'un bloc élément : 215
[.......]

The problem with documentation of jeedom is that in English version, we can’t find the same part as in French version for “I. Combiner une liaison avec un scenario jeedom”
And in French part, we can’t find the callback scenario part.

So, is the callback method is the new method to use and the french part is deprecated ?
is there a bug with the intent name passed to scenario or we did an error somewhere in the config ?

Thank you for your help :slight_smile:


#5

Good evening,
Thank you for the info.
I updated the SNIPS APP in the official SNIPS version
Everything is published in the VM and the RPI3 (Satellite).

When I give a directive now:

  • Conditional or unconditional order: NOK
  • “ACTION BINDING” customized for a part: OK