Tasker walkthroughs
1. 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 package, set com.urbandroid.sleep
-
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!
2. Integrate Sleep with hueManic
You can use any of the Sleep as Android’s events in Tasker to start a service com.urbandroid.hue/.ProgramService with following extras:
-
EXTRA_START
-
EXTRA_PROGRAM
-
EXTRA_STOP
EXTRA_PROGRAM needs to have one of the values:
-
DISCO, FIREPLACE, STORM, FIREWORKS, SEA, JUNGLE, TIBET, AURORA, SUNSET, RAINBOW
Example: See video tutorial here.
2.1. The actual walkthrough
Tasker > Task > Add task > Choose a name > Plus button > System > Send intent
-
Package: com.urbandroid.hue
-
Class: com.urbandroid.hue.ProgramService
-
Extra: EXTRA_START:start
-
Extra: EXTRA_PROGRAM:DISCO
-
Target: Service
then
Tasker > Profile > Plus button > Event > Plugin > Sleep > Configuration > Alarm started > Back > Back > Choose your task
Now make sure Tasker is enabled, hueManic installed and the Disco program will start on your alarm.
Adapt the specific conditions to your needs.
3. 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 )
-
Tasker → Profile → Plus button → Event → Plugin → Sleep → Configuration → Alarm Started
-
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.
-
Open Mi Band tools and set an alert for Tasker application and filter with the title used earlier, ‘AlarmStarted’ .
Many thanks to Pratik Jain!
4. 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
-
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)