Giter Club home page Giter Club logo

spotify-desk-thing's Introduction

Screenshot of Spotify Desk Thing now playing UI

Spotify Desk Thing

A web-based clone of the Spotify Car Thing's now playing UI. Provides control via the Spotify API instead of Bluetooth (no need to pair devices and it can control most playback scenarios). Requires a Premium Spotify account.

Made for the Hyperpixel 4 Square Touch display, using a Raspberry Pi 3A.

Written in SolidJS using SolidStart. The core now playing screen and play/pause functionality is working, more functionality to be added later.

Setup

  1. Clone the repo onto your local computer, then install dependencies:
pnpm i
  1. Create an OAuth application in the Spotify Developer API portal: https://developer.spotify.com/dashboard
  2. Add these redirect URLs to the OAuth application config
http://localhost:3000/auth/callback
http://localhost:3000
  1. Make a copy of the .env.example file as .env, then enter the Spotify Client ID and secret in the env file fields. We will get the refresh token in a moment.

  2. Start the development version of the application

pnpm dev
  1. Navigate your browser to localhost:3000/auth/initialize to authenticate with Spotify. After granting access the refresh token will be displayed on screen. Copy this into the env file field for refresh token.

  2. Stop the previous development run of the app, then build and start the production version

pnpm build
pnpm start
  1. The app should now be fully functional. Navigate to localhost:3000 and play a song on your Spotify account (wait up to 15 seconds or refresh the page to see the now playing screen).

Running on Raspberry Pi

This application runs as a Node-based web app, which can be displayed in any browser. For my setup, I have a Raspberry PI 3A running DietPi configured to automatically launch Chromium with a tab opened to the location and port of the UI (could be localhost:3000).

Wish list


Credit: Other folks rooting and discovering the Spotify Car Thing is a web view running Chromium

spotify-desk-thing's People

Contributors

ansonlichtfuss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.