"I don't see that IFFT trigger"
-
I am trying to get the software setup on my Raspberry Pi and when issuing the command to Alexa - "Alexa - trigger c m d or trigger reboot on my Rasberry Pi, I get the response above. Am I doing something wrong?
-
@Jim-Potash, you're missing something. You have to say:
Alexa, ask TRIGGER C M D to trigger reboot on raspberry pi.
You can also say "tell TRIGGER C M D ..." but "ask" seems to work better than tell.
-
Hey Russ, I am still getting the response above. Not sure if I have set evrything up correctly. I don't have to edit the /root/.TRIGGERcmdData/commands.json file to add anything to test reboot - right?
-
@Jim-Potash, actually you do. I didn't think so at first but I just checked and I see there's no voice name associated with reboot by default.
Default line in commands.json:
{"trigger":"Reboot","command":"shutdown -r","ground":"background"},
Please try adding "voice":"reboot" like this:
{"trigger":"Reboot","command":"shutdown -r","ground":"background","voice":"reboot"},
Sorry, that's not very user friendly. I'll update the Raspberry Pi agent to include the voice names.
Although, if you're getting, "I don't see that IFTTT trigger," then maybe you haven't enabled the skill and linked your account yet. Can you confirm you did that?
Also please confirm you're saying "Alexa, ask TRIGGER C M D" not just "Alexa, TRIGGER C M D".
-
Still doesn't work - but I think it is becuase I am unable to add the reboot trigger on your web interface. The only item showing is Gnome, which I did not set up. How do I add "reboot" to the computer "rasberrypi"?
-
Apparently the background service isn't running because you're only seeing the foreground command. Please try installing the background service with this command:
/usr/share/triggercmdagent/app/src/installdaemon.sh
If that doesn't work, please send me the output of this command:
systemctl status triggercmdagent
-
@Russ Aug 22 20:03:49 raspberrypi systemd[1]: Started TRIGGERcmd Agent.
root@raspberrypi:/home/pi# systemctl status triggercmdagent
● triggercmdagent.service - TRIGGERcmd Agent
Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled)
Active: active (running) since Tue 2017-08-22 20:05:17 EDT; 1s ago
Process: 31825 ExecStop=/usr/bin/ps aux | grep daemon.js --run | grep -v grep | awk {print $2} | xargs kill (code=exited, status=203/EXEC)
Main PID: 31828 (node)
CGroup: /system.slice/triggercmdagent.service
└─31828 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdDataAug 22 20:05:17 raspberrypi systemd[1]: Started TRIGGERcmd Agent.
-
Thank you for your patience. We'll get this.
Interesting. I see "active (running)" so it seems it's running, but I see you ran systemctl status only 1 second after starting it.
It takes a couple seconds to get more output. Can you re-run systemctl status and send me the output?
triggercmdagent
One thing to try if all else fails is start over like this:
- Delete your computer record from the web interface.
- systemctl stop triggercmdagent
- cd /root/.TRIGGERcmdData
- rm token.tkn
- rm computerid.cfg
- triggercmdagent (then paste in a new token from your Instructions page)
- systemctl start triggercmdagent
- systemctl status triggercmdagent
Another thing - if you edited it at all, can you send me your commands.json file?
-
@Russ I followed all of the instaructions above and a have a clean install. I have had some success directly with the trigger from the web interface. However, when I ask Alexa (Ecobee 4) to trigger command reboot raspberry pi - I now get " could not find a computer called Rasberry Pi. I have enclosed the .json file below:
[
{"trigger":"Reboot","command":"shutdown -r","ground":"background","voice":"reboot"},
{"trigger":"Gnome Editor","command":"gedit","ground":"foreground"},
{"trigger":"yum update","command":"yum -y update","ground":"background"},
{"trigger":"apt update","command":"apt-get -y update","ground":"background"}
]One last comment. I have two instances of Alexa running - one on the Raspberry Pi that is the AlexaPI and another Ecobee 4 Thermostat version. On the AlexaPi - I get "I don't see that IFFT trigger".
-
@Jim-Potash,
I see that the "voice" field is not filled on your computer called "raspberrypi". Please fill that in with "raspberry pi". That voice field is what Alexa uses to identify your computer.I think that will work if you say exactly this: "Alexa, ask TRIGGER command to run reboot on raspberry pi."
Or, if you go into your Profile and set your default computer to "raspberrypi" then you can say, "Alexa, ask TRIGGER command to run reboot."
If you forget to say that ask word, Alexa will say "I don't see that IFTTT trigger."
-
@Jim-Potash, nice job creating an AlexaPi too. I'd like to try that.
-
@Russ Thanks. Works just fine. Still working on Trigger CMD though. Haven't had a lot of time lately, but intend to get it working. One of the problems is I have 2 instances on Amazon. I will delete one and try to see if that fixes it.
-
@Russ Deleted both Rasberry Pi devices on Amazon, did a clean reinstall of Alexa PI and finally got it to recognize the Trigger CMD command. However it is stuck now on "can not find a command reboot on rasberry pi".
-
@Jim-Potash, in your Alexa app it shows you what Alexa is hearing you say, so you can use that to match your voice words for your computer and your command.
The word "reboot" for the command should be no problem, but you might have better luck using a different voice word for the computer.