I’m very very new and Rhasspy is my #1 goal for home assistant. The documentation is really excellent and I’ve so far got everything up and running, but I think I’m missing something because I can’t find any useful beginner guides for Node-Red and home assistant (they are just the basics), and that’s the one part that’s left to the user in the Rhasspy docs.
I’ve got my node-red websocket hooked up to a change node used as the intent filter, then to a template node so I can use the mustache template in my ‘service’ and ‘entity_id’ field in the home assistant call serivce node. All my sentences are using home assistant friendly names.
Here is the flow:
[{"id":"70d90eed.9fc7e8","type":"tab","label":"Rhasspy Intent","disabled":false,"info":""},{"id":"d7f94fdd.9b5028","type":"debug","z":"70d90eed.9fc7e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":990,"y":400,"wires":[]},{"id":"d60f2a3e.ec485","type":"websocket in","z":"70d90eed.9fc7e8","name":"","server":"","client":"be111083.116b5","x":200,"y":60,"wires":[["6433981b0ab46587"]]},{"id":"2ae634bbc9757d19","type":"template","z":"70d90eed.9fc7e8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"data\":{\"service\":\"turn_{{slots.state}}\",\"entity_id\":\"{{slots.name}}\"}}\n","output":"json","x":630,"y":280,"wires":[["d7f94fdd.9b5028","4cab6bd1c6caefbd"]]},{"id":"6433981b0ab46587","type":"switch","z":"70d90eed.9fc7e8","name":"intent filter","property":"intent.name","propertyType":"msg","rules":[{"t":"eq","v":"GetTime","vt":"str"},{"t":"eq","v":"ChangeLightState","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":520,"y":100,"wires":[[],["d7f94fdd.9b5028","2ae634bbc9757d19"]]},{"id":"4cab6bd1c6caefbd","type":"api-call-service","z":"70d90eed.9fc7e8","name":"","server":"5a1263d8.ffec3c","version":3,"debugenabled":false,"service_domain":"light","service":"{{payload.data.service}}","entityId":"{{payload.data.entity_id}}","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1200,"y":220,"wires":[[]]},{"id":"be111083.116b5","type":"websocket-client","path":"ws://localhost:12101/api/events/intent","tls":"","wholemsg":"true"},{"id":"5a1263d8.ffec3c","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
What keeps happening is everytime Rhasspy detects an intent and sends it along, the call service node loses a connection to the server. Havn’t experienced this with any of my other node red, non-rhasspy, flows, although they are all straight service calls, without any mustache template attempts.
Thanks for any help. Any useful links to really learn node-red for home assistant and rhasspy? Or do I need to just keep reading all the forum topics and experiment?