@Russ said in Trouble Executing TriggerCMD Commands on Raspberry Pi:
Russ
@boblewis
4 days ago@boblewis, I think we can fix this, but I have a few questions.
Are you able to run your commands using the green Trigger button while you're logged into your account on the TRIGGERcmd website?
How did you confirm the triggercmd agent is running? Did you run systemctl status triggercmdagent ?
On the Pi, the agent runs as root, and the data files are in /root/.TRIGGERcmdData
So please confirm your commands are in
/root/.TRIGGERcmdData/commands.json, not
/home/pi/.TRIGGERcmdData/commands.jsonYou ran a triggercmd command. is that a copy of the tcmd Go utility? I assume so because you're giving it a --trigger parameter. You might need to be root to use it if your token.tkn file is in /root/.TRIGGERcmdData. I would rename that to tcmd becauses I tend to refer to it as the tcmd tool (written in Go), but anyway, please run it with the --list parameter and let me know what happens. That should give you a list tcmd commands you can use to run your remote commands.
Hello@Russ
Thank you for your detailed response and helpful suggestions.
I am able to successfully trigger commands using the green Trigger button while logged into my account on the TriggerCMD website.
I ran systemctl status triggercmdagent, and it shows that the TriggerCMD agent service is active and running without any errors.
I rechecked, and my commands are indeed listed in the correct file at /root/.TRIGGERcmdData/commands.json.
I'm using the tcmd utility, and I have ensured to run it as root since my token file is located in /root/.TRIGGERcmdData.
When I ran tcmd --list, it provided me with a list of TriggerCMD commands available for execution. All my commands are correctly recognized by the TriggerCMD agent.
Thank you
boblewis