Read the statement by Michael Teeuw here.
Execute shell commands when AssistantMk2 starts or stops
-
Hello,
I have the modules MMM-Hotword and MMM-AssistantMk2 installed. And it works that far.
Now I want to execute a shell command when the wizard starts to speak and execute another shell command when the wizard is quit.
How should I proceed? -
@acimail01
There is no usable point about “Response starting”, usually"ASSISTANT_UNDERSTOOD"notification or"ASSISTANT_ACTIVATED"notification could be used for that purpose, but not exactly same time with Starting audio response
For ending, you can use"ASSISTANT_RESPONSE_END"
With those notifications, you can make your own module to receive those notifications and to do your own job, Or,…
You can useMMM-NotificationTriggerwhich be already built for translate and chain notifications among the modules. It can execute external shell script. -
on linux you can replace the command being executed to play audio with a shell script of the same name (and rename the old file and call it from the script) and then add your own behavior.
-
@Sean said in Execute shell commands when AssistantMk2 starts or stops:
TANT_RESPONSE_END
thank you!
MMM-NotificationTrigger did the trick.{ module: "MMM-NotificationTrigger", config: { triggers:[ { trigger: "ASSISTANT_RESPONSE_END", fires: [{ fire:"MY_COMMAND1", exec: "sleep 1; ls -al" },], }, { trigger: "ASSISTANT_UNDERSTOOD", fires: [{ fire:"MY_COMMAND2", exec: "sleep 1; ls -h" },], }, ] } },
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login