TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. General Discussion
    Log in to post
    Load new posts
    • Recently Replied
    • Recently Created
    • Most Posts
    • Most Votes
    • Most Views
    • C

      Would this PHP code work?

      • • ctaylor
      2
      0
      Votes
      2
      Posts
      853
      Views

      RussR

      @ctaylor, you were so close! I made it work with a couple small tweaks. Here's my code that works.

      <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.triggercmd.com/api/run/triggerSave"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"computer":"DS","trigger":"calculator"}'); curl_setopt($ch, CURLOPT_POST, 1); $headers = array(); $headers[] = "Authorization: Bearer (token from instructions page)"; $headers[] = "Content-Type: application/json"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close ($ch); ?>

      You'll see that I changed this line to use single quotes around the json object.

      curl_setopt($ch, CURLOPT_POSTFIELDS, '{"computer":"DS","trigger":"calculator"}');

      And I changed this line to use application/json instead of application/x-www-form-urlencoded because you're passing a json object.

      $headers[] = "Content-Type: application/json";

      In case you're curious, this is how I tested my test.php script:

      docker run -it --rm --name test-script -v d:\appdev\php:/myscript -w /myscript php:7.0-cli php test.php

      BTW, I'm curious what your application is.

    • B

      Is it possible to use IFTTT to issue a command to multiple computers?

      • • Bryan W
      6
      0
      Votes
      6
      Posts
      2.4k
      Views

      A

      @russ 👍

    • I

      Background commands not working but service is installed

      • • IAmJustRobin
      1
      0
      Votes
      1
      Posts
      570
      Views

      No one has replied

    • M

      Customize invocation term?

      • • meyerdenney
      4
      0
      Votes
      4
      Posts
      1.4k
      Views

      RussR

      I like Xander's idea if you have Alexa. If you have a Google Home, you can setup a shortcut and say anything you want, like:

      Hey Google, foobar

      You just have to setup a shortcut called foobar for "ask TRIGGERcmd to run foo on bar" (for example).

    • M

      dual commands

      • • mike cornelison
      3
      0
      Votes
      3
      Posts
      1.3k
      Views

      RussR

      @mike-cornelison, like Xander wrote, you can use & between your commands to run multiple commands on one command line.

      But you said you're running a batch file. So couldn't you just put multiple lines in that batch file? Like so?

      start http://127.0.0.1:8086/?x10command=DEVICE~sendrf~%%27A3%%20ON%%27 start http://127.0.0.1:8086/?x10command=DEVICE~sendrf~%%27A4%%20ON%%27
    • U

      Google Home - 2 PC's

      • • username6
      5
      0
      Votes
      5
      Posts
      1.4k
      Views

      U

      @russ Thanks very much, Russ!

      Works perfectly.

      Regards.

    • ?

      Usage story (is there a direct GET API for triggering?)

      • • A Former User
      9
      0
      Votes
      9
      Posts
      2.8k
      Views

      RussR

      @Dewi-Morgan, check this out:

      https://youtu.be/1yvMMoj1Oxc

      It's not on the Slack App Directory yet, but you can start using it now.

      EDIT: It's in the Slack directory now.

    • RussR

      New feature feedback please: Ability to give another user access to run commands on your computer

      • • Russ
      2
      0
      Votes
      2
      Posts
      726
      Views

      T

      I have just been in a chat with Google Home support and have requested that they add a feature to a share my shortcuts and Google Assistant apps in Google Home with other Google users so other users of my Google Home in my house can make requests of my Google Home without it replying that it doesn't recognize their voice as mine. If this was done on TriggerCMD's side of things I would think I would have to build my numerous shortcuts one by one on each added user's Google Home app and that is not that attractive. I hope it wouldn't be much more difficult for Google to figure out than the way they allow me to share my personal calendar with other users. 🤔 If Google Home had a way to import/export shortcuts from the Home app in bulk I suppose having this happen on the TriggerCMD side would be more attractive to me. Until then I'll just keep using the TriggerCMD "bookmark" feature to allow others access to my smart home features.

      Keep up the good work! I love TriggerCMD!

    • M

      Does the subscription auto-renew

      • • meyerdenney
      4
      0
      Votes
      4
      Posts
      1.4k
      Views

      RussR

      Good idea @tim-s.

    • T

      GA replys "Done" or "Triggering All Lights Off on LivRmHTPC"

      • • Tim S
      5
      0
      Votes
      5
      Posts
      1.3k
      Views

      T

      Awesome! Excellent work! Came home and activated Update Agent on server. Haven't spent much time with it but individual responses for individual commands is now working perfect it seems and when edited it seems to save the Voice Reply edits the first try. You don't mess around and get right on fixing stuff! Thanks!

    • ?

      Most of my commands don't work with google assistant

      • • A Former User
      4
      0
      Votes
      4
      Posts
      946
      Views

      RussR

      @sjo1234, good, yea that's a way around it - I love Google Assistant's shortcuts.

    • ?

      Can you explain how to use IFTTT with google home

      • • A Former User
      2
      0
      Votes
      2
      Posts
      684
      Views

      ?

      @foyalcolibris972

      ok i figured it out

      its working great

    • ?

      Custom Invocation Name for triggercmd

      • • A Former User
      11
      0
      Votes
      11
      Posts
      3.1k
      Views

      RussR

      @smart-leap, here's a Postman example:
      TRIGGERcmd Postman example

    • ?

      Batch file command trouble

      • • A Former User
      2
      0
      Votes
      2
      Posts
      925
      Views

      ?

      Problem solved: I had to set an an environment variable for the executable in Path and reboot. Running beautifully!

    • ?

      Triggercmd.com sees my computer but not my commands?

      • • A Former User
      3
      0
      Votes
      3
      Posts
      1.5k
      Views

      ?

      Thanks, the following didn't work but I reinstalled on a second computer which worked and then copied the original text triggers back to my first PC which now works so must be something wrong with the way the GUI triggers entered into the trigger file in the original instance.

    • M

      no computer call

      • • mike cornelison
      6
      0
      Votes
      6
      Posts
      1.7k
      Views

      M

      @russ Thanks for a great program. Let me know if you come up with a solution.

    • ?

      Open YouTube in default broswer and query search term

      • • A Former User
      1
      0
      Votes
      1
      Posts
      1.1k
      Views

      No one has replied

    • ?

      Could I request another example of using IFTTT to call triggercmd?

      • • A Former User
      3
      0
      Votes
      3
      Posts
      1.9k
      Views

      ?

      Thanks Russ. Will give it a go this weekend, but I think I've got it.

    • ?

      triggercmdagent : Depends: nodejs-legacy but it is not installable

      • • A Former User
      13
      0
      Votes
      13
      Posts
      4.8k
      Views

      RussR

      @superpan, you can see here I'm using wayland:

      TRIGGERcmd Ubuntu

    • StrahanS

      Voice words / parameters

      • • Strahan
      6
      0
      Votes
      6
      Posts
      3.6k
      Views

      RussR

      @parker-reed, yes actually, I did that a while ago. Sorry I never updated this thread.

      Here's the announcement:
      https://www.triggercmd.com/forum/topic/111/now-you-can-pass-parameters-to-your-alexa-commands