[
{
"id": "3b56a5f0.bcff3a",
"type": "tab",
"label": "STATISTICS",
"disabled": false,
"info": ""
},
{
"id": "1aead98e.c48566",
"type": "group",
"z": "3b56a5f0.bcff3a",
"name": "VOICE USAGE STATISTICS",
"style": {
"label": true
},
"nodes": [
"348cbcd9.2d5014",
"4673cb18.38576c",
"704ed56f.d49ed4",
"cee29dee.994f88",
"c6a28cf7.118688",
"b1875e2e.cc368",
"4e6a1d8d.74ee24",
"a4d323f7.58f5c",
"9dc7701b.21eef8",
"ff993fa5.373c28",
"56d649e1.75a8e",
"8406fb88.6b5838",
"1c0bc99f.064e66",
"4e9e488f.0548c8",
"c3756a7a.4e5fe",
"af369de7.93071",
"2e724757.61f9b",
"54f913f9.943ccc",
"62b80250.a48fac",
"f8b6fe7.a8ff48",
"835d91ee.a45b3",
"a2dbce0e.de89a",
"135c7e25.207c9a",
"945d1b61.8a8a88",
"b1da8868.989248",
"cd643354.88572",
"510222b7.b86a34",
"38932c47.52cd94"
],
"x": 94,
"y": 29,
"w": 382,
"h": 772
},
{
"id": "704ed56f.d49ed4",
"type": "mqtt in",
"z": "3b56a5f0.bcff3a",
"g": "1aead98e.c48566",
"name": "All intents",
"topic": "hermes/intent/+",
"qos": "2",
"datatype": "auto",
"broker": "cacf8967.042428",
"x": 180,
"y": 480,
"wires": [
[
"c6a28cf7.118688"
]
]
},
{
"id": "cee29dee.994f88",
"type": "debug",
"z": "3b56a5f0.bcff3a",
"g": "1aead98e.c48566",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 415,
"y": 550,
"wires": [],
"l": false
},
{
"id": "c6a28cf7.118688",
"type": "json",
"z": "3b56a5f0.bcff3a",
"g": "1aead98e.c48566",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 295,
"y": 480,
"wires": [
[
"4e6a1d8d.74ee24"
]
],
"l": false
},
{
"id": "b1875e2e.cc368",
"type": "comment",
"z": "3b56a5f0.bcff3a",
"g": "1aead98e.c48566",
"name": "Listen to all mqtt msgs ",
"info": "",
"x": 230,
"y": 440,
"wires": []
},
{
"id": "4e6a1d8d.74ee24",
"type": "function",
"z": "3b56a5f0.bcff3a",
"g": "1aead98e.c48566",
"name": "",
"func": "var msgStat = {\n voiceCommands: [], intent: []\n};\n\nif(msg.payload.input === undefined){\n return null;\n}\n\nvar executed = false;\n\nif(msg.payload.intent.confidenceScore > 0.6){\n executed = true;\n}\n\nmsgStat.voiceCommands.push({\"value\": msg.payload.input,\n \"siteId\": msg.payload.siteId,\n \"intentDetected\": msg.payload.intent.intentName,\n \"executed\": executed,\n \"counter\": 1 \n});\n\nif(executed == true){\n msgStat.intent.push({\"intentName\": msg.payload.intent.intentName,\n \"siteId\": msg.payload.siteId,\n \"counter\" : 1\n \n });\n}else{\n msgStat.intent.push({\"intentName\": msg.payload.intent.intentName,\n \"siteId\": msg.payload.siteId,\n \"counter\" : 0\n \n });\n \n}\n\nif(msg.payload.asrTokens!==undefined) {\n for(var i=0; i Voice Commands\n \n
\n \n Value Site Id Executed Intent detected Counter {{#payload.voiceCommands}}\n \n {{/payload.voiceCommands}}\n \n {{value}} {{siteId}} {{executed}} {{intentDetected}} {{counter}}
Intent\n
Intent Name | Site Id | Counter |
---|---|---|
{{intentName}} | {{siteId}} | {{counter}} |
Unknownword : {{payload.unknownword}}
\n