Trigger Tasker and Automate from a counter

Counter speaks Android intents in both directions. Make a counter fire a broadcast intent that Tasker, Automate, or MacroDroid can catch, or let those apps control your counters. No code required.

Guide for the Counter app on Android. Works with Tasker, Automate, and MacroDroid.

Two ways to connect

Direction A: a counter triggers Tasker

  1. In Counter, open the counter and add a rule under What it does on its own. Pick an event (Reaches the value, Changes, or a time-based event like "Every day at").
  2. Choose the Broadcast Intent action. Counter sends a broadcast with the action com.zipangulu.counter.ACTION_COUNTER_EVENT (you can change it), carrying the counter data plus any custom extras you add.
  3. In Tasker, create a Profile > Event > System > Intent Received and set the action to the same string.
  4. Attach a Task that does what you want: toggle Bluetooth, send an SMS, launch an app, or call a web service.

The broadcast carries these extras: counter_id, counter_title, counter_value, counter_step, counter_min, counter_max and timestamp. Custom extras accept the variables ${counter.id}, ${counter.title} and ${counter.value}.

Direction B: Tasker controls a counter

  1. In Counter, open Settings > External integration and turn on External commands. Then open Security token and copy the token: it is required by default.
  2. In Tasker, use the Send Intent action with the action and extras below.
Action: com.zipangulu.counter.ACTION_EXTERNAL_COMMAND
Extras:
  counter_id (long)   - required
  command (string)    - required: increment, decrement, reset, set_value
  value (long)        - optional
  auth_token (string) - if authentication is enabled

For example, in Tasker's Send Intent action set the extras counter_id:1L, command:increment and auth_token:your-token to bump counter 1 by its step. The L matters: counter_id and value are long numbers, and Tasker sends a plain 1 as an int, which Counter ignores.

Works with Automate and MacroDroid too

The same broadcast intents and commands work with Automate and MacroDroid. Use their "intent received" and "send intent" blocks in place of Tasker's.

Note: Direction B needs External commands enabled. The security token is required unless you turn it off in the Security token dialog: include it in every intent you send.

Things you can build

For the full intent format and command reference, see the FAQ.

Start automating your counters

Free download. No account required. Unlimited counters.

Get it on Google Play