Turn on a computer
-
@Russ I changed the IDRAC trigger the ground parameter to foreground and it appeared in the cloud ... but why the IDRAC trigger does not appear when this background
-
@Wesley-Correa, the foreground agent adds/removes/runs foreground commands, and the background agent adds/removes/runs background commands. So I think the background agent isn't running.
To install the background agent on the Pi, you'll need to do this:
sudo su - /usr/share/triggercmdagent/app/src/installdaemon.shThen you can check its status like this:
systemctl status triggercmdagent -
@Russ Okay, but how to identify the output from the command if this is first or second?

-
@Wesley-Correa, to capture the output of a command, you can make the command direct "standard out" and "standard error" to a text file like this:
yourcommand &>> /tmp/commandlog.txtUse a single > if you want to over-write the txt file every time instead of appending to it.
Please explain what you mean by "first or second".
-
-
@Wesley-Correa, when you switch your command from foreground to background, you can't tell which agent added it just by looking at the website. I suggest adding something to your trigger name to specify background, like this:
{"trigger": "idrac background", "command": "/usr/bin/idrac.sh", "ground": "background", "voice": "power on", "allowParams":"false"},Then use systemctl status triggercmdagent to see that the background agent added it.
BTW, I got rid of some extra spaces you had in your json entry that might have caused a problem.
-
@Russ Thank you all right now.
-
@Wesley-Correa, awesome. I'm glad that worked out.
-
Hello, I intend to create one more command, and share access. in that case I have to create another commands.json?
because the entries created in commands.json I cannot share
-
@Wesley-Correa, if you share your computer with another TRIGGERcmd user, all of the commands on that computer are shared.
Are you seeing the commands you created in commands.json on the website?
-
R Russ referenced this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login