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

    Issues with running on Retropie

    General Discussion
    2
    4
    364
    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.
    • B
      bluefunoodle311
      last edited by

      I have run through all the steps to get triggercmd on my Raspberry Pi 3 b+ with the intention of starting it at bootup and have it running in the background to use Alexa voice commands to shutdown, but when I run triggercmdagent in terminal, it shows "Daemon install: false" and when using the command /usr/share/triggercmdagent/app/src/installdaemon.sh it says "Daemon install: true"

      Despite my retropie showing up in computer management list, it only has one trigger: Gnome Editor. If I use nano ~/.TRIGGERcmdData/commands.json it shows 5 different triggers.

      Alexa is not doing anything when I use the command "Alexa shutdown retropie"

      Any help would be greatly appreciated. I'm not too savvy on Linux, so I'm relying on a lot of "how-to" posts.

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

        @bluefunoodle311,

        Here are some things you can try and check.

        First, the fact that your Raspberry Pi shows up in your TRIGGERcmd account on the website means you successfully logged it in with your token, but I'm not sure whether you were logged in as the pi user or the root user. This command is necessary to switch you do the root user:

        sudo su -
        

        Also, Gnome Editor is a foreground command ( it has "ground": "foreground" in commands.json ). The fact that you only see that command means you only ran the agent in foreground mode so far.

        What you want to do is get the agent running as root in background mode so it starts up as a daemon when your Raspberry Pi boots up.

        If triggercmdagent running is running as root in background mode, the commands in /root/.TRIGGERcmdData/commands.json with "ground":"background" will show up on the website.

        Please try these commands:

        sudo su -
        /usr/share/triggercmdagent/app/src/removedaemon.sh
        /usr/share/triggercmdagent/app/src/installdaemon.sh
        

        You want to run removedaemon.sh before re-installing it just in case you've installed it wrong somehow.

        Also, please run these commands. You should see output like below if it's working.

        root@garagepi:~# ps -ef | grep triggercmd
        root      7610     1  0 Feb24 ?        00:41:49 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData
        
        root@garagepi:~# systemctl status triggercmdagent
        ● triggercmdagent.service - TRIGGERcmd Agent
           Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; vendor preset: enabled)
           Active: active (running) since Tue 2019-07-16 23:08:43 UTC; 1min 27s ago
         Main PID: 20448 (node)
           CGroup: /system.slice/triggercmdagent.service
                   └─20448 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData
        
        Jul 16 23:08:46 garagepi env[20448]: Logging in with saved token to run background tasks.
        Jul 16 23:08:47 garagepi env[20448]: Write backup completed.
        

        Russell VanderMey

        B 1 Reply Last reply Reply Quote 0
        • B
          bluefunoodle311 @Russ
          last edited by

          @russ My outputs are slightly different (nothing mentioned about running in background) but an uninstall/reinstall of the daemon seems to have been enough to do the trick. I am now able to trigger commands remotely and everything I added to commands.json are showing on the website. Thanks so much!!

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

            Boom! Awesome @bluefunoodle311 !

            Russell VanderMey

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