HomeTaskerTasker - 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 with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

New to Tasker?

Tasker Quick Start – Getting started with Tasker

0
From newb to not so newbie in 10 min

Best Tasker Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

How to wake on LAN computers and put it to sleep with Power Menu,...

0
How to Wake on LAN properly via Android, Alexa, Google Assistant and Web

7 awesome Bluetooth keyboard shortcuts for Android

0
7 unique Android shortcuts that you can add to any Bluetooth keyboard.

Smart overnight charging with Tasker

0
Still keeping your phone plugged in overnight? Try smarter overnight charging with this profile

One thing that Join app can’t do and how to fix it with Tasker

0
It's not possible to share the clipboard automatically between join accounts registered to 2 different emails. But you can fix this with tasker.

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)?