MusicBot is a Slack integration that facilitiates control of music playback through a Sonos system. This Python/Flask project interfaces with the Sonos hardware through the SoCo Python library, and with Spotify’s API. The system is configured to work with Slack as an Outgoing webhook, which listens to all conversations on a set channel.
Users can add tracks to the Sonos playlist by typing ‘add ‘ in the designated channel. The search query is routed to Spotify’s API, and the top five search results are returned to the user, who then selects the desired track by typing a number 1 through 5. MusicBot will also continue to randomly add previously-selected tracks, as well as tracks from a seed playlist during the day, ensuring there is always music playing. Read MoreMusicBot