• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Trigger commands with a Tasker HTTP Post action

Instructions
2
3
9.4k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    Russ
    last edited by Russ Sep 4, 2017, 2:15 PM Jun 3, 2017, 9:52 PM

    Tasker is an application for Android which performs tasks (sets of actions) based on contexts (application, time, date, location, event, gesture) in user-defined profiles or in clickable or timer home screen widgets.

    Now you can create a tasker action that runs a command on your computer via TRIGGERcmd. Here's how:

    In Tasker, under the Tasks tab, tap the + button to add a Task, then give it a name like "Playlist on Family"
    Tap the + button in the Task Edit screen to add an Action to your task.
    Select "Net", then "HTTP Post", then configure them as these screenshots show.

    Server:Port: https://www.triggercmd.com
    Path: api/Tasker?trigger=Calculator&computer=Downstairs
    Data/File: token=(your token from the Instructions page)
    Content Type: application/x-www-form-urlencoded

    Make sure you don't have a carriage return between "token=" and your token from the Instructions page. I made that mistake and it took a while to figure out what I'd done wrong.

    I emailed my token to myself so I could copy/paste it on my Android.

    Tasker lets you export an action as an Android app, so now I can tap an icon on my Android desktop that opens my garage. That's pretty sweet. 🤸🏻 🤸🏿 🤸🏻 🤸🏿 🤸🏻 🤸🏿

    EDIT 9/4/17: Now you can add &params=(your command parameters) to your Path or your Data/File field to pass Tasker variables as command parameters. You have to enable parameters on your commands first.

    TaskerSettings

    ContentType

    Russell VanderMey

    1 Reply Last reply Reply Quote 0
    • G
      Grant Fitz
      last edited by Grant Fitz Jul 25, 2020, 9:34 PM Jul 25, 2020, 9:29 PM

      Here's a reference to the old UI using an HTTP Post
      Server:Port: https://www.triggercmd.com
      Path: api/Tasker?trigger=Louder&computer=Desktop
      Data/File: token=123xyz
      Content Type: application/x-www-form-urlencoded

      The new API has these fields. Can you map the above parms to the below parms.
      Method: Post
      URL:
      Headers:
      Query Parameters:
      Body:
      File to Send:

      R 1 Reply Last reply Jul 26, 2020, 2:12 AM Reply Quote 0
      • R
        Russ @Grant Fitz
        last edited by Jul 26, 2020, 2:12 AM

        @Grant-Fitz, this should work with the new HTTP Request task type:

        Screenshot_2020-07-25-22-09-48.png

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • R Russ referenced this topic on Jan 5, 2022, 10:39 PM
        • R Russ referenced this topic on Jan 5, 2022, 10:40 PM
        • R Russ referenced this topic on Nov 27, 2022, 11:06 PM
        • First post
          Last post