Home Tasker Tasker - Smart sleep profile

Tasker – Smart sleep profile

Triggering the night profile only when you need it!

How do you sleep at night?

The unwritten rule of the household of mine is to keep your devices quiet once you get to bed. This would be a very simple profile, however:

  • I work nights
  • I don’t work your regular Monday to Friday
  • I’m not home during my workdays
  • Occasionally I stay up till late and home to work on stuff like this article and the tutorial

Tasker – Smart sleep profile allows the above conditions to be included. I’m not sure how messed up is your sleep pattern and how much you need something like this. Sleep profile requires no plug-ins, or root, and shows you how to set this up for any circumstances. The profile can be improved with AutoNotification plug-in, however, for the sake of the beginners, I will keep it vanilla for now!

How does the Tasker sleep profile work?

tASKER SMART SLEEP PROFILE

I have a main profile to trigger silent times (or just disable WIFI and network up to your preferences). The profile is triggered by additional 2 profiles that are monitoring my location (HOME/NOTHOME) and whether I’m at work. Each day at 22:00 Tasker checks what’s going on and triggers the sleep profile in my project. At this stage, I get an hour warning message which allows me to cancel the sleep profile altogether, or postpone it.  While I’m away, Tasker skips the sleep profile when I’m at work, or gives me a notification only to enable the sleep now, cancel it for that night or,  set it in an hour.  If no action is taken the profile will won’t take any actions.

More detailed, written instructions are also available on pocketables.com so have a look if you want to read more, rather than watch the video.

Tasker sleep profile set up

Here is the profile description. Feel free to work with it or download the project file and edit it to your liking.

Warning At HomeSleep TimeWarning Outside
Profile: Warning At Home 
	Restore: no
	State: Variable Value [ %Home ~ 1 ]
	Time: 22:00
Enter: Enable Sleep 
	A1: Variable Set [ Name:%SleepTime To:23.00 
            Recurse Variables:Off Do Maths:Off Append:Off ] 
	A2: Profile Status [ Name:Sleep Time Set:On ] 
	A3: Notify [ Title:Sleep Profile Text:Profile will enable at 
            %SleepTime Icon:hd_ab_device_access_time Number:0 
            Permanent:Off Priority:3 Actions:(2) ]
Profile: Sleep Time 
	Restore: no
	Time: From %SleepTime Till 07:00
Enter: Sleep+ 
	A1: Flash [ Text:Sleep Long:On ] 
	A2: Notify Cancel [ Title:Sleep Profile Warn Not Exist:Off ] 
	A3: Notify [ Title:In Sleep Text:Your sleep mode is ON 
            Icon:hd_ab_aaa_ext_io Number:0 Permanent:Off 
            Priority:3 Actions:(1) ] 

Exit: Sleep- 
	A1: Flash [ Text:Wake up Long:On ] 
	A2: Perform Task [ Name:Cancel Priority:%priority 
            Parameter 1 (%par1): Parameter 2 (%par2): 
            Return Value Variable: Stop:Off ]
Profile: Warning Outside 
	Restore: no
	State: Variable Value [ %Home ~ 0 ]
	State: Variable Value [ %Work ~ 0 ]
	Time: 22:00
Enter: Enable Warning 
	A1: Notify [ Title:Sleep Profile 
            Text:Would you like to enable sleep? Icon:hd_aaa_ext_bulb 
            Number:0 Permanent:Off Priority:3 Actions:(3) ] 

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated in style with crypto-currency

New to Tasker?

Tasker Quick Start – Getting started with Tasker

0
From newb to not so newbie in 10 min

Best Tasker Projects

Tasker PC control – #Tutorial 3 (Apps menu)

0
Launch apps and websites from the mobile!

Tasker PC control – #Tutorial 2 (Volume Menu)

0
If you missed the part one, I strongly recommend you to check it out. It tells you all about the framework used, and you...

How to control your PC like a boss – Tasker Project

0
Control PC, and other devices from a custom notification system.

Bluetooth battery monitor – monitor any Bluetooth battery with Tasker

0
Measure the battery use of Bluetooth devices

The Minimal & Elegant giveaway WINNERS

0
Picking the winners live! Livestream and making a Tasker Winners project!

Essential Guides

Tasker: Seconds into DD:HH:MM:SS (dynamic)

0
It's time to.... ok it's a pun, but I will show you how to master time and convert seconds to DD:HH:MM:SS dynamically

4 ways to organise Tasker projects

0
Keep your Tasker tidy!

A better way to store Tasker credentials

0
The more clever way of managing credentials

Annoyed with dozens of AutoApps populating your app drawer? Here is a fix!

0
Clear your app drawer from the clutter in seconds

Putting AutoTools pie chart to a good use – SSID logger

0
Who wants a piece of the pie (chart)?