Navigation

    TRIGGERcmd
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Russ
    • Profile
    • Following 1
    • Followers 37
    • Topics 181
    • Posts 1892
    • Best 117
    • Groups 1

    Russ

    @Russ

    administrators

    I'm a tech enthusiast with about 30 years experience in IT. Recently I'm also a TRIGGERcmd developer.

    114
    Reputation
    3532
    Profile views
    1892
    Posts
    37
    Followers
    1
    Following
    Joined Last Online
    Website triggercmd.com Location Haslett, MI

    Russ Unfollow Follow
    administrators

    Best posts made by Russ

    • Autohotkey script for Play, Pause, Volume Up/Down, Next/Previous

      You'll need to install this on your Windows box to make it work: https://autohotkey.com

      This is my media.ahk autohotkey script:

      Gosub, %1%
      return

      next:
      Send {Media_Next}
      return

      previous:
      Send {Media_Prev}
      return

      pause:
      Send {Media_Play_Pause}
      return

      play:
      Send {Media_Play_Pause}
      return

      stop:
      Send {Media_Stop}
      return

      volup:
      Send {Volume_Up}
      return

      voldown:
      Send {Volume_Down}
      return

      mute:
      Send {Volume_Mute}
      return

      These are the corresponding commands.json entries:

      {"trigger":"Mute","command":"start C:\\autohotkeyscripts\\media.ahk mute","ground":"foreground","voice":"mute"},
      {"trigger":"Volume Up","command":"start C:\\autohotkeyscripts\\media.ahk volup","ground":"foreground","voice":"volume up"},
      {"trigger":"Volume Down","command":"start C:\\autohotkeyscripts\\media.ahk voldown","ground":"foreground","voice":"volume down"},
      {"trigger":"Media Next","command":"start C:\\autohotkeyscripts\\media.ahk next","ground":"foreground","voice":"next"},
      {"trigger":"Media Stop","command":"start C:\\autohotkeyscripts\\media.ahk stop","ground":"foreground","voice":"stop"},
      {"trigger":"Media Previous","command":"start C:\\autohotkeyscripts\\media.ahk previous","ground":"foreground","voice":"previous"},
      {"trigger":"Media Play Pause","command":"start C:\\autohotkeyscripts\\media.ahk pause","ground":"foreground","voice":"pause"},

      NOTE: You don't need a Play and a Pause because they do the same thing - they just toggle between play and pause.

      This is optional, but I'm also using my Raspberry Pi based IR receiver to trigger the above commands with a VCR remote.

      I have these entries in my /etc/lirc/lircrc file on the Pi:

        begin
             prog = irexec
             button = KEY_1
             config = export HOME=/root ; /root/triggertest.sh play downstairs
        end
        begin
             prog = irexec
             button = KEY_2
             config = export HOME=/root ; /root/triggertest.sh notepad downstairs
        end
        begin
             prog = irexec
             button = KEY_PLAY
             config = export HOME=/root ; /root/triggertest.sh "Media Play Pause" downstairs
        end
        begin
             prog = irexec
             button = KEY_PAUSE
             config = export HOME=/root ; /root/triggertest.sh "Media Play Pause" downstairs
        end
        begin
             prog = irexec
             button = KEY_RIGHT
             config = export HOME=/root ; /root/triggertest.sh "Media Next" downstairs
        end
        begin
             prog = irexec
             button = KEY_LEFT
             config = export HOME=/root ; /root/triggertest.sh "Media Previous" downstairs
        end
        begin
             prog = irexec
             button = KEY_STOP
             config = export HOME=/root ; /root/triggertest.sh "Media Stop" downstairs
        end
        begin
             prog = irexec
             button = KEY_UP
             config = export HOME=/root ; /root/triggertest.sh "Volume Up" downstairs
        end
        begin
             prog = irexec
             button = KEY_DOWN
             config = export HOME=/root ; /root/triggertest.sh "Volume Down" downstairs
        end
        begin
             prog = irexec
             button = KEY_MUTE
             config = export HOME=/root ; /root/triggertest.sh "Mute" downstairs
        end
      
      posted in Windows
      Russ
      Russ
    • RE: Autohotkey script for Play, Pause, Volume Up/Down, Next/Previous

      @William-Santiago-Ortiz-Trejos, for some reason your files with a .ahk extension aren't associated with AutoHotkey. That's supposed to happen when you install it, but maybe an antivirus program blocked it?

      To fix it you could try running the batch file in this article from your C:\Program Files\AutoHotkey folder:
      https://www.autohotkey.com/board/topic/13627-no-ahk-file-association/

      posted in Windows
      Russ
      Russ
    • RE: Installed background service, but background commands still not available

      Christian, I looked at your voice words for your commands, and tried them. The 2nd one worked well for me, but I had to remove the "ing" from the 1st one before Alexa recognized it.

      Your voice word for your computer worked well for me.

      One thing I found too is that Alexa understands better if you pause for about 1 second between "run X" and "on Y". So think of it like a comma - run this, on that.

      Also I just noticed a bug in the agent when I tested that. I found that if I only change the voice word for the command in commands.json, it doesn't update on the website. I had to change another field for it to update the command's voice word. Oops! I'll try to fix that and post a new version of the agent by tomorrow.

      Thank you for testing!

      posted in General Discussion
      Russ
      Russ
    • Pass parameters with Alexa routines

      Alexa Routines now works with the original "TRIGGERcmd" and "TRIGGER command" skills.

      This is great because now instead of saying:

      Alexa, ask TRIGGERcmd to run notepad on office with parameter russ

      You can just say:

      Alexa, russ

      I just created this video to show how it works: https://youtu.be/rZXfncqXqmA

      Also these screenshots show how to set it up in the Alexa app:
      Alexa Routines
      Edit Routine
      multiple phrases
      triggercmd custom

      posted in Alexa
      Russ
      Russ
    • RE: Nothing happens when you enter the token on windows.

      @chabetico, your commands were stored in the commands.json file in C:\Users\(your user)\.TRIGGERcmdData\commands.json. If that file is gone, you'll need to recreate your commands from scratch. For added security, the actual commands are not stored in your account in the cloud. They're stored on your computer.

      posted in Windows
      Russ
      Russ
    • Delete all browsing history in Internet Explorer

      rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

      posted in Windows
      Russ
      Russ
    • RE: Installed background service, but background commands still not available

      I'm sorry installing the background service it didn't work. I hope I can figure out why. I have Windows 10 too. I just tried uninstalling and re-installing the background service and it works for me.

      Do you see the TRIGGERcmdAgent service listed in you Windows services? If so, maybe you just need to start it, or stop/start it.

      When you installed the background service, did you see a "User Account Control" prompt to allow Node.js to make changes to your device? I assume you click Yes to that?

      I'd appreciate any clues you can give me to help me reproduce the problem.

      posted in General Discussion
      Russ
      Russ
    • RE: Avoid saying 'with parameter' when passing arguments via Alexa?

      @Craig-OK, I've been thinking about this. None of the methods for shortening the Alexa phrase (ifttt or routines) allow for parameters, so I can't think of a good solution besides, just saying the whole thing:
      Alexa, ask TRIGGERcmd to run download with parameter Ubuntu server

      And that assumes the command with download in the voice field is on your default computer.

      posted in Alexa
      Russ
      Russ
    • RE: How do you run an application from Trigger CMD on my laptop

      @minh-tam-nguyen, I think I might know what's wrong. Because there are spaces in your command, you probably need quotes around it.

      Using the GUI editor, please make your command:

      "C:\Riot Games\League of Legends\LeagueClient.exe"
      

      Also, please test it using the green play button in the GUI editor.

      posted in Windows
      Russ
      Russ
    • Turn monitors on and off

      Turn monitors off:

      powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)
      

      Turn monitors on (didn't work for me - see below):

      powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,-1)
      

      In my case, the Turn monitors on powershell command didn't work for me. My monitors turned on but then turned right back off for some reason. So instead, I used this script and made this my command line so it effectively presses the Print Scrn button to turn my monitors back on:

      wscript d:\scripts\key.vbs PRTSC
      
      posted in Windows
      Russ
      Russ

    Latest posts made by Russ

    • RE: TriggerCMD Commands are assigned device type "light"?

      @rancor, that's interesting. I changed the device type from an on/off switch to a colored dimmable light so people can pass a color or a number from 1 to 100 to their command as a parameter, not just on or off.

      I'm glad you showed me this problem. I didn't realize it caused a problem. I'll look into making the device type configurable. I might default it to on/off switch like it was before, and make the colored dimmable light device type an option.

      Before I make the change though, isn't the default for lights that they're not associated with any room? And does that solve the problem?

      posted in General Discussion
      Russ
      Russ
    • RE: Where is my token ? Can't find

      @andré-augusto you can find it on the instructions page or in your profile while you're logged into your account.

      posted in Instructions
      Russ
      Russ
    • RE: TRIGGERcmd outage

      @ricardomat, awesome. You're welcome.

      posted in Announcements
      Russ
      Russ
    • RE: TRIGGERcmd outage

      @ricardomat, if you change Trigger or Voice field for the command, it should trigger a re-sync with Alexa for that command. If it worked, you should be able to refresh this page and see it.

      I might see the problem. That screenshot is for the wrong skill. You need the TRIGGERcmd Smart Home skill.

      The screenshot you show is for the old original skill that doesn't create Smart Home devices.

      posted in Announcements
      Russ
      Russ
    • RE: TRIGGERcmd outage

      @ricardomat, the voice field for the command should be something like "monitor", then Alexa will create a device called monitor and you can say, "Alexa, turn monitor off".

      Your voice field is set to "monitor off" which will confuse Alexa because you'd need to say, "Alexa, turn monitor off off."

      But, it should still show up as a Smart Home device. Do you see it listed here?
      https://alexa.amazon.com/spa/index.html#appliances

      Also, please confirm you can run the command from the website.

      posted in Announcements
      Russ
      Russ
    • RE: TRIGGERcmd outage

      @ricardomat, I see. Does does the command show up in the "Smart Home Voice Commands" list?

      If not, it won't show up in Alexa's device list either, and the problem is likely the computer isn't set as the default computer set in your profile, or your computer doesn't have the voice field set (something like "laptop").
      One or the other needs to be true, but if you only have one computer, I recommend setting it as your default so you don't have to say "turn on calculator on laptop". You can just say "turn on calculator" instead.

      If you've confirmed the above, you could try Remove All then Discover here:
      https://alexa.amazon.com/spa/index.html#appliances

      946030d6-de58-4b8b-80db-d018c701f872-image.png

      EDIT: I noticed you set your computer's name as "Turn monitors off". That should be something like "laptop" instead because that's what you're using to refer to your computer when you use Alexa or Google Assistant.

      posted in Announcements
      Russ
      Russ
    • RE: TRIGGERcmd outage

      Hi @ricardomat. Will you please try again? The app has had a few problems today but it's finally stable now.

      posted in Announcements
      Russ
      Russ
    • RE: TRIGGERcmd outage

      @mark-hollis, as of this morning I actually hadn't touched the code in almost 2 weeks, so it wasn't something I changed. It seemed the database got overloaded, which killed the 6 instances of the server, and they kept re-starting, so I suspected it might have been a denial of service attack. I modified some settings in the database client and thought it was good to go. I was wrong. I found out after work it was down again. I'll post more details soon.

      EDIT: After a reboot, the forum wouldn't start, and while troubleshooting it I made it worse by disabling all of the forum's plug-ins. I finally got those re-enabled and the forum is working.

      EDIT 2: It has been stable for a few days now. The root cause of the problem was apparently too much pressure on the database server which caused queries to time out and the application servers to crash and reboot. I reduced the number of connections the application instances keep open on the database server. That seems to have solved it.

      posted in Announcements
      Russ
      Russ
    • RE: Javascript error occurred in the main process

      @mark-hollis, thanks. I thought I had it fixed this morning and found out just recently it went down again. Working on it again now.

      posted in General Discussion
      Russ
      Russ
    • TRIGGERcmd outage

      I'm sorry about the outage today. I'm actually still working on it. I thought it was fixed this morning, then after work I found it was still down. I'm working on it again now.

      posted in Announcements
      Russ
      Russ