TRIGGERcmd
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Russ
    • Profile
    • Following 1
    • Followers 35
    • Topics 196
    • Posts 2276
    • Best 138
    • Controversial 3
    • Groups 1

    Russ

    @Russ

    administrators

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

    135
    Reputation
    3660
    Profile views
    2276
    Posts
    35
    Followers
    1
    Following
    Joined Last Online
    Website triggercmd.com Location Haslett, MI

    Russ Unfollow Follow
    administrators

    Best posts made by Russ

    • RE: Doc Api

      @Ruan-Santana, I added two pages to the documentation this morning:

      https://docs.triggercmd.com/#/./API/TriggerCommand
      https://docs.triggercmd.com/#/./API/ListCommands

      Is that what you're looking for?

      posted in API
      Russ
      Russ
    • List of ways to trigger your commands

      You can use this web page of course, but don't stop there. Check out this list of ways to run your commands on your computers.

      The Smart Home version of the Alexa skill and Google Assistant action does the best job of matching your spoken words to your commands.

      Smart Home voice assistant skills (Example: "Alexa, turn on calculator") <--Recommended

      • "TRIGGERcmd Smart Home" Alexa skill
      • "TRIGGERcmd Smart Home" Google Assistant action

      Original "conversational" voice assistant skills (Example: "Alexa, ask TRIGGERcmd to run calculator"):

      • Original Alexa skill
      • Original Google Assistant action (deprecated)

      Progressive Web App (PWA)

      • https://app.triggercmd.com

      Mobile apps:

      • Android Google Play Store: TRIGGERcmd Widgets - Tap widgets on your phone's home screen to run your commands.
      • Android Google Play Store: TRIGGERcmd - It's just like the website but doesn't support Google authentication, so set a password in your profile if you use Google auth.
      • Android Amazon App Store: TRIGGERcmd
      • iOS: TRIGGERcmd

      Run your commands when things happen in other Internet services:

      • Zapier - create a "Zap" that runs your command when something happens on one of their 1500+ supported apps.
      • Make (formerly Integromat) - create "scenarios" that run commands on your computers.
      • IFTTT - If This Then run a command, or if a TRIGGERcmd command runs, run an IFTTT applet.
      • Microsoft Power Automate (aka Flow) - run commands when things happen in Office 365 and other services.
      • Pipedream - build workflows that run your commands.

      IoT Smart Home hubs:

      • Samsung SmartThings - Create virtual switches for each command, then flip the switches to run them.
      • Homey - Use the ‘run command’ flow action.
      • Hubitat - Trigger a command like you'd flip a switch.
      • Node-RED - Run commands using an "http request".
      • Home Assistant - Use a "RESTful command" to run your TRIGGERcmd command.
      • HomeKit - Use the homebridge-http-switch plugin with a bookmark URL.

      Other cool stuff:

      • iOS shortcut - Use the iOS Shortcuts app to run your commands with Siri.
      • Run an Alexa routine - when one of your TRIGGERcmd commands runs.
      • Bookmarks - Create and share URL's that run your commands without authentication. You can set an optional timeout to make bookmark URL's expire. People can also scan your bookmark's QR code to run the command.
      • Paywall URL's - Similar to bookmark URL's, you can also charge people via Paypal to run your commands.
      • REST API - Use curl or other client to call the TRIGGERcmd API.
      • tcmd - Command line tool written in Go.
      • Tasker - Tasker is an Android app for automating things with your phone.
      • Slack app - Run your commands with Slack "slash" commands.
      • Powershell - Run a command on a computer across the Internet from your powershell script.
      • Roku channel - Run a command from your Roku.
      • Unity - Run a command from a Unity game or utility you made.
      • Streamdeck - Configure a Streamdeck button to run a command on a remote computer.
      posted in Instructions
      Russ
      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: Laptop Battery Management - Automated On/Off Cycle

      @philip-nguyen, there's a similar question here.

      These are the high level steps:

      1. Create 2 commands that just run echo (doesn't matter what), and name them PlugOn and PlugOff.
      2. Setup two Alexa routines - one that turns on your smart plug when the PlugOn command runs, and other that turns it off when the PlugOff command runs.
      3. Create a script. At the beginning of the script, do the following:
      4. Set variable called PLUG_IS_ON with a default value of true.
      5. To make sure the plug is on at first, run the tcmd utility like this: tcmd -t plugon -c (your TRIGGERcmd computer name)
      6. Create a loop that repeats every minute. Inside the loop, do the following:
      7. Check your battery level with BatteryInfoView.exe
      8. When the level is below 30 percent and PLUG_IS_ON = false, run tcmd utility like this: tcmd -t plugon -c (your TRIGGERcmd computer name)
      9. When the level is above 99 percent and PLUG_IS_ON = true, run tcmd utility like this: tcmd -t plugoff -c (your TRIGGERcmd computer name)
      10. Also set PLUG_IS_ON to true when you run plugon, and set it to false when you run plugoff

      I think that should work. Do you know how to do that? Let me know if you get stuck, and where you get stuck. I can look at your script if you paste it here.

      posted in Example Commands
      Russ
      Russ
    • RE: Triggercmd smart home not reachable

      It's back up now.

      One of my servers went down last night, and Kubernetes didn't handle the fail-over well.

      I got an email from my monitoring system while I was sleeping. I'll need to setup something else that will actually wake me up.

      I'm sorry about this outage.

      posted in Google Home
      Russ
      Russ
    • RE: Shutdown não funciona no mac

      @Waldex-Santos, I think this should work:

      osascript -e 'delay 60' -e 'tell app "System Events" to shut down'
      
      posted in Mac
      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
    • smartthings-cli

      This works in Windows, Mac, Linux, Raspberry Pi. You can list and control your SmartThings devices with the Samsung SmartThings cli (command line interface) tool.

      https://github.com/SmartThingsCommunity/smartthings-cli#smartthings-devicescommands-id-command

      smartthings.exe devices
      ──────────────────────────────────────────────────────────────────────────────────────────────────────────────
       #   Label                        Name                            Type   Device Id
      ──────────────────────────────────────────────────────────────────────────────────────────────────────────────
       1   Front Door                   base-contact                    ZWAVE  5bebe423-f899-486e-9f62-8c63707a9b6c
       2   Front Lights                 switch1                         DTH    fb132245-8bd0-478d-be4b-ca311ae64656
       3   Home Hub                     SmartThings v2 Hub              HUB    9079eb4d-10b4-435d-9a05-b2b9629cb50a
       4   Motion Sensor                Motion Sensor                   DTH    b8a3a1ab-daac-44fb-a6c9-53bac4382df9
       5   Notepad                      Notepad                         DTH    a83bbda3-d461-44ae-948a-7d8fd13b5799
       6   Samsung 7 Series (40)        [TV] Samsung 7 Series (40)      OCF    01253b2b-71ed-4b74-b7dd-74dd94522d96
       7   THERMOSTAT                   Honeywell TCC 6000 Thermostat   VIPER  86b567ac-0da3-4257-9b03-47a3cfc3b469
       8   Kitchen Switch               Z-Wave Switch                   DTH    e2237460-e3fa-4bf5-8a24-3e6d64f89352
      

      To turn on my Kitchen z-wave switch, I can run a command like this:

      smartthings.exe devices:commands e2237460-e3fa-4bf5-8a24-3e6d64f89352 switch:on
      

      SmartThings devices can be controlled with the SmartThings app of course, but this might be useful in scripts - whether you run them remotely via TRIGGERcmd or not.

      posted in Example Commands
      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: How can I get feedback that the command was executed remotely?

      @Murilo-Callegari, if you look at the Runs list for your command, it should say "Command ran" if the command actually ran on your computer.

      If you're worried the screen still didn't lock even though your "lock screen" command ran, you could have your "lock screen" script also check whether the screen is locked, and send that information to the Runs list using the ~/.TRIGGERcmdData/result.sh script.

      Just run ~/.TRIGGERcmdData/result.sh from your "lock screen" script with a status message like "Locked" or "Unlocked" as the parameter when you run result.sh.

      You can also have Alexa speak the "Locked" or "Unlocked" result if you add {{result}} to your command's Voice Reply field and use one the Conversational Alexa skills.

      This article has more about that.

      posted in Mac
      Russ
      Russ

    Latest posts made by Russ

    • Display a Window with custom text

      This command will show a window with the text you want to show:

      zenity --info --text '<span foreground="blue" font="32">Some\nbig text</span>\n\n<i>(it is also blue)</i>'
      

      zenity

      If you run it in the background agent, have your command run this script to set the DISPLAY environment variable first:

      #!/bin/bash
      export DISPLAY=:0
      zenity --info --text '<span foreground="blue" font="32">Some\nbig text</span>\n\n<i>(it is also blue)</i>'
      

      You'll also need to run this as your normal user first:

      xhost +
      
      posted in Raspberry Pi
      Russ
      Russ
    • RE: Shorter URL or redirect

      @Smart-Communities, I added the Short Bookmark URL feature. Please check it out and let me know what you think.

      There's a new button on the original Bookmark page that allows you to create a "Short Bookmark."

      759ef561-ef71-4756-8cce-0201589d05e9-image.png

      posted in General Discussion
      Russ
      Russ
    • RE: Subscription Issue, money refund

      @alebarzal, no problem. This happens once in a while. I sent a refund.

      posted in General Discussion
      Russ
      Russ
    • RE: New SmartThings integration (2023)

      @Cristian-Dindinelli, great. Thanks for confirming. Samsung emailed me saying they're rolling out a new version of their app that fixes the issue. Apparently that's done now.

      I updated to SmartThings app version 1.8.07.23 and it's working for me now!

      posted in Announcements
      Russ
      Russ
    • RE: Shorter URL or redirect

      @Smart-Communities, I'll think about how I could do it. I think it would require a database record.

      EDIT: I made a bunch of progress tonight, but I won't be able to work on it until Friday.
      When it's ready the short bookmark URL's will look like this: https://triggercmd.com/sb?b=phd-UJYpW41gT06e

      posted in General Discussion
      Russ
      Russ
    • RE: Shorter URL or redirect

      @Smart-Communities, which URL's do you want to shorten? The bookmark URL's?

      posted in General Discussion
      Russ
      Russ
    • RE: TRIGGER routine from another app linked to Alexa

      @Mauro, yes, you can start an Alexa routine whenever you trigger a command.

      It requires the TRIGGERcmd Smart Home alexa skill to be enabled, then you can

      These are the instructions:
      https://www.triggercmd.com/forum/topic/1844/run-an-alexa-routine-when-a-command-runs

      This video also shows how it works:
      https://youtu.be/nrqj-OwDpGE?si=xuuR4yfWZZho9Dqw&t=199

      posted in General Discussion
      Russ
      Russ
    • Trigger a command with a Shortcut via Siri

      You can run commands on your computers with Siri using a Shortcut. Here's how:

      1. Download the Shortcuts app on your iOS device.

      2. Open this link or scan this QR code from your iOS device:
        triggercmd_ios_shortcut_qr_code.png

      3. Fill in the computer, trigger, and token fields. The params field is optional.

      4. In the shortcut's settings, tap "Add to Siri" and record your personal phrase.

      triggercmd_ios_shortcut.jpg

      Here's a Youtube video showing how it works:
      https://youtu.be/YBOiWBokal8

      posted in Mac
      Russ
      Russ
    • RE: How can I get feedback that the command was executed remotely?

      @Murilo-Callegari, if you look at the Runs list for your command, it should say "Command ran" if the command actually ran on your computer.

      If you're worried the screen still didn't lock even though your "lock screen" command ran, you could have your "lock screen" script also check whether the screen is locked, and send that information to the Runs list using the ~/.TRIGGERcmdData/result.sh script.

      Just run ~/.TRIGGERcmdData/result.sh from your "lock screen" script with a status message like "Locked" or "Unlocked" as the parameter when you run result.sh.

      You can also have Alexa speak the "Locked" or "Unlocked" result if you add {{result}} to your command's Voice Reply field and use one the Conversational Alexa skills.

      This article has more about that.

      posted in Mac
      Russ
      Russ
    • RE: Alexa keeps hearing "perameter" as"perimeter"

      @Steve-Lee, the TC Alexa skill now supports "... with argument X."

      posted in General Discussion
      Russ
      Russ