TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Trouble Executing TriggerCMD Commands on Raspberry Pi

    Raspberry Pi
    2
    4
    289
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • boblewisB
      boblewis
      last edited by

      Hello

      I'm facing an issue with executing TriggerCMD commands on my Raspberry Pi. Even after following the setup instructions, my commands aren't triggering as expected.
      I am using Raspberry Pi 4 Model B , Raspbian Buster, version 10 , TriggerCMD Agent version 1.0.1 , Connected via Wi-Fi, stable connection

      I have verified my internet connection and confirmed the TriggerCMD agent is running. However, when I try to run a command, I get no response or error message.

      Here’s an example of the command I'm trying to run:
      triggercmd --trigger YourCommandName
      Error message received "Command not found" or "Unable to connect to TriggerCMD service" I have restarted the TriggerCMD agent, checked the configuration file, verified internet connection

      Has anyone else faced this issue?

      Thanks in advance for your help!

      Thank you
      boblewis

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @boblewis
        last edited by Russ

        @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.json

        You 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.

        Russell VanderMey

        boblewisB 1 Reply Last reply Reply Quote 0
        • boblewisB
          boblewis @Russ
          last edited by

          @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.json

          You 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

          RussR 1 Reply Last reply Reply Quote 0
          • RussR
            Russ @boblewis
            last edited by

            @boblewis, that all sounds good. Do you have any remaining problems or are you all set now?

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            • First post
              Last post