What is Tasker / Automate?
Tasker is a total automatization tool for Android. You can catch events that happen on your phone (e.g. an alarm has been dismissed) and trigger actions (e.g. send sms that you’re awake to someone). You can choose from many events and actions, but to add them for 3rd party apps, there has to be a plugin that connects the app to Tasker.
Sleep as Android has a Tasker plugin integrated in itself, for free!
Automate is a very similar app that uses the same pipeline as Tasker, so we support it too! Automate is different in that you set up your rules using graphical diagrams.
You can use any of these events from Sleep as Android and link them to any actions on your phone:
- Sleep tracking started
- Sleep tracking stopped
- Sleep tracking paused
- Sleep tracking resumed
- Snooze (alarm)
- the user has snoozed a ringing alarm
- the bedtime has just occured
- Alarm started
- Dismiss (alarm)
- the user has dismissed a ringing alarm AND solved the CAPTCHA if present
- this event will also be fired when alarm has been dismissed while snoozed
- Snooze canceled
- alarm has been dismissed while snoozed
- the REM phase has been detected. More on REM phase detection here.
- Sleep as Android has detected snoring and executed an anti-snoring action (vibration or tongue click or both). Anti-snoring has to be active for this event to work.
- Smart period
- fires 45 minutes before smart period starts (to gather data for the smart period)
You can take any events given by your phone and trigger Sleep actions with them. Sleep provides these actions:
- Start sleep tracking
- Start sleep tracking: Save battery (no graph, just time)
- Stop Sleep tracking
- Snooze (alarm)
- Dismiss (alarm)
- Play lullaby
- Stop lullaby
- Sleep tracking: ideal sleep time
- to create a new alarm for an ideal sleep time (with alarm default settings) and start sleep tracking immediately
You can also add new alarm with System > Set Alarm action.
Create an “Add alarm” widget with Tasker
Sleep as Android does not offer a widget to add an alarm directly.
How to create one in Tasker?
- Fire up Tasker, go to Tasks tab and add a new task (+) named Add alarm
- Tap + to add an action, select System > Send Intent
- In action, insert com.urbandroid.sleep.alarmclock.SetAlarm
- As target, select Activity
- Go back to confirm
- Add an icon in the lower right corner
- Long press on your desktop and add a Shortcut > Task shortcut and select Add alarm (your new task)
- Don’t forget to enable Tasker!
Integrate Sleep with hueManic
DISCO, FIREPLACE, STORM, FIREWORKS, SEA, JUNGLE, TIBET, AURORA, SUNSET, RAINBOW
Tasker > Task > Add task > Choose a name > Plus button > System > Send intent
MiBand : Get notification when alarm starts
How to have your Mi Band notify you with LED / Vibrations when your alarm ( Sleep as Android ) goes off.. ( Using Mi Band Tools )
1. Create a tasker profile -> Event -> Sleep -> Configuration -> Alarm Started.
2. Create a task for this event.. Notify -> Select any title like ‘AlarmStarted’ which will send a notification in your status bar when alarm is triggered.
3. Open Mi Band tools and set an alert for Tasker application and filter with the title used earlier, ‘AlarmStarted’ .
Many thanks to Pratik Jain!
Start sleep tracking at a fixed time automatically every day
Sleep as Android does not have automatic sleep tracking start, but you can easily implement that yourself using Tasker!
- Start Tasker and create a new profile using the plus button on Profiles tab > Time > Set From and To time to the same time (e.g. 10PM). Hit back.
- Select New task and give it a name. Add an action using the plus button > Plugin > Sleep > tap on the pencil button > select Start sleep tracking.
- Hit back three times. Make sure to activate Tasker (long press in the upper left corner > Enable)
Start sleep tracking with Automate
Download the flow here: http://llamalab.com/automate/community/flows/13614
Thanks to Percherie!