Have Alexa or Google Assistant say the result of a command
-
If your command has {{result}} in the Voice Reply field, then the voice assistant will wait a few seconds for a "result" of the command to be logged in the Runs list for that command, and will include that result in what it says back to you.
So for example, you could have Alexa run a command on your Raspberry Pi that would take the temperature, and Alexa could tell you that temperature.
As a test, I put this in my Voice Reply field of my "Results Test" command:
Running {{trigger}} on {{computer}} with result {{result}}
I put this in the Command field:
%USERPROFILE%\.TRIGGERcmdData\sendresult.bat "My command result"
NOTE: Use ~/.TRIGGERcmdData/sendresult.sh instead for Linux/Mac/Raspberry Pi.
I said this:
Hey Google, ask trigger CMD to run results test
Google Assistant said this:
Running results test on DS with result My command result
You only have about 4-5 seconds to send a result via that SendResult script. If you take too long, it will say "no result" in the {{result}} placeholder.
-
-