Giter Site home page Giter Site logo

spotifyd-mqtt's Introduction

HTTP Spotify Client

Introduction

A simple client to convert a spotify ID into a series of MQTT topics.

It was developed to replace Shairport-sync with Spotifyd, publishing to a subset of the Shairport-sync topics.

Topics

Topic name Description
play_end Current track has stopped playing
play_resume Current track is resumed
play_start Current track is starting
track_id Track id
title Track title
artist Track artist
album Track album

Generally, the order of events will be publication on title, artist and album. Then one of the control signals, play_end, play_resume or play_start will be sent --.

Environment variables

To register with Spotify, login and visit: https://developer.spotify.com

Variable Description Default
SPOTIFY_CLIENT_ID Your Spotify application ID -
SPOTIFY_CLIENT_SECRET Your client secret, from the Spotify dashboard -
PORT The port to listen on 9001
MQTT_BROKER Broker address mqtt://hifi-office.local
BASE_MQTT_PATH Base path shairport-sync/rpih1/
LOG_LEVEL Log level INFO

Building

make setup && make build

Installing

The service is designed to run as a user, not root. Note the deliberate lack of sudo here.

make install

When your default editor opens, provide values for your Spotify client id and secret. You may also override the default port, broker address and path.

For example:

[Service]
Environment=SPOTIFY_CLIENT_ID=redacted_id
Environment=SPOTIFY_CLIENT_SECRET=redacted_secret

Then run make start

Subsequently, run make restart on update.

spotifyd-mqtt's People

Contributors

notquiterussell avatar

Watchers

 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.