Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
/ Module-Spotify Public archive

Control the Spotify player remotely using the Spotify connect protocol. Part of a collection of Open Source modules for the COBI.Bike system.

License

Notifications You must be signed in to change notification settings

cobi-bike/Module-Spotify

Repository files navigation

Spotify DevKit module for COBI.bike

The DevKit module "Spotify" allows the user to control the Spotify player remotely using the Spotify connect protocol. It's part of a collection of Open Source modules for the COBI.bike system.

COBI.bike Spotify module

Quickstart: Interactive Demo

The quickest way to test the module via Glitch.com:

Open demo button

Glitch.com allows you to edit, host and fork Node.js applications for quick prototyping. Follow the installation steps 2 to 3 and copy the environment variables to the: .env file on Glitch.com

Overview

This module relies on the Spotify API to poll and control the current playback. To save bandwidth the polling is done on the backend and changes will be forwarded through Websockets.

Installation and Setup

You can easily deploy the module on your own:

Step 1: Clone repository

Clone this repository and install Node.js dependencies with:

npm install

Step 2: Create a Spotify app

Create a Spotify Developer account and register a new application to retrieve your api credentials.

You also have to register one or more callback urls in the Spotify Developer backend, for example: http://localhost:3000/callback

Step 3: Set environment variables

Set the environment variable CLIENT_ID, CLIENT_SECRET and HOST with your api credentials from spotify. HOST defines the url basename to the backend server, for example: HOST='http://localhost:3000'

Step 4: Run Node.js server

The module is accessible under localhost:3000 after starting the Node.js server with:

CLIENT_ID=... CLIENT_SECRET=... HOST=... node index.js

The settings menu can be accessed with the ?state=edit suffix.

Optional: Install COBI.bike DevKit Simulator

Follow the instructions to install the COBI.bike Google Chrome Simulator and get familiar with the basics of module development on the COBI platform.


Credits

This module uses Open Source components. You can find the source code of their open source projects along with license information below. We acknowledge and are grateful to these developers for their contributions to open source.

Useful DevKit links

Contributing to this project

Anyone and everyone is welcome to contribute to this project, the DevKit Simulator and the DevKit UI Components. Please take a moment to review the guidelines for contributing.

Copyright © 2018 COBI.bike GmbH

About

Control the Spotify player remotely using the Spotify connect protocol. Part of a collection of Open Source modules for the COBI.Bike system.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •