Using Pushover's Tasker Plugin - Variables and Demo
Tasker Variables
Pushover for Android (as of version 2.1.2) includes a Tasker action plugin that can be used with the 3rd party Tasker app (sold separately) to perform actions whenever a Pushover notification is received. This plugin is built into the Pushover app and there is nothing extra to install (aside from Tasker).
Pushover exports a number of variables to Tasker which can be used in tasks, such as the content of the message, its URL, etc. These variables are:
%pushovertitle
- The message title (may be blank)%pushovermessage
- The message body%pushoverapplication
- The name of the application that sent the notification%pushoverurl
- The supplementary URL (may be blank)%pushoverurltitle
- The supplementary URL title (may be blank)%pushoverpriority
- The message priority (-1, 0, 1, 2)
Tasker Demo - Disabling WiFi from a Pushover Notification
To demonstrate the kind of functionality that Pushover and Tasker can provide, we’ll create a task that responds to a Pushover notification sent from our “WiFi” application (so other Pushover applications don’t trigger it) with a message “disable wifi”, and then actually disable WiFi on the device.
First, open Tasker and create a new profile.
Choose “Event”, then “Plugin”.
With the Pushover Android app installed, you should see its plugin listed here:
Now we’ll create some criteria for matching notifications. We’ll enter “disable wifi” as the message name to match (matching for all fields except “priority” is case-insensitive and matches any part of the string) and require the Application Name to match “wifi”.
After entering the criteria and tapping on the checkmark icon, Tasker will take you back to the home screen and prompt you for a task name. We’ll create one called “disable wifi”.
Now we’ll add an action to disable the system WiFi. Choose “Net” from the action list, and then “WiFi”. The default will be to turn it off.
Now we’ll add a Popup dialog just for some confirmation. Add another action and choose “Alert”, then “Popup”.
Here we’ll create a title with “Pushover - %pushoverapplication" and a text of "%pushovermessage”. These two variables starting with % will be dynamically updated with the values from the Pushover notification you’re working with.
Now we’ll send a new notification from the Pushover dashboard as our WiFi application, with the message text “disable wifi”. As soon as the notification comes in, Pushover hands it off to Tasker, Tasker disables wifi, and shows our popup:
For more possibilities with Tasker, check out the Tasker User Forum.