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

Issues following installation instructions

Raspberry Pi
2
9
412
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
    jcksnftsn
    last edited by Feb 6, 2025, 4:03 AM

    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"

    R 1 Reply Last reply Feb 6, 2025, 1:46 PM Reply Quote 0
    • R
      Russ @jcksnftsn
      last edited by Russ Feb 6, 2025, 1:57 PM Feb 6, 2025, 1:46 PM

      @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
        jcksnftsn
        last edited by Feb 7, 2025, 2:06 AM

        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
        
        R 1 Reply Last reply Feb 7, 2025, 2:15 AM Reply Quote 0
        • R
          Russ @jcksnftsn
          last edited by Russ Feb 7, 2025, 2:16 AM Feb 7, 2025, 2:15 AM

          @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 Feb 7, 2025, 2:27 AM Reply Quote 0
          • J
            jcksnftsn @Russ
            last edited by Feb 7, 2025, 2:27 AM

            @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 Feb 7, 2025, 2:57 AM Reply Quote 0
            • J
              jcksnftsn @jcksnftsn
              last edited by Feb 7, 2025, 2:57 AM

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

              R 1 Reply Last reply Feb 7, 2025, 1:45 PM Reply Quote 0
              • R
                Russ @jcksnftsn
                last edited by Russ Feb 8, 2025, 7:28 PM Feb 7, 2025, 1:45 PM

                @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 Feb 8, 2025, 11:04 PM Reply Quote 0
                • J
                  jcksnftsn @Russ
                  last edited by Feb 8, 2025, 11:04 PM

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

                  R 1 Reply Last reply Feb 9, 2025, 1:12 AM Reply Quote 0
                  • R
                    Russ @jcksnftsn
                    last edited by Feb 9, 2025, 1:12 AM

                    @jcksnftsn, awesome.

                    Russell VanderMey

                    1 Reply Last reply Reply Quote 0
                    1 out of 9
                    • First post
                      1/9
                      Last post