Issues following installation instructions
-
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" -
@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
-
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
-
@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
-
@Russ Thanks, looks like I've got it running, now to start playing with it to see what I can do
-
Maybe I spoke too soon, I can see the Pi within my Triggercmd account but sending the sample triggers doesn't actually do anything.
-
@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.
-
@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!
-
@jcksnftsn, awesome.