Go to file
2023-10-01 02:54:59 +02:00
cmd remove support for oauth. 2023-09-26 01:16:01 +02:00
frontend added initial frontend 2023-10-01 02:54:59 +02:00
internal remove support for oauth. 2023-09-26 01:16:01 +02:00
.dockerignore initial commit 2023-08-25 22:44:44 +02:00
.gitignore initial commit 2023-08-25 22:44:44 +02:00
docker-compose.yml fixed timezone in container 2023-09-13 16:28:19 +02:00
Dockerfile fixed timezone in container 2023-09-13 16:28:19 +02:00
go.mod remove support for oauth. 2023-09-26 01:16:01 +02:00
go.sum remove support for oauth. 2023-09-26 01:16:01 +02:00
Makefile added docker build to makefile 2023-08-26 02:20:40 +02:00
README.md added README 2023-08-26 23:54:17 +02:00

Morning alarm

A simple alarm clock that plays a random song from a playlist at a given time on you Spotify device of choice. Basicly a cronjob for Spotify.

Setup

  1. Create a new Spotify app at https://developer.spotify.com/dashboard
  2. Give it a name and description
  3. The redirect URI should be a valid URL as it will be used as a callback. (Only needs to accsessable from your local machine). The redirect URI should be the same as in the config.
  4. Copy the client ID and client secret and paste them in the config.
  5. Set the device ID to the device you want to play the music on. You can keep this empty if you don't know the device ID. You can retrieve it later via the API. (GET /api/device)
  6. Get the playlist ID of the playlist you want to play. You can get the playlist ID by right clicking on the playlist in the Spotify app and selecting "Share" and then "Copy link to playlist". Then grab the id from the URL (The part behind /playlist/<id> ) . e.g. 0MJBni0UzdnML1amikx0Rc. Paste the playlist ID in the config.
  7. Set the redirect URI in the config.
  8. Start the app and look in the console for the URL to authorize the app. Open the URL in your browser and authorize the app.
  9. If you have not already set the device ID, you can do so now. (GET /api/device). Don't forget to restart with the new device ID.
  10. Test the app by calling the API (POST /api/trigger). This should play a random song from the playlist on the device you selected.