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

    Issues following installation instructions

    Scheduled Pinned Locked Moved Raspberry Pi
    9 Posts 2 Posters 2.0k Views 1 Watching
    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.
    • J Offline
      jcksnftsn
      last edited by

      On the dpkg -i triggercmdagent_1.0.1_all.deb I am receiving several "Warn" errors about things being depreciated / no longer supported and then when running the next step
      triggercmdagent
      I am getting an error that says "/usr/bin/triggercmdagent: line 5: /usr/share/triggercmdagent/app/null: No such file or directory"

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

        @jcksnftsn, thank you for reporting it. I'll test it on the latest Raspberry Pi OS and get back to you soon.

        In the meantime, can you check these and let me know what you see?

        This is what the /usr/bin/triggercmdagent script should look like:

        #!/bin/bash
        # This file was autogenerated by node-deb 0.5.0
        set -e
        set -o pipefail
        
        cd /usr/share/triggercmdagent/app
        
        /usr/bin/env node src/agent.js --console "$@"
        

        Also, this is what should be in that /usr/share/triggercmdagent/app folder:

        root@raspberrypi:/usr/share/triggercmdagent/app# ls
        LICENSE  node_modules  package.json  src
        

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • J Offline
          jcksnftsn
          last edited by

          Here is what the script looks like:

          #!/bin/bash
          # This file was autogenerated by node-deb 0.10.7
          set -e
          
          /usr/share/triggercmdagent/app/null "$@"
          

          The /usr/share/triggercmdagent/app folder shows no "LICENSE" file, I see:

          node_modules  package.json  package-lock.json  src
          
          RussR 1 Reply Last reply Reply Quote 0
          • RussR Offline
            Russ @jcksnftsn
            last edited by Russ

            @jcksnftsn, thank you again for reporting this. I think I have a bug in this latest version. I'll fix it this weekend.

            In the meantime you could replace the contents of your /usr/bin/triggercmdagent script with what I have and it should work.

            Alternatively, you could run the agent with like this instead:

            sudo su -
            node /usr/share/triggercmdagent/app/src/agent.js --console
            ( Paste in your token, and press ENTER. )
            ( Press CTRL-C to quit. )
            

            Then install the background agent.

            /usr/share/triggercmdagent/app/src/installdaemon.sh
            

            Russell VanderMey

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jcksnftsn @Russ
              last edited by

              @Russ Thanks, looks like I've got it running, now to start playing with it to see what I can do 🙂

              J 1 Reply Last reply Reply Quote 0
              • J Offline
                jcksnftsn @jcksnftsn
                last edited by

                Maybe I spoke too soon, I can see the Pi within my Triggercmd account but sending the sample triggers doesn't actually do anything.

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

                  @jcksnftsn, the Raspberry Pi agent is meant to run as a systemctl daemon. Will you please confirm it's running with this command?

                  systemctl status triggercmdagent
                  

                  Hopefully you'll see this as part of that output:

                     Active: active (running) since ....
                  

                  Only your "background" commands will be runnable because the daemon runs the agent in background mode. The agent will ignore attempts to run the foreground commands.

                  The easiest background command to test that comes with the default commands.json file is this one:

                    {"trigger":"Reboot","command":"shutdown -r","ground":"background","voice":"reboot","allowParams": "false"},
                  

                  Notice that command's ground value is background.

                  That one is easy to test because it's easy to observe your Raspberry Pi rebooting.

                  Please tell me if that works, and what you want to try next.

                  EDIT 2/8/25: I fixed the Raspberry Pi .deb installer. Now the triggercmdagent command works again. Thanks again for reporting that issue.

                  Russell VanderMey

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    jcksnftsn @Russ
                    last edited by

                    @Russ Thank you!
                    A couple of the default actions were not working because the calculator or notepad couldn't be found but the reboot action worked.

                    I was able to get the "turn off ads" command working with PiHole which was the main thing I wanted to test out, so far so good!

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

                      @jcksnftsn, awesome.

                      Russell VanderMey

                      1 Reply Last reply Reply Quote 0

                      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
                      • First post
                        Last post