Skip to content
lancehilliard edited this page Jul 24, 2021 · 6 revisions

BusyLight can react to work on your mobile device. The trick is to automatically detect your "BusyLight should illuminate" scenario and periodically publish an activity message to the shared Messaging queue, which will cause BusyLight to illuminate your BlinkStick.

iOS

Have you authored an iOS automation similar to the Android solution that's outlined below? Did you do it with an automation app that is generally available in the App Store? Let us know!

Android

You can use Tasker to automatically signal Android work to your BusyLight.

Here's an example Tasker Profile which triggers when you're on a call, with a task that will every few seconds use the cloudamqp.com REST API to publish an activity message to the shared message queue. Root is not required.

Profile

Create a Profile which triggers when you like. Here's one that triggers when three States combine:

  • you're in a phone call (the "Phone" app is showing a persistent notification)
  • you're at home (your home wifi is connected)
  • the battery level is within a set threshold (perhaps you will omit this State from your Profile)

        Tasker Profile - Overview

Task

This task publishes an activity message every few seconds until the calling profile is no longer active.

Overview

Note the Goto action at the end - the task repeats all of its actions until you end your call.

        Tasker Task - Overview

Details: HTTP Request

  • URL takes the format (no line break):
    • https://<username>:<password>@<host>/api/exchanges/<vhost>/amq.default/publish
      • these values are provided by your AMQP provider (see Messaging)
      • adapting the sample AMQP URL from Messaging, our Tasker task's URL would look like:
        • https://leuwnjrc:7r5MKuk2_IYsDLDQgUi8ZeVHOopflLPe@canary.rmq.cloudamqp.com/api/exchanges/leuwnjrc/amq.default/publish
  • Body takes the format (no line break):
    • {"vhost":"<vhost>","name":"amq.default","properties":{"delivery_mode":2,"type":"microphone","headers":{}},"routing_key":"BusyLight","delivery_mode":"2","payload":"","payload_encoding":"string"}
      • adapting the sample, our Tasker task's Body would look like:
        • {"vhost":"leuwnjrc","name":"amq.default","properties":{"delivery_mode":2,"type":"microphone","headers":{}},"routing_key":"BusyLight","delivery_mode":"2","payload":"","payload_encoding":"string"}

        Tasker Task - HTTP Request Details