@Smart-Communities, you could install the background service and make your commands background commands. Then they'll run in the context of the TRIGGERcmdAgent Windows service.
-
RE: Usuarios no windows 11 não conecta, fica sem Ip
-
RE: Command with parameters
@marti-ruiz, the parameters you send with your trigger always get tacked on to the end of your command, so you should put that same command in a .bat file if you want the parameter where the %1 is.
Your TRIGGERcmd command would run your .bat script like this:
Your label.bat script contents:
type "C:\BC\%1" > \\mycomputer.local\ZEBRA
-
RE: Change computer
@Smart-Communities, if you give the new device the same computer name, the short bookmarks should still work. They specify a computer name and trigger name.
Normal bookmarks specify the trigger ID so those stop working if you even change certain fields in the trigger, like the name because that deletes and recreates the trigger with a new ID.
-
RE: runs double
@El-Kortungas, what does it show in your Runs list for the command? I just ran Calculator using the TRIGGERcmd Smart Home skill and it ran only once as you can see here:
Also, which Alexa skill are you using? The runs list will show that too. I recommend the TRIGGERcmd Smart Home skill.
You could try unlinking and re-linking the skill.
-
RE: Run a Google Routine
@Marcos-Raldes, sorry you're right - I see that now. I'm still not sure why the TRIGGERcmd devices don't show up in Home app as a routine starter option, but you can create the routines that work with TRIGGERcmd using Google's script editor, then after it's created you can edit it in the Home app.
I made this video to demonstrate it: https://youtu.be/aP3FAuh291s
Here's my test routine that works for me:
The editor makes it easy to select your devices. You just start typing the name and it brings up a list of your devices that contain those letters.
Your TRIGGERcmd commands will only show up as Google devices if they have the voice field filled in. The computer also needs the voice field filled in, unless it's your default computer (set in your profile).
You'll also need to add your command's Google device to a home and a room before it will work. Long-press the device, then tap the gear in the upper-right, then tap Home (Add to a home).
Notice you specify whether the routine should run when the TRIGGERcmd device is flipped on or off. That's different from Alexa where triggering a command is like a doorbell press that runs the routine.
The state defaults to on unless you send off as the parameter, so you can run Google routines without having to send a parameter when you trigger your commands.
You can also create a routine (aka Automation) that triggers a command. You can use TRIGGERcmd device as a starter or an action but either way, you have to use the script editor to create the routine, not the Google Home app on your phone.
-
Winamp visuals control panel
Anyone still use Winamp to play .mp3 files?
The Milkdrop visuals are still the best - for example.
I built a TRIGGERcmd panel to control Winamp, including a set of my favorite visual "presets."
Here's a Youtube video showing how it works.
This is the panel:
The "Preset Favorite" panel buttons run my winamp_preset.bat script with the letter as the parameter, and uses nircmd to press a series of buttons to pick the preset that starts with that letter.
You can see here I copied some of my favorite presets to a folder called russ, and prefixed each one with a letter from a to h:
This my panel JSON:
[ { "name": "Preset Favorite", "trigger": "DS | winamp preset", "params": "a,b,c,d,e,f,g,h" }, { "name": "Next/Previous Preset", "trigger": "DS | winamp next/previous preset", "params": "previous,next" }, { "name": "Volume", "trigger": "DS | winamp volume", "params": "up,down" }, { "name": "Show Song Title", "trigger": "DS | winamp show title", "params": "" }, { "name": "Presets List", "trigger": "DS | winamp preset folder", "params": "russ,all" }, { "name": "Forward/Reverse", "trigger": "DS | winamp forward reverse", "params": "reverse,forward" } ]
My commands.json entries:
{ "trigger": "winamp preset", "command": "c:\\tools\\winamp_controller.bat", "offCommand": "", "ground": "foreground", "voice": "", "voiceReply": "", "allowParams": "true" }, { "trigger": "winamp show title", "command": "nircmd sendkeypress t", "offCommand": "", "ground": "foreground", "voice": "", "voiceReply": "", "allowParams": "false" }, { "trigger": "winamp preset folder", "command": "c:\\tools\\winamp_preset_folder.bat", "offCommand": "", "ground": "foreground", "voice": "", "voiceReply": "", "allowParams": "true" }, { "trigger": "winamp volume", "command": "c:\\tools\\winamp_volume.bat", "offCommand": "", "ground": "foreground", "voice": "", "voiceReply": "", "allowParams": "true" }, { "trigger": "winamp forward reverse", "command": "c:\\tools\\winamp_ff_rw.bat", "offCommand": "", "ground": "foreground", "voice": "", "voiceReply": "", "allowParams": "true" }, { "trigger": "winamp next/previous preset", "command": "c:\\tools\\winamp_next_previous_preset.bat", "offCommand": "", "ground": "foreground", "voice": "", "voiceReply": "", "allowParams": "true" }
These are the .bat files in my c:\tools folder:
winamp_ff_rw.bat
if "%1"=="reverse" nircmd sendkeypress left if "%1"=="forward" nircmd sendkeypress right
winamp_next_previous_preset.bat
if "%1"=="next" nircmd sendkeypress spc if "%1"=="previous" nircmd sendkeypress backspace
winamp_preset.bat
nircmd sendkeypress l nircmd sendkeypress %1 nircmd sendkeypress enter nircmd sendkeypress esc
winamp_volume.bat
if "%1"=="+" nircmd sendkeypress up if "%1"=="-" nircmd sendkeypress down if "%1"=="up" nircmd sendkeypress up if "%1"=="down" nircmd sendkeypress down
winamp_preset_folder.bat
rem bring up the current presets path nircmd sendkeypress f8 if "%1"=="russ" goto russ if "%1"=="all" goto all goto end :russ rem backspace for each letter in "presets" nircmd sendkeypress backspace nircmd sendkeypress backspace nircmd sendkeypress backspace nircmd sendkeypress backspace nircmd sendkeypress backspace nircmd sendkeypress backspace nircmd sendkeypress backspace rem type out russ nircmd sendkeypress r nircmd sendkeypress u nircmd sendkeypress s nircmd sendkeypress s goto select :all rem backspace for each letter in "russ" nircmd sendkeypress backspace nircmd sendkeypress backspace nircmd sendkeypress backspace nircmd sendkeypress backspace rem type out presets nircmd sendkeypress p nircmd sendkeypress r nircmd sendkeypress e nircmd sendkeypress s nircmd sendkeypress e nircmd sendkeypress t nircmd sendkeypress s goto select :select rem press enter nircmd sendkeypress enter nircmd sendkeypress esc nircmd sendkeypress escape :end
-
RE: Shutdown command doesn't work on Windows Server
@matheus-venancio What is the actual command that you're using? And does it work from a cmd prompt?
-
RE: 2 out of 4 computers have stopped running Commands
@Mike-Vecchiarelli , can you send me a copy of your debug.log file?
I wonder if you see multiple instances of something like this:
|> Now connected to https://www.triggercmd.com. \___/ For help, see: http://bit.ly/2q0QDpf (using sails.io.js node SDK @v1.2.1) Connected at: Fri Mar 15 2024 18:24:00 GMT-0400 (Eastern Daylight Time)
Also, can you tell me the versions of the agent on your 4 computers? If they're different, that could be a clue.
Also, I have better logging now, so I can probably track down the server logs related to your issue if you give me the time and your computer ID or account email address if/when it happens again.
-
RE: Not Seeing My Testing Devices in Developer mode
@AZRushFan, I suspect maybe you didn't close the SmartThings app after you enabled Developer mode. You can't just navigate away from it. Also I think they updated the app so you no longer have to scroll way to the bottom to find My Testing Devices. I see it near the top now.
-
RE: Run a Google Routine
@Marcos-Raldes,
unfortunately Google Assistant does not offer the ability to activate a routine when something like a doorbell button is pressed. Alexa does, and that's why you're able to run an Alexa routine when one of your TRIGGERcmd commands is triggered.<- Correction, I was wrong about this. You can create routines but you have to use the script editor. See post below.That said, you could run a routine from a python script on your computer if you wanted. I asked the AI Script Assistant to generate a script to do that. This is what it gave me:
AI Prompt: python script on Windows to run a google assistant routine
To run a Google Assistant routine on Windows using Python, you can use the google-auth and google-assistant-sdk libraries. Here’s an example script:
import os import json import google.auth.credentials from google.assistant.library import Assistant from google.assistant.library.event import EventType from google.assistant.library.file_helpers import existing_file # Set the path to your credentials file credentials_file = 'path/to/credentials.json' # Load the credentials from the file with open(credentials_file, 'r') as f: credentials = google.auth.credentials.Credentials.from_authorized_user_info(json.load(f)) # Define the routine you want to run routine = 'Good morning' # Create an Assistant instance with Assistant(credentials) as assistant: # Start the conversation assistant.start_conversation() # Send a text query to trigger the routine response = assistant.send_text_query(routine) # Print the response print(response)
Make sure to replace path/to/credentials.json with the actual path to your credentials file. You can create a credentials file by following the instructions in the Google Assistant SDK documentation.
To run the script, open a command prompt or PowerShell window and navigate to the directory where the script is saved. Then, run the command python script_name.py, replacing script_name.py with the actual name of your script file.