How to use Off Command
There's a new field called "Off Command" that will allow you to specify a command to run when the parameter is off, which is the case when you set Allow Parameters to true and use one of the TRIGGERcmd Smart Home Alexa skill or Google Assistant action.
If parameters are enabled and this field is filled, Command will run when the parameter is on and Off Command will run when the parameter is off.
The commands will run without " on" or " off" appended to the end. If you want those appended to your command, then leave the Off Command field blank, and use the Command field to run a script that expects on or off as the parameter.
So with this example, you can say, "Alexa, turn off calculator" and calculator will close.
EDIT: So far only the the Windows version is updated to include this feature.
EDIT 2 10/11/2020: Now the Linux and Raspberry Pi versions include this Off Command feature (Example "offCommand": "pkill gedit").
George Hatzisymeon last edited by George Hatzisymeon
Not working on Pi/Debian, do you have an update link?
Xander last edited by
Russ last edited by
@George-Hatzisymeon, so far I've only done the Windows agent version with this new feature. I'm having some trouble with the Mac version. I'll build the Linux and Pi versions soon and update the post.
Terry Ap last edited by Terry Ap
hola, soy de perú, hace poco conoci esta maravillosa aplicacion , no hablo nada de ingles pero con el traductor estuve intentando para poder entenderlo. ¿cuando estara disponible esta actualización?
@Terry-Ap, this is already available in the latest version of the Windows agent. I'm having trouble with the Mac version and I haven't started trying to build the Linux version yet. I hope to finish those soon. Maybe within a couple weeks.
Rob Lee last edited by
Russ - is this working in windows currently or no? i see you said above that it is - but the option is still grayed out for me. I've updated the agent and everything, so just trying to figure out if there's an issue on my end or if it's just not ready.
@Rob-Lee, the "Off Command" field is greyed out if "Allow Parameters" is set to false.
Allow Parameters has to be true if you want to use the Off Command field.
I'm glad you asked, because it's not particularly intuitive.
DJ last edited by
On Windows 10. I tried this example and when I asked Alexa to "turn on calculator" it failed. I had to ask "turn Calculator on" for it to work. no biggie there. But when I said "turn Calculator off" it opened another instance of calculator and said as much in reply from my Echo show. What's the issue?
Russ last edited by
@DJ, if you want to do something else when you tell Alexa/Google to turn the virtual device off, you need to populate the Off Command field set Allow Parameters to true.
In this screenshot you'll see I'm closing calculator when Alexa turns the device off.