@Russ Not a problem. I wondered if it was something like that, but my attempts to fix it didn't involve recreating the Zap. It was easy to rebuild it from scratch, and I only have the one (so far). Thank you.
Posts made by Christian Robinson
-
RE: Now you can use Zapier to trigger your commands!
-
RE: Now you can use Zapier to trigger your commands!
My only Zap has been failing for the past few weeks, with this error: "www.triggercmd.com returned (502) Bad Gateway and said nothing"
Any tips on fixing it?
-
RE: Commands that use Nircmd.exe (toggle mute, say stuff, etc.)
@Nate-Hales You're going beyond what I'm doing with Alexa/TRIGGERcmd/home automation, so I don't know if I could help you much. I hope the tools I posted above can be useful, though.
-
RE: Commands that use Nircmd.exe (toggle mute, say stuff, etc.)
I just use a passive stereo mixer to allow me to hear my Echo Dot, my TV, my computer, etc. at once. Same concept, basically.
-
RE: Commands that use Nircmd.exe (toggle mute, say stuff, etc.)
Theoretically, yes, as long as you're willing to go with "canned" messages. Windows 10 (and 8, I'm assuming) has some support for text-to-speech, but it's not very accessible. Somewhere I came across a small vbs that can do short messages on the command line:
say.vbs
set s = CreateObject("SAPI.SpVoice") s.Speak Wscript.Arguments(0), 3 s.WaitUntilDone(1000)
It's called this way:
cscript say.vbs "hello world"
-
RE: Commands that use Nircmd.exe (toggle mute, say stuff, etc.)
You can't override Alexa's responses, unfortunately. The "voice" part of the configuration for TRIGGERcmd is for what you say to Alexa.
-
RE: Commands that use Nircmd.exe (toggle mute, say stuff, etc.)
SimKeys.ahk
; By SKAN, http://goo.gl/JfMNpN, CD:23/Aug/2014 | MD:24/Aug/2014 #Warn #SingleInstance, Force Args( CmdLine := "", Skip := 0 ) { Local pArgs := 0, nArgs := 0, A := [] pArgs := DllCall( "Shell32\CommandLineToArgvW", "WStr",CmdLine, "PtrP",nArgs, "Ptr" ) Loop % ( nArgs ) If ( A_Index > Skip ) A[ A_Index - Skip ] := StrGet( NumGet( ( A_Index - 1 ) * A_PtrSize + pArgs ), "UTF-16" ) Return A, A[0] := nArgs - Skip, DllCall( "LocalFree", "Ptr", pArgs) } CmdLine := DllCall( "GetCommandLine", "Str" ) Skip := ( A_IsCompiled ? 1 : 2 ) argv := Args( CmdLine, Skip ) If ( argv[0] == 1 ) Send % argv[1] Else Msgbox, , Error, Must provide exactly one argument, 10 ;Msgbox % "Count = " argv[0] "`n1=" argv[1] "`n2=" argv[2] "`n3=" argv[3] "`n4=" argv[4] "`n5=" argv[5]
SimKeys.vbs
Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.SendKeys WScript.Arguments(0)
Excerpt from commands.json
{"trigger":"Play", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Play_Pause}", "ground":"foreground", "voice":"play"}, {"trigger":"Pause", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Play_Pause}", "ground":"foreground", "voice":"pause"}, {"trigger":"Stop", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Stop}", "ground":"foreground", "voice":"stop"}, {"trigger":"Previous", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Prev}", "ground":"foreground", "voice":"previous"}, {"trigger":"Next", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Media_Next}", "ground":"foreground", "voice":"next"}, {"trigger":"Volume Up", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Volume_Up}", "ground":"foreground", "voice":"volume up"}, {"trigger":"Volume Down", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Volume_Down}", "ground":"foreground", "voice":"volume down"}, {"trigger":"Mute/Unmute", "command":"\"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64\" C: YOUR DIRECTORY \\SimKeys.ahk {Volume_Mute}", "ground":"foreground", "voice":"mute"},
Replace "YOUR DIRECTORY" with the proper path to SimKeys.ahk and SimKeys.vbs (both need to be in the same location).
Edit: It appears SimKeys.vbs is not necessary. I don't remember why I have it--possibly because I was trying out an alternate method and forgot to move/remove it. I'm leaving it here just in case.
-
RE: Feature request: Leave off computer name when issuing an Alexa command
@Russ No problem. I'm happy to help, especially since this is such a cool skill. Thank you for your efforts.
-
RE: Feature request: Leave off computer name when issuing an Alexa command
@Russ No, I wasn't saying "run," but when I do it works.
-
RE: Feature request: Leave off computer name when issuing an Alexa command
@Russ Unfortunately I still get the "undefined" response. Also, duplicates still appear on me occasionally--when I notice it I use the rename trick to clear them, but didn't see that one.
-
RE: Feature request: Leave off computer name when issuing an Alexa command
@Russ Unfortunately it just doesn't work either way. Giving it the voice name gives an overall error (can't find the device, or something like that), but giving it the computer name always gives the "Could not find a trigger called undefined on Arrietty" error.
-
RE: Feature request: Leave off computer name when issuing an Alexa command
@Russ Unfortunately it's not working. I can still do "Alexa, tell TRIGGER c m d [command] on Windows," and it works fine, but if I leave the "on Windows" part off Alexa always says "Could not find a trigger called undefined on [...]"
Edit: Perhaps it has something to do with the fact that I have a different name and voice trigger name for my Windows machine? For Alexa I just call it "Windows" but in my profile it's called "Arrietty". I had to set the default name in my profile to "Arrietty" or Alexa would tell me it could not find the device.
-
RE: Commands that use Nircmd.exe (toggle mute, say stuff, etc.)
Since I already use AutoHotkey I used someone's example one-off AutoHotkey script to accomplish the Mute/Unmute, plus Play/Pause, Volume Up/Down, and Skip Forward/Back. I can provide the script and commands if anybody's interested. It can be used to simulate virtually any keyboard key, or even key sequences.
-
RE: Prevent suppression of cmd window?
@Russ Aha! Oddly I thought I had tried that, but I tried it just now and it worked so I'm sure I'm remembering wrong.
As always, thank you. This is quickly becoming my favorite Alexa skill.
-
Prevent suppression of cmd window?
I'm on Windows 10, and I have a process that outputs text information to a cmd window. I want to be able to invoke this with TRIGGERcmd, but when I do the cmd window is suppressed, even though the process is visible in the task manager.
I've tried various invocations in the commands.json file, including explicitly calling cmd to run the command but the cmd window never appears.
Normally I would consider the suppression of cmd a good thing, since I have some limited experience with wanting to be able to run programs without a cmd window appearing, and had to come up with some interesting workarounds in some cases. I just need a way to override it.
-
RE: Feature request: Leave off computer name when issuing an Alexa command
@Russ, The most obvious way to prevent it form stressing your server is a throttle system. Simplest is to refuse to run too many commands in a row without a delay between them. That wouldn't solve the problem of an infinite loop mistake, though, and preventing those seems far more tricky to me. I can imagine this might frustrate people who want to "chain" triggers, but that's not really the right way to do it; they should be writing a shell, batch, or whatever script that does everything on a single trigger.
Allowing parameters is something I think you should avoid, since it's too likely to create security holes even if you try to sanitize input. You definitely need to strip out shell meta-characters such as $, *, ?, {}, (), [], quotes, and so on, especially since some shells like Bash and zsh have some mind-boggling extra expansion capabilities.
If you really want to do it, I suggest forcing the user to explicitly specify allowed parameters in the json config file:
{"trigger":"Foo","command":"foo","ground":"foreground","parameters":["bar","baz","qux","etc"]},
So triggering "foo" is only allowed to have some combination of "bar", "baz", "qux", and "etc" passed to it. It wouldn't stop the user from shooting themselves in the foot if they were determined to, but it'd make it harder, and shift the responsibility to them.
-
RE: Feature request: Leave off computer name when issuing an Alexa command
I was just musing on ideas on how to specify a default, and wondering aloud whether it's better to have just a default computer or make individual commands have a default--that is, command "abc" could be default to computer "xyz," while command "123" would be default to computer "789". That led me to wonder what would happen if you tried to make "abc" default on both "xyz" and "123" and what the solution would be to that problem. Ignore it, or allow it to trigger on both, or something else?
I like your "on all computers" idea, but that makes me wonder about the possibility of groups. Although I don't imagine anybody would typically have more than two or three computers set up with this system, if someone had several they might want to be able to group them together. For example group "Home" and group "Work." "Alexa tell Trigger C M D lock on group Home."
But this is getting afield of my original suggestion, which is to be able to just invoke the command without a specification of which machine(s) to trigger on, which would be the most useful to me right now, whichever way you want to implement it if you choose to do so.
-
RE: Feature request: Leave off computer name when issuing an Alexa command
You could possibly make it so there could be a default on a per-command basis:
{"trigger":"Lock","command":"tsdiscon","ground":"foreground","voice":"lock","default":"true"}
But that raises the question of what to do if someone makes a mistake and tries to default the same trigger on multiple machines.
Edit: On consideration, you could allow multiple defaults, and they would all be triggered. I can envision a case where, for example, I would want to be able to suspend or power down several computers with one command.
-
Feature request: Leave off computer name when issuing an Alexa command
I don't know if it would be possible, as I'm not sure how the Alexa Skills API actually works, but it would be nice if I could designate one of my registered computers as the default for Alexa commands, so instead of saying, "Alexa, tell Trigger C M D lock on computer," I could just say, "Alexa, tell Trigger C M D lock," and it would trigger it on the designated default machine. (Actually, as I currently only have one machine registered with TRIGGERcmd, it would be the de-facto default.)
-
RE: Installed background service, but background commands still not available
I think I've uncovered another bug. For some reason I'm seeing multiple entries in my command list on the website, even though my commands.json file doesn't have duplicates, and triggering one of the duplicated commands is problematic.