Automation app integration

This document is meant for advanced users.

Automation apps, such as, Tasker or Macrodroid are able to remotely control LastDo. For example, user could dismiss all the alarms, when entering car.

In LastDo Pro, users can also broadcast an intent, when alarm or challenge alarm is dismissed. Most automation apps can trigger tasks based on these broadcasts. In Tasker and Macrodroid this trigger is called "Intent Received". For example, user could setup a home automation system, where curtains of the house are opened, when user dismisses alarm in the morning.

Discussion about the further possibilities is welcome in our social media channels.

Funtionality exposed to automation apps

  • Add Alarm
  • Add Challenge Alarm (for deep sleepers)
  • Add Notification
  • Add Persistent Notification (visible in Notification Drawer until user remove it)
  • Dismiss Events (Alarm, Challenge Alarms, Notifications, Persistent Notifications)
  • Enable Events
  • Move Events to Trash
  • Restore Events
  • Create Note
  • Move Notes to Trash
  • Restore Notes
  • Create Card (Container for Notes)
  • Move Cards to Trash
  • Restore Cards
  • Create Timer
  • Delete Timer

Documentation about the exposed features

To communicate with LastDo, you have to broadcast an intent to LastDo from automation apps.

Matching permissions have to be enabled first in LastDo app Remote Access Settings. If you get toast message "BroadcastReceiver called without permission" permissions have not been set correctly.

In Tasker and MacroDroid the action is called "Send Intent".

Free version package com.lastdo.app

Pro version package com.lastdo.pro

Access key can be demanded from automation apps in order to reduce abuse from other apps.

Optional EXTRA Expected Values
ACCESS_KEY the same text as written in LastDo app Remote Access Settings

Event (Alarm, Challenge Alarm, Notification, Persistent Notification) actions

Class com.lastdo.broadcast.EventReceiver

Add Alarm

Action android.intent.action.SET_ALARM

Optional EXTRA Default Value Expected Values
android.intent.extra.alarm.HOUR 7
android.intent.extra.alarm.MINUTES 0
android.intent.extra.alarm.MESSAGE
DESCRIPTION
REPEAT_TYPE 0 (repeat on weekdays), 1 (repeat every X min), 2 (repeat every X hour), 3 (repeat every X day), 4 (repeat every X week), 5 (repeat every X month), 6 (repeat every X year)
REPEAT_FREQUENCY 1
android.intent.extra.alarm.DAYS IntegerArray with enabled day values. Monday 0,.., Sunday 6
REPEAT_FREQUENCY Alternative for REPEAT_TYPE 0. String with 0(disabled) and 1(enabled). For example, 1111100 sets alarm for each weekday but not weekend.
PROFILE Profile index 0,1,2,...

Add Challenge Alarm

Same extras and action as Add Alarm but in addition

EXTRA Value
EVENT_TYPE 1

Add Notification

Same extras and action as Add Alarm but in addition

EXTRA Value
EVENT_TYPE 2

Add Persistent Notification

EXTRA Value
EVENT_TYPE 3
Optional EXTRA Default Value Expected Values
android.intent.extra.alarm.MESSAGE
DESCRIPTION

Dismiss Events

action DISMISS_EVENTS

Optional EXTRA Expected Values
EVENT_TYPE 0(Alarm), 1(Challenge Alarm), 2(Notification), 3(Persistent Notification)
TAG Part of a tag. For example, "or" matches with tag "Work"
android.intent.extra.alarm.MESSAGE Exact topic of an event. Wild cards can be used to find more events. For example, "*en" matches topic "Oven"
MAX_FUTURE_SECONDS Max time in seconds to the event trigger time. For example, 3600 causes to dismiss only the events that are going to be triggered within the next hour.

Enable Events

action ENABLE_EVENTS

Same extras as Dismiss Events

Disable Events

action DISABLE_EVENTS

Same extras as Dismiss Events

Move Events to Trash

action MOVE_EVENTS_TO_TRASH

Same extras as Dismiss Events

Restore Events

action RESTORE_EVENTS

Same extras as Dismiss Events

Note actions

Class com.lastdo.broadcast.NoteReceiver

Create Note

action CREATE_NOTE

Optional EXTRA Default Value Expected Values
NAME Topic of the note being created. If "NAME" and "TEXT" are set, "NAME" is written in Bold.
TEXT
CARD_NAME Exact topic of a card, where the note is added. Wild cards can be used for wider search of cards. For example, "*ar*" matches Card "Example Card". If no match is found new card is created to root board.

Move Notes to Trash

action MOVE_NOTES_TO_TRASH

Optional EXTRA Default Value Expected Values
NAME Exact topic of a note. Wild cards can be used, for example, "*il*" matches "Milk".
TAG Part of tag name. For example, "*sonal" matches tag "Personal".
CARD_NAME Exact topic of a card, where note is located. Wild cards can be used, for example, "*ho*" matches card "Shop"

Restore Notes

action RESTORE_NOTES

Same extras as Move Notes to Trash

Create Card

action CREATE_CARD

Optional EXTRA Default Value Expected Values
CARD_NAME
SUB_BOARD_NAME Exact topic of a child board, where card is created. Wild cards can be used, for example, "*or*" matches "Work".

Move Cards to Trash

action MOVE_CARDS_TO_TRASH

Optional EXTRA Default Value Expected Values
CARD_NAME Exact topic of a card. Wild cards can be used, for example, "*or*" matches "Work".

Restore Cards

action RESTORE_CARDS

same extras as Move Cards to Trash

Timer actions

Class com.lastdo.broadcast.TimerReceiver

Create Timer

action CREATE_TIMER

Optional EXTRA Default Value Expected Values
android.intent.extra.alarm.HOUR 0
android.intent.extra.alarm.MINUTES 10
SECONDS 0
android.intent.extra.alarm.MESSAGE Topic of the timer

Delete Timers

action DELETE_TIMERS

Optional EXTRA Default Value Expected Values
android.intent.extra.alarm.MESSAGE Exact topic of a timer. Wild cards can be used, for example, "*is*" matches "Fish".