Skip to the stories
Page 6
The Fréson, back to the front page
Hacks

Alarm goes off, and Spotify starts playing by itself

A phone macro wakes the PC, and a Discord bot tells Spotify to play Liked Songs through the speakers.

By Yannic Fréson, DeveloperFiled from Belgium

Discord bot’s profile icon
Discord bot’s profile icon.

8 AM, the alarm clock wakes you up, you have to get out of bed but it’s so cozy under the sheets. To make my mornings more pleasant I built a way to have Spotify playing through my speakers automatically when my alarm goes off.

A macro on my phone sends a Wake-on-LAN packet to my PC after the alarm fires. A Discord bot that starts with the PC then sends several requests to the Spotify API to select the PC as the playback device and start playing my Liked Songs.

For fun I extended the bot with some extra commands, which you can see below.

In short

Waking up to your favourite songs from Spotify — right from the comfort of your bed. Hacking morning laziness.

The P command: an embed showing the title, release date, album and duration of the current song, with album art
The P command: an embed showing the title, release date, album and duration of the current song, with album art.
Collage of 9 ASCII lyrics artworks created by the bot
Collage of 9 ASCII lyrics artworks created by the bot.
Collage of the play, p and next commands
Collage of the play, p and next commands.

More from this edition