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.
The quickest way to test the module via Glitch.com:
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
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.
You can easily deploy the module on your own:
Clone this repository and install Node.js dependencies with:
npm install
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
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'
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.
Follow the instructions to install the COBI.bike Google Chrome Simulator and get familiar with the basics of module development on the COBI platform.
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.
- Spotify Player by José M. Pérez (MIT)
- Spotify-Conect-WS by Lawrence Holmes (MIT)
- Debugging Tips & Tricks
- Inspiration & Examples
- Interface Guidelines
- More DevKit Resources
- Other Tools & Resources
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