Getting Text with Number Ranges via Node-Red

Sorry, this is a mixture of things, probably beginner’s misconfiguration.

I’ve been trying to get hermes data into my node-red but I’m also listening to intents on the websocket. Maybe that’s ‘wrong’? What I really want is all ASR texts from my intents into node-red so I can deal with slots and numbers, either websocket and/or hermes.

So I have:

in node-red which doesn’t seem to work at all.

But, if I use mosquitto_sub -d -t hermes/intent/GetStory -q 1 I get lots of good output:

Client mosqsub|13461-picroft received PUBLISH (d0, q0, r0, m0, 'hermes/intent/GetStory', ... (828 bytes))
{"input": "please get me story 2", "intent": {"intentName": "GetStory", "confidenceScore": 1.0}, "siteId": "mema01", "id": null, "slots": [], "sessionId": "mema01-porcupine_raspberry-pi-aa8fb235-0d17-4238-9bb8-31d557a786a3", "customData": "porcupine_raspberry-pi", "asrTokens": [[{"value": "please", "confidence": 1.0, "rangeStart": 0, "rangeEnd": 6, "time": null}, {"value": "get", "confidence": 1.0, "rangeStart": 7, "rangeEnd": 10, "time": null}, {"value": "me", "confidence": 1.0, "rangeStart": 11, "rangeEnd": 13, "time": null}, {"value": "story", "confidence": 1.0, "rangeStart": 14, "rangeEnd": 19, "time": null}, {"value": "2", "confidence": 1.0, "rangeStart": 20, "rangeEnd": 21, "time": null}]], "asrConfidence": 0.999367568, "rawInput": "please get me story two", "wakewordId": "porcupine_raspberry-pi", "lang": null}

I currently have MQTT set as external, they’re all on one system so external or internal doesn’t seem to make any difference. Clearly, I can probably hack my way around this, but I’d prefer a clean solution.

The MQTT nodes seem pretty obvious, and are showing as “connected” so I guess the MQTT is working.

But what are the values of the data fields; what are the other nodes doing with them; and not least, what are you trying to achieve ? An example might be helpful to show what you’re after.

I suggest you add some debug nodes to output the complete msg object. Knowing what data is going into, and coming out of, each node allows you to find where it is turning to custard. I personally found the official node-RED youTube channel very helpful - especially the Debug sidebar video.

Rather than making print-screens of each node, you might find it easier to export a section of your flow. Highlight nodes then select “Export” from the hamburger menu in top right corner of node-RED window, then paste it here.

Hi Don
Thanks, yes, I have debug nodes, but nothing out of them. I didn’t know about pasting the JSON into this, so thanks again.

Really I just want something simple, payload input and maybe some confidence values so I can turn that into sql. So maybe there’s a simpler way of doing it, using the intent websocket and the switch node I’m already using? Most of this is being a beginner with both node-red and Rhasspy…

Thanks again Hugh

Hi again Don
I’ve got full-fat msg.payload debug output from the Hermes flow now. Not sure why this has suddenly ‘worked’. Probably this is a sign that I need to tidy up.
Thanks again for your help and advice, Hugh