-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocket and Assist Pipeline events #10
Comments
Hi @ReikanYsora, Glad to hear that you are finding this library so useful! 😄 I took a look at your issue, seems that the sending message has the right format. But this pipeline implementation seems to be slightly different from existing ones. The WS server will respond with an event using the id from the I will try to take a look for a simple way of handling these result events. |
I created a branch named This can be used as follows: |
Thank you very much for the speed of your reply. I've just tested it, and "intent" and "tts" work perfectly! However, I had to add this line to manually define the pipeline id in my request : By default, if the value of the "pipeline" field is null, the operation fails and asks for it to be defined. By specifying the pipeline ID returned by the '"assist_pipeline/pipeline/list"' command, everything works correctly :) I understand that SST is more complex, and I'm very interested in this integration. Anyway, thanks again for everything! |
If you want, i have a commit on my 'feature/run_pipeline' forkked branch with this methods and models added |
Good catch @ReikanYsora, I added a fix for that issue. Feel free to open a PR with the changes from your commit :) |
Done. :) |
Hello, !
First of all, congratulations on the work done on this DLL. I've been using it for a while for a personal project and it works incredibly well.
It covers all my needs, except for one detail.
I'm trying to use Home Assistant's Assist Pipeline and I'm encountering just one difficulty for which I'd like your opinion.
With this code, I'm able to communicate a pipeline execution request and it works correctly, except that I can't catch the pipeline assist events specified in this documentation Assist Pipeline Dev Documentation
RawCommandResult result = await hassWSApi.SendRawCommandWithResultAsync(new RawCommandMessage("assist_pipeline/run", new { start_stage = "intent", end_stage = "tts", input = new { text = "Turn on kitchen light's" } }));
I'm trying to catch the assist pipeline events with this code :
await hassWSApi.AddEventHandlerSubscriptionAsync(TestEventHandler_Event, "run-start");
or
await hassWSApi.AddEventHandlerSubscriptionAsync(TestEventHandler_Event, "tts-end");
Unfortunately, I can't catch anything, so I can't parse and retrieve the feedback from the assist pipeline, which should give me, in this example, the link to play the TextToSpeech.
In the debug console of Assist Pipeline directly in Home Assistant, my request is mark as done and the action is properly handled (in this case, i speak french to Home Assistant, because i'm french :p)
Can you tell me what I'm doing wrong and what method I should use to catch these events?
Thanks you so much
Reikan
The text was updated successfully, but these errors were encountered: