@cesaronte, you should see an icon like this to open the side panel:
You can also find the token on your profile page which you can get to by clicking your name in the upper-right.
@cesaronte, you should see an icon like this to open the side panel:
You can also find the token on your profile page which you can get to by clicking your name in the upper-right.
Awesome @Santiago. Thanks for letting me know. Sorry about the trouble.
@Santiago, will you please send the contents of your debug.log file? It might tell me what's going wrong.
Then, please try uninstalling and reinstalling the latest version.
If that still doesn't work, please try this old version;
https://agents.triggercmd.com/TRIGGERcmdAgentSetup36.exe
@Abel-Boby, do you see a list of voice commands on this page?
You should have one voice command for each of your triggercmd commands that has a voice word, but only if the computer is your default computer or it has a voice word assigned to it. You can set your default computer on your profile page.
In other words, these are the requirements for creating virtual devices in Google Home for your commands:
@karnold69 sorry, I didn't read your first post well enough. Now I understand you want to be able to dim your X10 bulbs with a Windows batch file using Alexa. Please try this script:
Be aware though, you can't dim smart bulbs or send a percentage to a triggercmd acommand by saying to Alexa, "Alexa, dim bulb X". You have to say "Alexa, dim bulb X to 20 percent", or something like that (where X is the bulb name or voice name for your triggercmd command.
I used ChatGPT to create this script, and tested it. I think it could work for you.
https://chatgpt.com/share/67a91dfc-f4a4-8004-bfd5-09f488830d9e
Here’s a revised version of your script that allows you to specify a percentage instead of the word "dim." It ensures the dim level is one of the allowed values (10, 20, 30, etc.) and calculates the number of dim commands needed accordingly.
script.bat:
batch
@echo off
set "level=%1"
:: Ensure the input is a valid percentage (10, 20, ..., 90)
if "%level%"=="10" goto valid
if "%level%"=="20" goto valid
if "%level%"=="30" goto valid
if "%level%"=="40" goto valid
if "%level%"=="50" goto valid
if "%level%"=="60" goto valid
if "%level%"=="70" goto valid
if "%level%"=="80" goto valid
if "%level%"=="90" goto valid
echo Invalid dim level. Please enter 10, 20, 30, ..., 90.
exit /b
:valid
:: Turn on the light (assumes it starts at 100)
curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~"K4 on"
:: Calculate the number of dim commands (each step reduces by 10%)
set /a "steps=(100 - %level%) / 10"
:: Send the dim commands
for /l %%i in (1,1,%steps%) do (
curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~"K4 dim"
)
echo Dimmed to %level%%
@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.
@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
@ess__gabriel, I remember now. Tray icons no longer work by default, so you have to install this Gnome shell extension: https://extensions.gnome.org/extension/615/appindicator-support/
@karnold69, you can send a dim level from 0 to 100 percent.
For example, I have a command called "logger" with parameters enabled. I just said, "Alexa, logger 10 percent" and it ran my command with 10 as the parameter.
Here's the Runs list entry:
@ess__gabriel, thanks for reporting it. I'll test it and get back to you soon.
In the meantime you can edit your commands in the ~/. TRIGGERcmdData/commands.json file.
I assume the agent is working otherwise.
@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
@eromano, I tried to install OpenWRT on a VMWare VM for a while. I got version 15 installed using an OVA but I couldn't get openssl working, so I couldn't install nodejs etc on it.
Anyway, I noticed your error output shows it's trying to access a URI that starts with /engine.io . That's not valid URI.
I wonder if you've upgraded socket.io-client beyond the version specified in ubuntupackage.json because this article says the latest version 'socket.io-client@4.X.X uses /engine.io instead of the valid /socket.io URI.
@Hugoboss, sorry, I missed your original post so I'm glad you followed up.
For the 2 examples that won't run in the triggercmd agent, you said they won't run now, but they ran fine yesterday. Did you upgrade the agent between when they ran and when they didn't?
Do they run fine if you run them manually from a cmd prompt?
Please try putting this one in a .bat script like this, and run the .bat script as your command instead:
cd /d "C:\Users\username\AppData\Local\Programs\UiPath\Studio"
UiRobot.exe execute --process "Discord.Join.Server"
Please test the .bat script manually too.
Also could you share the contents of this script, and the output when you run it manually?
"C:\Applications\UiPath\Robot\Starta Spel\Starta Spel\Start Game.bat"
@Matheus-de-Souza, it's showing "Command ran with error code 1" because your command is failing. Commands return error code 0 when they succeed.
To troubleshoot, it would help to get the output of your command. You should be able to see the error if you run it manually from a cmd prompt.
To open a cmd prompt, you can hold the Windows key and press R, then type cmd and press enter.
If the command runs fine in the cmd prompt but it fails when you run it with the TRIGGERcmd agent, you should copy/paste your command into a .bat file and redirect the command's output to a log file, and change your triggercmd command to run the .bat file. That way you can look in the log file to see the error.
For example, you could create a script.bat file with these contents:
yourcommand > c:\logs\script.log 2>&1
This part is to make stderr output go into your log, not just stdout: 2>&1
Notice I put the log file in a c:\logs directory. You'll need to create that directory first. Windows won't let you write to a file in c:\ by default.
@eromano , give me some time. I'll see if I can make it work on openwrt.
@lynwoodjweaver, the triggercmd agent is programmed to look for the commands in the .TRIGGERcmdData subfolder of your user profile folder, for example c:\Users\russ\.TRIGGERcmdData so you could copy that folder to the other profile if you want them both to use the same computer record and commands.
@Giuseppe-Sbirziola , I got your direct message. I'm glad that worked.
@Giuseppe-Sbirziola, sorry about this. Will you please try this?
C:\Users\gsbir\.TRIGGERcmdData