@matheus-venancio What is the actual command that you're using? And does it work from a cmd prompt?
-
RE: Shutdown command doesn't work on Windows Server
-
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.
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.
-
RE: 2 out of 4 computers have stopped running Commands
@Mike-Vecchiarelli, sorry about the trouble. Please confirm this: in the command's runs list, you see "Trigger sent" but you don't see the corresponding "Command ran" entry, correct?
Also, did it stop running commands after that point until you restarted the agent? Or did it auto-correct itself and you see the "Trigger sent", "Command ran" pattern resumed after that initial missed run?
I'm trying to figure out if the agent malfunctioned and stopped running commands, or if it just missed that one command. The root cause will be very different depending on the answer to that question.
Also, can you check you debug.log file for any errors and send it to me? You can find it in c:\Users\(your user)\.TRIGGERcmdData.
-
RE: Turn On Notebook Display
@Bruno-Rafael Look through recent posts for NirCmd instructions. It can simulate key presses but I don't know that a virtual press will suffice.
If it does, simply create an Alexa routine with both actions (and you'd probably want to throw a Wait command in between)
-
RE: SmartThings Developer Mode
@AZRushFan, have a new phone and I just now re-enabled developer mode in the SmartThings app. I held down About for a long time, maybe 10 seconds just to be sure. It worked for me. I too this screenshot.
-
RE: How to use Off Command
@Xander, there's no official x86 TRIGGERcmd agent version. If you updated agent.js, you've got the latest functionality.
-
RE: How to use Off Command
@Russ Sorry for the delayed reply; crazy week.
Background was the problem on the one part.
On the other, for some weird reason, Task Scheduler was renaming the actual .job from "SCoff" to "SC off" so that the path was wrong. Once I spotted that, I got it working.Just to check - I've been running the x86 version of TCMD on that PC for...years? Other than the updated .js, there's no newer version? The main DL is x64.
-
RE: Getting data from Google Sheets
@Jonas-Leite, what do you see in your results.log file in your .TRIGGERcmdData folder?
You should see something like this:{"data":[{"name":"result","voice":"","voiceReply":"{{result}}","allowParams":false,"user":"blahblah","computer":"blahblah","switch_is_on":false,"runCount":1,"createdAt":"2020-01-13T15:08:55.389Z","updatedAt":"2020-01-13T15:10:16.077Z","lastResult":"The result","id":"5e1c8807692cfd00191fb558"}],"message":"Command result updated successfully."}
Also, when you run it via TRIGGERcmd, do you see your cell value in the runs list for your command?
Also, if you run the python script manually, outside of triggercmd, do you get output like this?
Output: C:\path>if "(cell value)" == "" goto noparams C:\path>goto yesparams C:\path>set /p TCMD_TOKEN= 0<C:\Users\you\.TRIGGERcmdData\token.tkn C:\path>curl -X POST https://www.triggercmd.com/api/command/result -H "Authorization: Bearer (token)" -H "content-type: multipart/form-data" -F computer_id= -F command_id= -F result=(cell value) 1>>C:\Users\you\.TRIGGERcmdData\results.log
Also, I just remembered - you need to install curl if you haven't already because the SendResult.bat script uses it to send your result to TRIGGERcmd.
https://curl.se/windows/