Automate Your Morning Routine

Automate Your Morning Routine

Alarms are annoying. They disturb your pleasant slumber, they're loud and obnoxious, and all they do is frustrate you – not a good way to start your day. We can make this better.

Requirements

  • Sleep as Android
  • Tasker
  • AutoInput
  • Spotify
  • DarkSky API

The Plan

First, improving the alarm situation. Sleep As Android is a great sleep tracking app which will detect when you are in a period of light sleep close to your alarm time and wake you up a bit beforehand. Sleep As Android also has native Tasker plugin support.

Our trigger will be turning off the alarm. Sorry, but the alarm portion is still needed. What we do after that, though, is up for consideration.

Personally, I want some music to wake me up in the morning. We're going to use Spotify for this. This action is the only kind of hacky solution in this. We'll use some intent calls to load up a particular playlist, then get AutoInput to press the "Shuffle Playlist" button on our behalf.

The other thing I want in the morning is the weather. I could look it up, but it's easier if my phone says it out loud to me. For that, we're going to use the DarkSky API to pull the current weather, and what today's going to look like. Finally, pipe all of that into Google's text-to-speech.

Where To Go From Here

The trigger of turning off your alarm, combined with a day of the week, is a great one to use. Some other ideas to consider include:

You can also look for calendar events when looking for conditions to trigger. If you always put vacation into your calendar, the absence of a vacation event would allow the event to occur.

You could also pick a playlist based on what the weather's like. Pick a playlist if it's going to be sunny, raining, or other conditions (Christmas day, perhaps).

The Code

Note: links with an asterisk are affiliate links