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

Turn on a computer

Raspberry Pi
raspberry pi
3
16
15.2k
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.
  • W
    Wesley Correa @Russ
    last edited by May 24, 2020, 8:50 PM

    @Russ I'm trying to connect a DELL R420 through IDRAC using IPMI, I created .sh to run through TRRIGERCMD I added the content to json but it doesn't appear in the cloud. the existing triggers are working normally ... just mine that add doesn't show.
    is running on raspberry py B + with Debian 10 buster.

    I bought an eco dot + I am waiting to arrive and use Alexa but I need to solve this could you help me please?

    is running on raspberry py B + with Debian 10 busterTriggerCMD2.png

    triggerCMD.png

    R 1 Reply Last reply May 24, 2020, 11:45 PM Reply Quote 0
    • R
      Russ @Wesley Correa
      last edited by Russ May 24, 2020, 11:47 PM May 24, 2020, 11:45 PM

      @Wesley-Correa, I see some problems in your poweron trigger. The command path should start with a / (slash), ground should be background assuming you're running the background service, and the voice field should have a space because Alexa and Google probably won't match what you say to "poweron". It should be like this:

      {"trigger":"poweron","command":"/usr/bin/idrac.sh","ground":"background","voice":"power on","allowParams":"false"}
      

      If you run triggercmdagent from the command line like that, it runs the agent in foreground mode. If you want to test it that way, change ground to foreground, but in general I use the background service with a Raspberry Pi.

      Russell VanderMey

      W 1 Reply Last reply May 25, 2020, 1:27 PM Reply Quote 0
      • W
        Wesley Correa @Russ
        last edited by May 25, 2020, 1:27 PM

        @Russ First thanks for feedback. see how this triggers however in the cloud appears only GNOMEtriggerIDRAC.png triggersCMD2.png

        W 1 Reply Last reply May 25, 2020, 1:45 PM Reply Quote 0
        • W
          Wesley Correa @Wesley Correa
          last edited by Wesley Correa May 25, 2020, 3:17 PM May 25, 2020, 1:45 PM

          @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

          R 1 Reply Last reply May 25, 2020, 3:37 PM Reply Quote 0
          • R
            Russ @Wesley Correa
            last edited by Russ May 25, 2020, 3:38 PM May 25, 2020, 3:37 PM

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

            Then you can check its status like this:

            systemctl status triggercmdagent
            

            Russell VanderMey

            W 1 Reply Last reply May 25, 2020, 3:59 PM Reply Quote 0
            • W
              Wesley Correa @Russ
              last edited by May 25, 2020, 3:59 PM

              @Russ Okay, but how to identify the output from the command if this is first or second?plano.png

              R 1 Reply Last reply May 25, 2020, 5:50 PM Reply Quote 0
              • R
                Russ @Wesley Correa
                last edited by Russ May 25, 2020, 5:51 PM May 25, 2020, 5:50 PM

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

                Use 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".

                Russell VanderMey

                W 1 Reply Last reply May 25, 2020, 7:03 PM Reply Quote 0
                • W
                  Wesley Correa @Russ
                  last edited by Wesley Correa May 25, 2020, 7:04 PM May 25, 2020, 7:03 PM

                  @Russ I say that in the trigger parameter it is like {"trigger": "idrac", "command": "/ usr / bin / idrac.sh", "ground": "foreground", "voice": "power on", " allowParams ":" false "},

                  foreground appears in the cloud, but when you put the background

                  R 1 Reply Last reply May 25, 2020, 7:48 PM Reply Quote 0
                  • R
                    Russ @Wesley Correa
                    last edited by Russ May 25, 2020, 7:50 PM May 25, 2020, 7:48 PM

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

                    Russell VanderMey

                    W 1 Reply Last reply May 25, 2020, 8:18 PM Reply Quote 0
                    • W
                      Wesley Correa @Russ
                      last edited by May 25, 2020, 8:18 PM

                      @Russ Thank you all right now.

                      R 1 Reply Last reply May 25, 2020, 9:15 PM Reply Quote 0
                      • R
                        Russ @Wesley Correa
                        last edited by May 25, 2020, 9:15 PM

                        @Wesley-Correa, awesome. I'm glad that worked out.

                        Russell VanderMey

                        1 Reply Last reply Reply Quote 0
                        • W
                          Wesley Correa
                          last edited by Nov 22, 2020, 2:22 AM

                          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

                          R 1 Reply Last reply Nov 22, 2020, 2:57 AM Reply Quote 0
                          • R
                            Russ @Wesley Correa
                            last edited by Nov 22, 2020, 2:57 AM

                            @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?

                            Russell VanderMey

                            1 Reply Last reply Reply Quote 0
                            • R Russ referenced this topic on Nov 27, 2022, 11:06 PM
                            • First post
                              Last post