Ah. So the device name appears to be the Trigger field and as I used the same for both fields all is good 🙂 I hadn;t grokked that Voice was being ignored.
In fact I eventually found I can use two words for device name (trigger field). You have to be careful as uncommon words can be confused and second words like "play" or "run" can get misinterpreted to do other things as Alexa already handles them.
I do not see "on" or "off" passed as parameters, but the Command or Off Command get invoked as expected. Speaking a number, percent or colour do get passed to either command as a parameter as expected.
The voiceReply seems to be ignored by smart home devices and it always says "OK" unless you use the Alexa App setting to make a noise instead. Is there anyway to get the voice reply to work? I expect as you ignore the voice fields the answer is no 😞
btw I found a useful debugging tool is to add a start to my processing cmd file open a window. eg
start "" echo "[%1][%2][%3]"
That helped me fix an obscure reason some variables were not being expanded when the cmd was invoked from TRIGGERcmd but worked fine from the cmd shell.
Maybe the Runs could show the command return value and outputs to stdout and stderr to help debugging? But that would require more server storage I guess.
@william-siqueira, first you could make sure the default commands you have in your commands.json run when you click the green Trigger button in your account.
The background commands (the commands with ground = background) will run if you've installed the background service using installdaemon.sh, but you'll need to use ps -ef to check whether they ran because they don't run in the foreground where you can see them.
After that, you can add your own commands by copying one of those lines, and editing the command field to be your own command.
Notice the data folder for the background agent is in root's home folder, not your williams user.
I also see No token exists. Login to request one. So you can probably fix it if you run:
sudo su -
(paste in your token)
Or you could copy your /home/william/.TRIGGERcmdData folder to /root/.TRIGGERcmdData so it won't create a second computer in your account because you already have a computerid.cfg file in /home/william/.TRIGGERcmdData and the background agent that will run as root will use that computer id.
@Russ Oh, I must have misunderstood, they seemed to in the articles I linked. Oh well, shame and very limiting to skill creators. may words get pick on my Alexa for other purposes - eg play - so it's hard.
@HeeHang I know nothing about Make.com but TRIGGER cmd runs windows cmd commands and Windows has the parts to make it possible. Basically you probably want to add something like the following to a cmd/bat file and run that from TRIGGERcmd
start "" app.exe /s
timeout /t 5
taskkill /im app.exe /f
start runs app.exe in a new process
timeout waits a few seconds before returning
taskkill /im kills task by name - assuming it is only one
If you have a script rather than an exe the run: cmd /c "my.cmd"