Skip to content

Installation

Henrik Tilly edited this page May 2, 2016 · 6 revisions

Installation

In order to get the bot up and running you need to do the following.

##Pre-requisit:

1: #Slack-group with admin rights

2: A server / machine that can run node.js

3: A working Sonos player configured with Spotify

3a: You need to know the IP of your Sonos player.

#Slack

Create a bot in #Slack.

You need to give it a name, and write down the API Token. You will need this in your setting file later.

Hit "Save Integration" and you are done in #Slack.

Optional you can give the bot some nice namne, icon etc.

Node.js - Zenmusic!

This guide assume you have git, node.js and NPM installed, and running linux =)

Change to "/opt"

cd /opt

Clone this repository

git clone https://github.com/htilly/zenmusic.git

Enter the new directory, zenmusic

cd zenmusic

Type

npm install

Almost there... some simple configuration first.

config.json

Edit config.json with your favorit text editor.

Replace:

_ADMIN-SLACK-CHANNEL_ with the #slack channel you want the bot to respond to admin commands.

_SLACK-CHANNEL_ with the #slack channel you want the bot to be a DJ in =)

_IPADDRESS-TO-SONOS_ with the (static) IP of you sonos player / controller.

_SLACK-TOKEN-FOR-BOT_ with the token you got for the bot in "Slack.

And last thing... start the bot!

node index.js

You should see something like:

[Sat Apr 30 2016 21:44:10 GMT+0200 (CEST)] INFO Connecting... Welcome to Slack. You are @zenmusicbot of Schibsted Media Group You are in: #music As well as: music-admin

Clone this wiki locally