{"id":25,"date":"2018-02-18T11:51:36","date_gmt":"2018-02-18T10:51:36","guid":{"rendered":"http:\/\/tempdetheux.food.blog\/2018\/02\/18\/schedule-an-alarm-with-tasker-on-android-to-play-music-on-airplay-speakers\/"},"modified":"2019-07-19T17:02:05","modified_gmt":"2019-07-19T15:02:05","slug":"schedule-an-alarm-with-tasker-on-android-to-play-music-on-airplay-speakers","status":"publish","type":"post","link":"https:\/\/arnaud.detheux.org\/blog\/schedule-an-alarm-with-tasker-on-android-to-play-music-on-airplay-speakers\/","title":{"rendered":"Schedule an alarm with Tasker on Android to play music on AirPlay speaker(s)"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p>I\u2019ve had that ol\u2019 Nexus 7 Android tablet at home for about 5 years now, and it\u2019s 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\u2019m a nerd.<\/p>\n<p>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.<\/p>\n<figure class=\"wp-caption\"><img decoding=\"async\" data-width=\"4896\" data-height=\"3264\" src=\"https:\/\/cdn-images-1.medium.com\/max\/800\/0*7H-C2aBz8je5VL2L.\"><figcaption class=\"wp-caption-text\">A completely random stock photo, because why not. By <a href=\"https:\/\/unsplash.com\/@agkdesign?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noopener noreferrer\">Alex Knight<\/a> on&nbsp;<a href=\"https:\/\/unsplash.com?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noopener noreferrer\">Unsplash<\/a><\/figcaption><\/figure>\n<p>Let\u2019s start with the final result: in this scenario, I manually triggered the Tasker task (obviously, in real conditions, it\u2019s simply triggered by a specific time):<\/p>\n<p><iframe loading=\"lazy\" title=\"Nexus 7 Tasker home automation\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/ew5h6c2qp4w?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<hr>\n<h3>Step by step&nbsp;guide<\/h3>\n<ol>\n<li>Download Tasker (duh).<\/li>\n<li>Download AllStream. It allows you to stream for free for 5 mins, so at least for testing purposes that should be enough.<\/li>\n<li>Store music on your SDCard and make sure the Music app has indexed all of it by opening it for a little while.<\/li>\n<\/ol>\n<p>Open AllStream, and select which AirPlay speaker(s) you want to use. Pay attention to the volume slider if you don\u2019t want to be on the verge of having a heart attack the first time the music starts playing (yup, <a href=\"https:\/\/www.youtube.com\/watch?v=936YFY1jAUk\" target=\"_blank\" rel=\"noopener noreferrer\">been there<\/a>).<\/p>\n<figure class=\"wp-caption\"><img decoding=\"async\" data-width=\"1920\" data-height=\"1200\" src=\"https:\/\/cdn-images-1.medium.com\/max\/800\/1*dGhtYlsO0NgiwMlPy4dPCA.png\"><figcaption class=\"wp-caption-text\">Select the AirPlay&nbsp;speaker<\/figcaption><\/figure>\n<p>In Tasker, go to tasks and click the \u201c+\u201d to create a new task.<\/p>\n<figure class=\"wp-caption\"><img decoding=\"async\" data-width=\"1920\" data-height=\"1200\" src=\"https:\/\/cdn-images-1.medium.com\/max\/800\/1*WkKRNLe6_5BN60Mop1ZrOg.png\"><figcaption class=\"wp-caption-text\">Lots of tasks, mostly for Hue&nbsp;lamps<\/figcaption><\/figure>\n<p>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.<br \/>\nIn addition, I\u2019ve set the Music app to always shuffle music.<\/p>\n<figure class=\"wp-caption\"><img decoding=\"async\" data-width=\"1920\" data-height=\"1200\" src=\"https:\/\/cdn-images-1.medium.com\/max\/800\/1*lKKORcw25tR7P8nbIcTArQ.png\"><figcaption class=\"wp-caption-text\">Anatomy of the&nbsp;task<\/figcaption><\/figure>\n<p>Now, create a profile by tapping the \u201c+\u201d, and selecting date. Select \u201cweek day\u201d 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 \u201ctime\u201d. You\u2019ll now be able to select the time when the task should start playing. Lastly, I\u2019ve also added another profile to automatically stop the music at a certain time, but that\u2019s optional.<\/p>\n<p>And now, I have music starting to play in my office as I\u2019m about to enter it with my tea pot. I\u2019ll now need to see how I could have the daily NYTimes podcast to be automatically updated, and to start playing it instead of music.<\/p>\n<figure class=\"wp-caption\"><img decoding=\"async\" data-width=\"1920\" data-height=\"1200\" src=\"https:\/\/cdn-images-1.medium.com\/max\/800\/1*8B2GKJ8T1paP7qKbIQVTlQ.png\"><figcaption class=\"wp-caption-text\">Deleted.<\/figcaption><\/figure>\n<p>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\u2019m still away from home?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve had that ol\u2019 Nexus 7 Android tablet at home for about 5 years now, and it\u2019s 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\u2019m a nerd. Spring is just around the corner, but we might still&hellip;<\/p>\n<p class=\"read-more\"><a class=\"readmore-btn\" href=\"https:\/\/arnaud.detheux.org\/blog\/schedule-an-alarm-with-tasker-on-android-to-play-music-on-airplay-speakers\/\">Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_post_was_ever_published":false},"categories":[3],"tags":[10,11,35,54],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-nerdy-stuff","tag-alarm-clock","tag-android","tag-home-automation","tag-tasker"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":2,"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":464,"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions\/464"}],"wp:attachment":[{"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arnaud.detheux.org\/blog\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}