HTTP trigger support (Send battery % from Android device)

Here’s a working example for you:

Explanation

Starting with the SharpTools Rule, in the Triggers section we add an Event → HTTP Trigger and optionally define the parameter name battery within the HTTP Trigger in advance.

Then in the rule Flow, we add an Action → Set Variable where we select a target SharpTools variable to set the value to, then set the source as Variable → Context Variable → Event → HTTP Event → Parameters → Battery.

If you didn’t define the battery parameter in the HTTP Trigger, you can select the HTTP Event → Parameters → Custom Parameter option and type `battery here.


On the Tasker side, we’re using a Net → HTTP Request action with the GET method. Our URL is copied from the SharpTools HTTP Trigger and the Query Parameters are in the weird Tasker format:

Key:value

So for our case we want the system variable %BATT to come across in the battery parameter:

battery:%BATT
1 Like