Glance and Tasker

Tasker is an awesome Android automation tool available from the play store. Most of the Glance Tasker integration requires the in app Glance Premium purchase

Glance Tasker mode

There is a face for Glance which is solely for Tasker – shows a watch and three lines of Tasker ready text.

  • To populate the face use the Intent uk.co.finebyte.pebbleglance.TASKERSEND with a String Extra in the format msg:ToGoOnLine1:Line2:Line3
  • When the face initialises it sends the Intent uk.co.finebyte.pebbleglance.TASKERINIT
  • When the face stops it sends the Intent uk.co.finebyte.pebbleglance.TASKERSTOP
  • When a button is pressed it sends the Intent uk.co.finebyte.pebbleglance.TASKERKEY with the Extra key sent to TASKERTOP, TASKERMID and TASKERBOT as you would expect
  • When a button is long pressed it sends the Intent uk.co.finebyte.pebbleglance.TASKERKEY with the Extra “key” sent to TASKERLTOP, TASKERLMID and TASKERLBOT as you would expect
  • Use uk.co.finebyte.pebbleglance.TASKERVIBE to make the pebble vibrate
  • Christopher Stein wrote some notes on howto use this feature here

Glance Variables set from Tasker

Some variables in Glance can be set from Tasker. Some are be shown on the stock Glance watch faces as alternates to data Glance sources from your phone:

  • Use uk.co.finebyte.pebbleglance.TASKERMSGC to set the message count on the SMS counter with an extra VALUE set to the number you want, e.g. setting the Extra field in tasker to VALUE:77 sets the message count to 77. This feature requires the Use Intent for SMS Setting to be On in the Glance Android settings.
  • Use uk.co.finebyte.pebbleglance.TASKEREMAILC to set the message count on the email counter with an extra VALUE set to the number you want, e.g. setting the Extra field in tasker to Value:88 sets the mail count to 88. This feature rRequires the email source to be set to Intent in the Glance Android Settings.
  • When Glance thinks it needs to refresh the message count it sends the Intent uk.co.finebyte.pebbleglance.TASKERMSGCINIT

Some variables are available for display on a custom Glance layout:

  • Use the Intent uk.co.finebyte.pebbleglance.TASKERSEND with a String Extra.
  • (Note String Extras are sent in the format key:value)
  • key=msg, value=Tasker1:Tasker2:Tasker3
    • Will set the Field Content Tasker1, Tasker2 and Tasker3
    • e.g. msg:Hello:Halo:Hollow would set Tasker 1=Hello, Tasker 2=Hailo, Tasker 3=Hollow
  • key=var, value=name:field value
    • Will set the Field variable TSK_name to field value
    • e.g. var:SHAPE:Circle would set TSK_SHAPE to Circle which could be added to a Label Field in the editor as #TSK_SHAPE

Controlling Glance from Tasker

  • Launch Glance with intent uk.co.finebyte.pebbleglance.STARTGL
  • Load a Glance Layout with intent uk.co.finebyte.pebbleglance.TASKERSEND with a String Extra key of load and a value of the Layout name
    • e.g. load:Simple Weather would load the Simple Weather example layout
    • Note: Glance will load the first layout of a name in the layout list.

Glance to Tasker Button Mappings

  • In the Glance Customise menu buttons can be mapped to the special mapping “TaserBtn”
  • When a button is pressed it sends the Intent uk.co.finebyte.pebbleglance.TASKERKEY with the Extra key sent to TASKERBTN1-4 (Top, Long Top, Bottom, Long Bottom)

 

Glance Intent Notifications

  • When Glance thinks it needs to refresh the message count it sends the Intent uk.co.finebyte.pebbleglance.TASKERMSGCINIT
  • When Glance Tasker mode initialises it sends the Intent uk.co.finebyte.pebbleglance.TASKERINIT
  • When Glance Tasker mode stops it sends the Intent uk.co.finebyte.pebbleglance.TASKERSTOP
  • When Glance loads a new layout is sends the intent uk.co.finebyte.pebbleglance.LOADLAYOUT with a string intent NAME with the layout name

Tasker Help

  • See http://tasker.dinglisch.net/userguide/en/intents.html
  • Intents are received in Profile->Event->System->Intent Received
    • String extras that are received are set as variables, e.g. the layout name received in LOADLAYOUT will be a variable called %name
  • Intent are sent in Task->Misc->Send Intent
    • Extras are sent in the format key:value