Trigger commands with a Tasker HTTP Post action



  • 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. :cartwheel_tone1: :cartwheel_tone5: :cartwheel_tone1: :cartwheel_tone5: :cartwheel_tone1: :cartwheel_tone5:

    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


Log in to reply