Schedule an alarm with Tasker on Android to play music on AirPlay speaker(s)

Schedule an alarm with Tasker on Android to play music on AirPlay speaker(s)

I’ve had that ol’ Nexus 7 Android tablet at home for about 5 years now, and it’s the center of my home automation setup. It controls the lights, the music, the alarm system, monitors the air quality, the smoke detector etc. Yes, I’m a nerd.

Spring is just around the corner, but we might still sometimes have a bit of difficulty to get out of bed. More specifically, I wanted to find a way to automatically play music or a new podcast episode every morning when I was getting ready. This could be a neat addition after the Philipps Hue light bulbs already slowly woke me up.

A completely random stock photo, because why not. By Alex Knight on Unsplash

Let’s start with the final result: in this scenario, I manually triggered the Tasker task (obviously, in real conditions, it’s simply triggered by a specific time):


Step by step guide

  1. Download Tasker (duh).
  2. Download AllStream. It allows you to stream for free for 5 mins, so at least for testing purposes that should be enough.
  3. Store music on your SDCard and make sure the Music app has indexed all of it by opening it for a little while.

Open AllStream, and select which AirPlay speaker(s) you want to use. Pay attention to the volume slider if you don’t want to be on the verge of having a heart attack the first time the music starts playing (yup, been there).

Select the AirPlay speaker

In Tasker, go to tasks and click the “+” to create a new task.

Lots of tasks, mostly for Hue lamps

The task essentially needs to open your music app (I simply used the native Music one), wait 2 seconds, and then simulate the press of the play button.
In addition, I’ve set the Music app to always shuffle music.

Anatomy of the task

Now, create a profile by tapping the “+”, and selecting date. Select “week day” and tap on the days when the task should run. After that, long press the day(s) of the week on the left hand side of the screen and select “time”. You’ll now be able to select the time when the task should start playing. Lastly, I’ve also added another profile to automatically stop the music at a certain time, but that’s optional.

And now, I have music starting to play in my office as I’m about to enter it with my tea pot. I’ll now need to see how I could have the daily NYTimes podcast to be automatically updated, and to start playing it instead of music.

Deleted.

Next step: since my Anova sous vide cooking machine can connect to Bluetooth to my tablet, and I can access that tablet from anywhere in the world, could I start the cooking process while I’m still away from home?

Leave a Reply