jukebot
May 14, 2019 ยท View on GitHub
Slack bot in Ruby that can control your Sonos system through the node-sonos-http-api. [https://github.com/jishi/node-sonos-http-api]. Interacts heavily with Spotify and TuneIn.
Built on the slack-ruby-bot framework. [https://github.com/slack-ruby/slack-ruby-bot]
INSTALLATION
Before You Start
-
Have a Slack Bot API Token[https://api.slack.com/bot-users]
-
Have a Spotify app username and passwork.[https://developer.spotify.com]
-
The computer where you run this app must be able to talk to your node-sonos-http-api. This means if you are running this app externally to your network you must have ports forwarded appropriately.
-
Have a username and password setup on your node-sonos-http-api.
-
Fork/Clone this repo.
Setting Environment Variables
- Copy
.env.sampleto.env - Enter values for all the variables.
- SLACK_API_TOKEN (api token for slack bot)
- RSPOTIFY_TOKEN (spotify app token)
- RSPOTIFY_PASSWORD (spotify app password)
- USERNAME (username for sonos api)
- PASSWORD (password for sonos api)
- NODE_SONOS_HTTP_API_URL (url for sonos api)
- SLACK_RUBY_BOT_ALIASES (any aliases you want jukebot to respond to)
Run It
ruby jukebot.rb
Run It With Docker
- Edit
docker-compose.ymlto set environment variables docker-compose build --pulldocker-compose up -d
View the logs:
docker-compose logs -f
Stop:
docker-compose down
Upgrade:
docker-compose downgit pulldocker-compose build --pulldocker-compose up -d
JukeBot controls your Sonos rooms

JukeBot finds music

JukeBot plays music

JukeBot likes the radio

JukeBot makes it louder

JukeBot pauses it

JukeBot moves it along

JukeBot tells you what's playing
