Giter Club home page Giter Club logo

zenmusic's People

Contributors

bencevans avatar codebynumbers avatar dependabot[bot] avatar emillindau avatar fixdocker avatar htilly avatar jgoulah avatar jimmyjames avatar lachlan-harris avatar madmikeyb avatar sineqa avatar snyk-bot avatar truncj avatar vibol avatar warrenatatlas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zenmusic's Issues

search, add, commands causes error

Hello i know this issue has been raised before tried the fixes but to no avail, will appreciate some help on this.

Did the following based on previous search
Added client and token ID in config.json
Added apikey in config.json
checked the market, spotify and market both EU

info: term: search
info: _search search,1
/opt/zenmusic/node_modules/urllib-sync/index.js:40
    throw res.error;
    ^

Error: spawnSync /usr/bin/node ETIMEDOUT
    at _errnoException (util.js:1022:11)
    at Object.spawnSync (child_process.js:579:20)
    at Object.request (/opt/zenmusic/node_modules/urllib-sync/index.js:33:16)
    at _getAccessToken (/opt/zenmusic/spotify.js:21:35)
    at Object.searchSpotify (/opt/zenmusic/spotify.js:37:31)
    at _search (/opt/zenmusic/index.js:899:33)
    at processInput (/opt/zenmusic/index.js:205:13)
    at RTMClient.slack.on (/opt/zenmusic/index.js:162:5)
    at RTMClient.emit (/opt/zenmusic/node_modules/eventemitter3/index.js:116:35)
    at RTMClient._handleWsMessageViaEventHandler (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:482:10)
    at RTMClient.handleWsMessage (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:436:10)
    at WebSocket.wrapper (/opt/zenmusic/node_modules/lodash/lodash.js:4935:19)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at Receiver.ontext (/opt/zenmusic/node_modules/ws/lib/WebSocket.js:841:10)
    at /opt/zenmusic/node_modules/ws/lib/Receiver.js:536:18

HTTP 405 Issue?

Hey there!

Followed all the instructions. Setup a heroku server and port forward to our Sonos.

Slack bot working A OK, but I have issues connecting to Sonos...see error below...any ideas?

2016-07-29T06:37:45.915581+00:00 app[web.1]: Error: HTTP response code 405 for "urn:schemas-upnp-org:service:RenderingControl:1#GetVolume"
2016-07-29T06:37:45.915601+00:00 app[web.1]: at Request._callback (/app/node_modules/sonos/lib/sonos.js:97:23)
2016-07-29T06:37:45.915602+00:00 app[web.1]: at Request.self.callback (/app/node_modules/sonos/node_modules/request/request.js:198:22)
2016-07-29T06:37:45.915603+00:00 app[web.1]: at emitTwo (events.js:106:13)
2016-07-29T06:37:45.915604+00:00 app[web.1]: at Request.emit (events.js:191:7)
2016-07-29T06:37:45.915604+00:00 app[web.1]: at Request. (/app/node_modules/sonos/node_modules/request/request.js:1035:10)
2016-07-29T06:37:45.915605+00:00 app[web.1]: at emitOne (events.js:101:20)
2016-07-29T06:37:45.915606+00:00 app[web.1]: at Request.emit (events.js:188:7)
2016-07-29T06:37:45.915609+00:00 app[web.1]: at IncomingMessage. (/app/node_modules/sonos/node_modules/request/request.js:962:12)
2016-07-29T06:37:45.915610+00:00 app[web.1]: at emitNone (events.js:91:20)
2016-07-29T06:37:45.915611+00:00 app[web.1]: at IncomingMessage.emit (events.js:185:7)
2016-07-29T06:37:45.915612+00:00 app[web.1]: at endReadableNT (_stream_readable.js:975:12)
2016-07-29T06:37:45.915612+00:00 app[web.1]: at _combinedTickCallback (internal/process/next_tick.js:74:11)
2016-07-29T06:37:45.915613+00:00 app[web.1]: at process._tickCallback (internal/process/next_tick.js:98:9) undefined
2016-07-29T06:38:02.822289+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-07-29T06:38:02.822380+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-07-29T06:38:02.949865+00:00 heroku[web.1]: State changed from starting to crashed
2016-07-29T06:38:02.933699+00:00 heroku[web.1]: Process exited with status 137

index.js says "Online!" but says nothing else

hi, love this script! i am trying to set up a new instance. when i run the script i get this in response and nothing else:

warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.
06-18 14:35:34:634   Online!

any tips would be appreciated!

Admin Functionality

Hi there,

I have this setup so the admin and regular functions are in the same channel so I'm not getting access to the admin functions. Do you recommend just removing the conditional for if (channel.name !== adminChannel) to add these functions? Or am I missing something?

Thanks! My coworkers love that we have this setup.

Error parsing DIDTL result

Zenmusic seemed to be working for me a few days ago, just today i recived this error when attempting to list the current queue:

Starting...
Received: message #sonos @micky 1507128096.000512 "current"
term current
{ position: NaN,
  duration: NaN,
  uri: 'x-rincon:RINCON_B8E937D3DD6001400' }
Received: message #sonos @micky 1507128104.000015 "list"
term list
Error: Cannot parse DIDTL result
    at /home/micky/zen/zenmusic/node_modules/sonos/lib/sonos.js:1143:25
    at Parser.<anonymous> (/home/micky/zen/zenmusic/node_modules/xml2js/lib/xml2js.js:489:18)
    at emitOne (events.js:115:13)
    at Parser.emit (events.js:210:7)
    at SAXParser.onclosetag (/home/micky/zen/zenmusic/node_modules/xml2js/lib/xml2js.js:447:26)
    at emit (/home/micky/zen/zenmusic/node_modules/sax/lib/sax.js:624:35)
    at emitNode (/home/micky/zen/zenmusic/node_modules/sax/lib/sax.js:629:5)
    at closeTag (/home/micky/zen/zenmusic/node_modules/sax/lib/sax.js:889:7)
    at SAXParser.write (/home/micky/zen/zenmusic/node_modules/sax/lib/sax.js:1436:13)
    at Parser.exports.Parser.Parser.parseString (/home/micky/zen/zenmusic/node_modules/xml2js/lib/xml2js.js:508:31)
    at Parser.parseString (/home/micky/zen/zenmusic/node_modules/xml2js/lib/xml2js.js:7:59)
    at /home/micky/zen/zenmusic/node_modules/sonos/lib/sonos.js:1135:34
    at /home/micky/zen/zenmusic/node_modules/sonos/lib/services/Service.js:67:14
    at Parser.<anonymous> (/home/micky/zen/zenmusic/node_modules/xml2js/lib/xml2js.js:489:18)
    at emitOne (events.js:115:13)
    at Parser.emit (events.js:210:7)

Bot stuck on starting..

When I start the bot with node index.js, it first gives this warning:
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

Then when I try to start the bot with node --use-stric index.js It only says: Starting...

How can I fix this?

crash when adding music / package.json not up-to-date ?

Hi !
i am trying to set up the server in our office.

1/ it seems that the package.json is not up-to-date, as the node-sonos is still on 0.11.x.
2/ if I update the node-sones library , it crashes.

Could you try to do your sequence on a brand new fresh computer ? I tried on 3 different and have same result :

git clone https://github.com/htilly/zenmusic
cd zenmusic
npm install (should be wrong due to bad version of node-sonos)
Change all the values in "config.json".
node index.js

nothing else to do ? patching some files ?

thanks !

Playlist functionality

This is awesome! I wondered if you considered/messed around with adding the ability to throw in playlists from Spotify too? It looks like it could be quite complicated, but also doable...

Undefined

When querying the current track I am being returned "We're rocking out to undefined - undefined (0NaN:0NaN/0NaN:0NaN)".

This has only been happening for a couple of weeks - I tried reinstalling the repo but it hasn't helped. All other controls are working fine - is this a V3/V4 issue?

Receiving error when trying to start index.js

[note, running on a Mac]

throw err;
^

Error: Cannot find module 'urllib-sync'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/opt/zenmusic/index.js:1:80)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)

TTS not working

The text-to-speech function uses the following uri to play text:

  // This url just redirects to voicerss because of the specific url format for the sonos
  var url = 'http://i872953.iris.fhict.nl/speech/en-us_' + encodeURIComponent(text) + '.mp3';

However, the url redirects to google translate instead of voicerss.. the google tts api is offline :(. I tried to use the voicerss url directly, but I get a error 500. Is this because the url format from voicerss is in the wrong format? What format does the url needs to be? Can we get the redirect script to voicerss, so we can use our own url with the redirect script installed there?

Sorry @botname, no bots allowed! Gets spammed in channel assigned to bot

Not sure how this started but I changed the name of zenmusic folder back and fourth.

08-20 08:21:34:470   Setting Spotify region to EU...
08-20 08:21:34:479   SE
warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.
08-20 08:21:36:001   Online!
08-20 08:21:45:560   Received: message undefined <@UBD6NKEHZ> 1534746105.000100 "list"
08-20 08:21:45:560   term list
08-20 08:21:45:843   Current queue:  {
  "returned": "20",
  "total": "20",
  "items": [
    {
      "title": "The Last Stand",
      "artist": "Sabaton",
      "album": "The Last Stand",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a4luL1R4A2u0nesFPaJX0s8%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a4luL1R4A2u0nesFPaJX0s8?sid=9&flags=8224&sn=1"
    },
    {
      "title": "To Hell and Back",
      "artist": "Sabaton",
      "album": "Heroes",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a12dbm3GD7mGrySotwE6dm5%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a12dbm3GD7mGrySotwE6dm5?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Primo Victoria",
      "artist": "Sabaton",
      "album": "Primo Victoria - Re-Armed",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0WyWD2afagATezkRzytf1n%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a0WyWD2afagATezkRzytf1n?sid=9&flags=8224&sn=1"
    },
    {
      "title": "The Lost Battalion",
      "artist": "Sabaton",
      "album": "The Last Stand",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a1oB8wmdkbT0jneWOKKyf1a%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a1oB8wmdkbT0jneWOKKyf1a?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Shiroyama",
      "artist": "Sabaton",
      "album": "The Last Stand",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a7gKZvuTXfEKKoxQ4xVz3oX%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a7gKZvuTXfEKKoxQ4xVz3oX?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Sparta",
      "artist": "Sabaton",
      "album": "The Last Stand",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a3taSzWrlMYIkSjTeIbQptk%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a3taSzWrlMYIkSjTeIbQptk?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Winged Hussars",
      "artist": "Sabaton",
      "album": "The Last Stand",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a3XmrptxAPr4ZNtf6aFAEpq%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a3XmrptxAPr4ZNtf6aFAEpq?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Ghost Division",
      "artist": "Sabaton",
      "album": "The Art of War - Re-Armed",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0OPBa3TyMXz4WlvdjkOL1Y%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a0OPBa3TyMXz4WlvdjkOL1Y?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Carolus Rex",
      "artist": "Sabaton",
      "album": "Carolus Rex (Bonus Version)",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a6imjjOJ63SnfvbYTARjyqz%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a6imjjOJ63SnfvbYTARjyqz?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Night Witches",
      "artist": "Sabaton",
      "album": "Heroes",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a4GyoRIx9au0OSRrqbArkia%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a4GyoRIx9au0OSRrqbArkia?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Nothing Else Matters",
      "artist": "Metallica",
      "album": "Metallica",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0nLiqZ6A27jJri2VCalIUs%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a0nLiqZ6A27jJri2VCalIUs?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Enter Sandman",
      "artist": "Metallica",
      "album": "Metallica",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a5sICkBXVmaCQk5aISGR3x1%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a5sICkBXVmaCQk5aISGR3x1?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Master Of Puppets",
      "artist": "Metallica",
      "album": "Master Of Puppets (Remastered)",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a2MuWTIM3b0YEAskbeeFE1i%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a2MuWTIM3b0YEAskbeeFE1i?sid=9&flags=8224&sn=1"
    },
    {
      "title": "The Unforgiven",
      "artist": "Metallica",
      "album": "Metallica",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a4aYLAF6ckQ5ooGGGM7sWAa%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a4aYLAF6ckQ5ooGGGM7sWAa?sid=9&flags=8224&sn=1"
    },
    {
      "title": "One",
      "artist": "Metallica",
      "album": "...And Justice For All",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a5IX4TbIR5mMHGE4wiWwKW0%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a5IX4TbIR5mMHGE4wiWwKW0?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Whiskey In The Jar",
      "artist": "Metallica",
      "album": "Garage Inc.",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a2R6UrJ8uWbSIiHWmvRQvN8%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a2R6UrJ8uWbSIiHWmvRQvN8?sid=9&flags=8224&sn=1"
    },
    {
      "title": "For Whom The Bell Tolls - Remastered",
      "artist": "Metallica",
      "album": "Ride The Lightning (Remastered)",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a2dXsILW8gzkosqleHAvl0v%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a2dXsILW8gzkosqleHAvl0v?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Sad But True",
      "artist": "Metallica",
      "album": "Metallica",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a1PhLYngBKbeDtdmDzCg3Pb%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a1PhLYngBKbeDtdmDzCg3Pb?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Fade To Black - Remastered",
      "artist": "Metallica",
      "album": "Ride The Lightning (Deluxe / Remastered)",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a5nekfiTN45vlxG0eNJQQye%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a5nekfiTN45vlxG0eNJQQye?sid=9&flags=8224&sn=1"
    },
    {
      "title": "Hardwired",
      "artist": "Metallica",
      "album": "Hardwired…To Self-Destruct (Deluxe)",
      "albumArtURI": "http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0QV3swr7L8MZr72lL2izV1%3fsid%3d9%26flags%3d8224%26sn%3d1",
      "uri": "x-sonos-spotify:spotify%3atrack%3a0QV3swr7L8MZr72lL2izV1?sid=9&flags=8224&sn=1"
    }
  ]
}
08-20 08:21:45:887   Got current track:  { title: 'Ghost Division',
  artist: 'Sabaton',
  album: 'The Art of War - Re-Armed',
  albumArtURI:
   '/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0OPBa3TyMXz4WlvdjkOL1Y%3fsid%3d9%26flags%3d8224%26sn%3d1',
  position: 63,
  duration: 231,
  albumArtURL:
   'http://192.168.7.161:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0OPBa3TyMXz4WlvdjkOL1Y%3fsid%3d9%26flags%3d8224%26sn%3d1',
  uri:
   'x-sonos-spotify:spotify%3atrack%3a0OPBa3TyMXz4WlvdjkOL1Y?sid=9&flags=8224&sn=1',
  queuePosition: 8 }
08-20 08:21:45:906   Got current state:  playing
08-20 08:21:46:061   Received: message undefined <@UC51GA6AK> 1534746106.000100 "Total tracks in queue: 20
====================
&gt;_#0_ *Title:* The Last Stand *Artist:* Sabaton
&gt;_#1_ *Title:* To Hell and Back *Artist:* Sabaton
&gt;_#2_ *Title:* Primo Victoria *Artist:* Sabaton
&gt;_#3_ *Title:* The Lost Battalion *Artist:* Sabaton
&gt;_#4_ *Title:* Shiroyama *Artist:* Sabaton
&gt;_#5_ *Title:* Sparta *Artist:* Sabaton
&gt;_#6_ *Title:* Winged Hussars *Artist:* Sabaton
:notes: _#7_ *Title:* Ghost Division *Artist:* Sabaton
&gt;_#8_ *Title:* Carolus Rex *Artist:* Sabaton
&gt;_#9_ *Title:* Night Witches *Artist:* Sabaton
&gt;_#10_ *Title:* Nothing Else Matters *Artist:* Metallica
&gt;_#11_ *Title:* Enter Sandman *Artist:* Metallica
&gt;_#12_ *Title:* Master Of Puppets *Artist:* Metallica
&gt;_#13_ *Title:* The Unforgiven *Artist:* Metallica
&gt;_#14_ *Title:* One *Artist:* Metallica
&gt;_#15_ *Title:* Whiskey In The Jar *Artist:* Metallica
&gt;_#16_ *Title:* For Whom The Bell Tolls - Remastered *Artist:* Metallica
&gt;_#17_ *Title:* Sad But True *Artist:* Metallica
&gt;_#18_ *Title:* Fade To Black - Remastered *Artist:* Metallica
&gt;_#19_ *Title:* Hardwired *Artist:* Metallica"
08-20 08:21:46:063   term total
08-20 08:21:46:207   Received: message undefined <@UC51GA6AK> 1534746106.000200 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:46:208   term sorry
08-20 08:21:46:235   Received: message undefined <@UC51GA6AK> 1534746106.000300 "Sonos state is 'playing'"
08-20 08:21:46:237   term sonos
08-20 08:21:46:353   Received: message undefined <@UC51GA6AK> 1534746106.000400 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:46:355   term sorry
08-20 08:21:46:500   Received: message undefined <@UC51GA6AK> 1534746106.000500 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:46:503   term sorry
08-20 08:21:46:554   Received: message undefined <@UC51GA6AK> 1534746106.000600 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:46:558   term sorry
08-20 08:21:46:649   Received: message undefined <@UC51GA6AK> 1534746106.000700 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:46:653   term sorry
08-20 08:21:46:701   Received: message undefined <@UC51GA6AK> 1534746106.000800 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:46:705   term sorry
08-20 08:21:46:796   Received: message undefined <@UC51GA6AK> 1534746106.000900 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:46:799   term sorry
08-20 08:21:46:945   Received: message undefined <@UC51GA6AK> 1534746106.001000 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:46:950   term sorry
08-20 08:21:47:022   Received: message undefined <@UC51GA6AK> 1534746106.001100 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:026   term sorry
08-20 08:21:47:096   Received: message undefined <@UC51GA6AK> 1534746107.000100 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:099   term sorry
08-20 08:21:47:170   Received: message undefined <@UC51GA6AK> 1534746107.000200 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:174   term sorry
08-20 08:21:47:247   Received: message undefined <@UC51GA6AK> 1534746107.000300 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:251   term sorry
08-20 08:21:47:396   Received: message undefined <@UC51GA6AK> 1534746107.000400 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:400   term sorry
08-20 08:21:47:492   Received: message undefined <@UC51GA6AK> 1534746107.000500 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:496   term sorry
08-20 08:21:47:544   Received: message undefined <@UC51GA6AK> 1534746107.000600 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:548   term sorry
08-20 08:21:47:640   Received: message undefined <@UC51GA6AK> 1534746107.000700 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:643   term sorry
08-20 08:21:47:695   Received: message undefined <@UC51GA6AK> 1534746107.000800 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:699   term sorry
08-20 08:21:47:785   Received: message undefined <@UC51GA6AK> 1534746107.000900 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:789   term sorry
08-20 08:21:47:843   Received: message undefined <@UC51GA6AK> 1534746107.001000 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:847   term sorry
08-20 08:21:47:931   Received: message undefined <@UC51GA6AK> 1534746107.001100 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:935   term sorry
08-20 08:21:47:993   Received: message undefined <@UC51GA6AK> 1534746107.001200 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:47:996   term sorry
08-20 08:21:48:079   Received: message undefined <@UC51GA6AK> 1534746108.000100 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:082   term sorry
08-20 08:21:48:139   Received: message undefined <@UC51GA6AK> 1534746108.000200 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:143   term sorry
08-20 08:21:48:226   Received: message undefined <@UC51GA6AK> 1534746108.000300 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:230   term sorry
08-20 08:21:48:286   Received: message undefined <@UC51GA6AK> 1534746108.000400 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:289   term sorry
08-20 08:21:48:376   Received: message undefined <@UC51GA6AK> 1534746108.000500 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:380   term sorry
08-20 08:21:48:434   Received: message undefined <@UC51GA6AK> 1534746108.000600 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:438   term sorry
08-20 08:21:48:527   Received: message undefined <@UC51GA6AK> 1534746108.000700 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:530   term sorry
08-20 08:21:48:583   Received: message undefined <@UC51GA6AK> 1534746108.000800 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:587   term sorry
08-20 08:21:48:672   Received: message undefined <@UC51GA6AK> 1534746108.000900 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:676   term sorry
08-20 08:21:48:729   Received: message undefined <@UC51GA6AK> 1534746108.001000 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:733   term sorry
08-20 08:21:48:821   Received: message undefined <@UC51GA6AK> 1534746108.001100 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:825   term sorry
08-20 08:21:48:876   Received: message undefined <@UC51GA6AK> 1534746108.001200 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:880   term sorry
08-20 08:21:48:979   Received: message undefined <@UC51GA6AK> 1534746108.001300 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:48:983   term sorry
08-20 08:21:49:023   Received: message undefined <@UC51GA6AK> 1534746108.001400 "Sorry <@UC51GA6AK>, no bots allowed!"
08-20 08:21:49:027   term sorry

Spotify Issues...

Hey!

Great bot. We started using it today but I noticed I can't do spotify searches or adds. I get this error:

Received: message #music-admin @panzer 1495833390.986118 "append The Rockafeller Skank"
term append
/opt/zenmusic/node_modules/urllib-sync/index.js:40
    throw res.error;
    ^

Error: spawnSync /usr/local/bin/node ETIMEDOUT
    at exports._errnoException (util.js:1050:11)
    at Object.spawnSync (child_process.js:459:20)
    at Object.request (/opt/zenmusic/node_modules/urllib-sync/index.js:33:16)
    at _append (/opt/zenmusic/index.js:616:29)
    at RTMClient.slack.on (/opt/zenmusic/index.js:148:21)
    at RTMClient.emit (/opt/zenmusic/node_modules/eventemitter3/index.js:116:35)
    at RTMClient.emit (/opt/zenmusic/node_modules/@slack/client/lib/clients/client.js:82:39)
    at RTMClient._handleWsMessageViaEventHandler (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:472:10)
    at RTMClient.handleWsMessage (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:426:10)
    at WebSocket.wrapper (/opt/zenmusic/node_modules/lodash/lodash.js:4968:19)
    at emitTwo (events.js:106:13)
    at WebSocket.emit (events.js:194:7)
    at Receiver.ontext (/opt/zenmusic/node_modules/ws/lib/WebSocket.js:841:10)
    at /opt/zenmusic/node_modules/ws/lib/Receiver.js:536:18
    at Receiver.applyExtensions (/opt/zenmusic/node_modules/ws/lib/Receiver.js:371:5)
    at /opt/zenmusic/node_modules/ws/lib/Receiver.js:508:14

Is there more config needed?

Typing vote will crash the bot

term vote
/opt/zenmusic/index.js:871
    entities = new Entities();
             ^

ReferenceError: entities is not defined

Any idea when the vote function will be fixed :)?

'You have undefined unread undefined'

Hey,

I tried to set up this integration, but I keep having this You have undefined unread undefined error when I try to run the node index.js command.

Any solution?
Thanks.

Connecting zenbot to Sonos - StatusCodeError: 500

Hello, I'm having trouble playing songs on sonos speaker.

"status" command in Slack says:
Sonos state is 'stopped'

"search" command in Slack works.
I have entered the ip of the speaker into config.json and other cridentials needed there.

Hmm. Can't call next

Getting this message:

Received: message #music-admin @panzer 1497566138.060215 "next"
term next
Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#Next"
    at Request._callback (/opt/zenmusic/node_modules/sonos/lib/sonos.js:153:23)
    at Request.self.callback (/opt/zenmusic/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at Request.<anonymous> (/opt/zenmusic/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at IncomingMessage.<anonymous> (/opt/zenmusic/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

I'm running into an error when trying to install

/usr/local/bin/npm install https://github.com/htilly/zenmusic
npm WARN deprecated [email protected]: Use @slack/client instead, this package is no longer maintained
|

[email protected] install /Users/[name]/node_modules/zen-music/node_modules/slack-client/node_modules/ws/node_modules/utf-8-validate
node-gyp rebuild

CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node

[email protected] install /Users/[name]/node_modules/zen-music/node_modules/slack-client/node_modules/ws/node_modules/bufferutil
node-gyp rebuild

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
[email protected] node_modules/zen-music
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

Spotify Auth Token (I think)

I believe I have the Spotify access token entered correctly. I have base64 encoded the <client_id>:<client_secret> then added this to the apiKey field within config.json.

However, I receive this error when I attempt a search or other command which triggers Spotify calls

`/opt/zenmusic/node_modules/urllib-sync/index.js:40
throw res.error;
^

Error: spawnSync /usr/local/bin/node ETIMEDOUT
at exports._errnoException (util.js:1007:11)
at Object.spawnSync (child_process.js:464:20)
at Object.request (/opt/zenmusic/node_modules/urllib-sync/index.js:33:16)
at _getAccessToken (/opt/zenmusic/index.js:1365:31)
at _searchSpotify (/opt/zenmusic/index.js:1070:23)
at _search (/opt/zenmusic/index.js:852:16)
at RTMClient.slack.on (/opt/zenmusic/index.js:175:13)
at RTMClient.emit (/opt/zenmusic/node_modules/@slack/client/node_modules/eventemitter3/index.js:116:35)
at RTMClient._handleWsMessageViaEventHandler (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:482:10)
at RTMClient.handleWsMessage (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:436:10)
at WebSocket.wrapper (/opt/zenmusic/node_modules/@slack/client/node_modules/lodash/lodash.js:4941:19)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:191:7)
at Receiver.ontext (/opt/zenmusic/node_modules/@slack/client/node_modules/ws/lib/WebSocket.js:841:10)
at /opt/zenmusic/node_modules/@slack/client/node_modules/ws/lib/Receiver.js:536:18
at Receiver.applyExtensions (/opt/zenmusic/node_modules/@slack/client/node_modules/ws/lib/Receiver.js:371:5)`

Error 500 on adding song

Adding a song to the queue gives this error:
Error: HTTP response code 500 for "urn:schemas-upnp-org:service:AVTransport:1#AddURIToQueue"

Even though my index.js contains the fix that is suppose to fix the 500 problem..

// Old version.. New is supposed to fix 500 problem...
// sonos.addSpotifyQueue(spid, function (err, res) {
sonos.addSpotify(spid, function (err, res) {

Spotify functions do not work and crash the server

Hello

I've been looking for a new slack integrated Sonos controller with Spotify support however I had some trouble setting this one up.

I am setting up locally and the Spotify api keys are functioning as normal, however I get the following error when I try to search or add or do anything that needs to control Spotify:

info: term: search
info: _search search
/Users/tech/Sites/Sonos/zenmusic/index.js:922
var [data, message] = spotify.searchSpotify(input, channel, userName, searchLimit)
^

TypeError: spotify.searchSpotify is not a function or its return value is not iterable
at _search (/Users/tech/Sites/Sonos/zenmusic/index.js:922:33)
at processInput (/Users/tech/Sites/Sonos/zenmusic/index.js:205:13)
at RTMClient.slack.on (/Users/tech/Sites/Sonos/zenmusic/index.js:162:5)
at RTMClient.emit (/Users/tech/Sites/Sonos/zenmusic/node_modules/eventemitter3/index.js:116:35)
at RTMClient._handleWsMessageViaEventHandler (/Users/tech/Sites/Sonos/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:482:10)
at RTMClient.handleWsMessage (/Users/tech/Sites/Sonos/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:436:10)
at WebSocket.wrapper (/Users/tech/Sites/Sonos/zenmusic/node_modules/lodash/lodash.js:4929:19)
at WebSocket.emit (events.js:198:13)
at Receiver.ontext (/Users/tech/Sites/Sonos/zenmusic/node_modules/ws/lib/WebSocket.js:841:10)
at /Users/tech/Sites/Sonos/zenmusic/node_modules/ws/lib/Receiver.js:536:18
at Receiver.applyExtensions (/Users/tech/Sites/Sonos/zenmusic/node_modules/ws/lib/Receiver.js:371:5)
at /Users/tech/Sites/Sonos/zenmusic/node_modules/ws/lib/Receiver.js:508:14
at Receiver.flush (/Users/tech/Sites/Sonos/zenmusic/node_modules/ws/lib/Receiver.js:347:3)
at Receiver.finish (/Users/tech/Sites/Sonos/zenmusic/node_modules/ws/lib/Receiver.js:541:12)
at Receiver.expectHandler (/Users/tech/Sites/Sonos/zenmusic/node_modules/ws/lib/Receiver.js:499:31)
at Receiver.add (/Users/tech/Sites/Sonos/zenmusic/node_modules/ws/lib/Receiver.js:103:24)

Getting an error after following install instructions and running node index.js

Note that I am running this on a VM without access to a sonos speaker at the moment.

Terminal output:

/opt/zenmusic/node_modules/sonos/lib/sonos.js:66
var implicitListen = async function (event, listener) {
^^^^^^^^

SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/opt/zenmusic/node_modules/sonos/index.js:1:80)

config.json:

{
"adminChannel" : "spotify",
"standardChannel" : "spotify",
"gongLimit": 3,
"voteLimit": 6,
"sonos" : "",
"token" : "xoxb...",
"market" : "US",
"maxVolume" : 75,
"blacklist" : "@justin.bieber, @one.direction",
"apiKey": "abc...:abc..."
}

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.