SkillAgentSearch skills...

SlackONOS

๐ŸŽต Democratic Slack/Discord bot for Sonos control with Spotify integration. Queue music, vote to skip, and let the community decide what plays!

Install / Use

/learn @htilly/SlackONOS

README

Build Status Known Vulnerabilities Tests Coverage

SlackONOS - Democratic Music Bot for Discord & Slack

Control Your Sonos Speakers with Community Voting

A democratic music bot for Discord and Slack that lets teams control Sonos speakers with Spotify integration. Features community voting, democratic skip tracking with "gong" commands, and seamless multi-platform support.

๐ŸŽต Perfect for: Offices, shared spaces, gaming communities, Discord servers, and music lovers who want fair queue control

โœจ Key Features:

  • ๐Ÿค– AI Natural Language - Talk naturally! "@bot play the best songs by Queen" (NEW!)
  • ๐Ÿ—ณ๏ธ Democratic Voting - Community decides what plays next with vote-to-play system
  • ๐Ÿ”” Gong System - Skip tracks democratically when enough users vote to gong
  • ๐ŸŽฎ Discord Support - Full emoji reaction voting (๐ŸŽต to vote, ๐Ÿ”” to gong)
  • ๐Ÿ’ฌ Slack Integration - Modern Socket Mode support with channel-based permissions
  • ๐ŸŽถ Spotify Integration - Search and queue tracks, albums, and playlists
  • ๐Ÿ‘ฅ Multi-Platform - Run Discord and Slack simultaneously on one Sonos system
  • ๐ŸŽฏ Role-Based Permissions - Admin controls for flush, volume, and queue management
  • ๐Ÿšซ Gong Ban System - Tracks voted down become immune to re-queuing
  • ๐ŸŽ›๏ธ Soundcraft Ui24R Support - Control mixer volume on multiple buses directly from chat (NEW!)
  • ๐Ÿ” WebAuthn/FIDO2 Security - Passwordless login with Yubikey, Touch ID, or Face ID (NEW!)
  • ๐ŸŽจ Modern Web Interface - Beautiful setup wizard and admin panel with real-time updates (NEW!)

Screenshots

Setup Wizard - Welcome

Live music playback control and queue management

Setup Wizard - Platform Selection

Live music playback control and queue management

Setup Wizard - Configuration

Admin settings in the dedicated admin-channel

Admin Panel - Overview

Discord and Slack integration

Admin Panel - Security Settings

Configure your integrations with auto-validation

Admin Panel - Now Playing

Secure login with WebAuthn/FIDO2 support

Login Page

License & Commercial Use

SlackONOS is licensed under the GNU Affero General Public License v3 (AGPL-3.0-or-later).

  • You may use, modify and redistribute this software under the terms of the AGPL-3.0 license.
  • If you run a modified version as a network service, you must make the corresponding source code available to users.
  • Commercial entities that wish to use SlackONOS without AGPL obligations (e.g. closed-source forks or proprietary integrations) may contact the author to discuss separate commercial licensing.

See the LICENSE file for full details.

Privacy & Telemetry

SlackONOS respects your privacy. Optional anonymous telemetry helps us understand usage and improve the bot.

What's Collected (Anonymous Only):

  • โœ… Startup, heartbeat (24h), and shutdown events
  • โœ… Uptime duration (hours/days running)
  • โœ… OS platform & Node.js version
  • โœ… Release version/commit hash
  • โœ… Anonymous instance ID (random UUID, persisted in config - no PII)

What's NOT Collected:

  • โŒ No user data, usernames, or chat messages
  • โŒ No Slack/Discord server information
  • โŒ No song titles, playlists, or listening history
  • โŒ No IP addresses or location data
  • โŒ No command usage or voting patterns

Telemetry is enabled by default but can be disabled anytime:

{
  "telemetryEnabled": false
}

Or, disable telemetry instantly from Slack (admin channel):

setconfig telemetryEnabled false

๐Ÿ“– Full Telemetry Documentation - Details, privacy info, and self-hosting options

Use the telemetry admin command in Slack (admin channel) to view current status and what data is being sent.

Note: Analytics data is not publicly viewable; it is only accessible to the maintainers for improving the bot. If you self-host, you control all telemetry endpoints.

Quick Start

๐Ÿš€ Web-Based Setup Wizard (Recommended)

The easiest way to set up SlackONOS!

  1. Start SlackONOS: npm install && node index.js
  2. Open your browser: http://localhost:8181/setup (or http://YOUR_SERVER_IP:8181/setup)
  3. Follow the interactive wizard to configure:
    • Platform Selection - Choose Slack, Discord, or both
    • Slack Configuration - Tokens with auto-validation
    • Discord Configuration - Bot token and channel setup
    • Sonos Device - Auto-discovery or manual IP configuration
    • Spotify Integration - Credentials with region selection
    • Admin Password - Set your admin password for web access
  4. Save and restart - you're done!

Features:

  • โœ… Real-time validation of all tokens and credentials
  • โœ… Auto-discovery of Sonos devices on your network
  • โœ… Beautiful, modern UI with Slack-inspired design
  • โœ… Pre-fills existing configuration values to prevent accidental changes
  • โœ… Comprehensive error messages and helpful tooltips

What You Need:

  1. A Sonos speaker configured with Spotify
  2. A Slack bot token OR Discord bot token (or both!)
  3. A server running Node.js
  4. Static IP address for your Sonos speaker (or use auto-discovery)
  5. Spotify Developer credentials (Client ID & Secret) from https://developer.spotify.com/dashboard/applications

Docker Installation (Recommended)

services:
  slackonos:
    container_name: slackonos
    image: htilly/slackonos:latest
    restart: unless-stopped
    volumes:
      - /PATH_TO_CONFIG_FOLDER:/app/config
    ports:
      - "8181:8181"  # HTTP (redirectar)
      - "8443:8443"  # HTTPS (faktiska fรถrfrรฅgningar)
    # Optional: Use host network for better Sonos discovery
    # network_mode: "host"

After starting the container, access the setup wizard at:

  • HTTP: http://localhost:8181/setup (redirects to HTTPS if SSL is enabled)
  • HTTPS: https://localhost:8443/setup (if SSL certificates are configured)

๐Ÿ“– Complete Discord Setup Guide - Step-by-step Discord bot configuration

๐Ÿ“– Complete Slack Setup Guide - Socket Mode Slack bot setup (tokens, scopes, events)

๐ŸŽ›๏ธ Soundcraft Ui24R Integration - Control mixer volume directly from Slack/Discord

๐ŸŽฎ Discord Setup

Create your Discord bot:

  1. Go to the Discord Developer Portal
  2. Click "New Application" and give it a name
  3. Go to Bot โ†’ Click "Add Bot"
  4. Copy the Token (you'll need this for config)
  5. โš ๏ธ Important: Under Privileged Gateway Intents, enable "Message Content Intent"
  6. Go to OAuth2 โ†’ Copy your Client ID

Invite the bot to your server:

Use this link (replace YOUR_CLIENT_ID with your actual Client ID):

https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=330816&integration_type=0&scope=bot

Required Permissions (included in link):

  • View Channels
  • Send Messages
  • Add Reactions
  • Read Message History
  • Use External Emojis

Configure SlackONOS:

{
  "discordToken": "YOUR_BOT_TOKEN",
  "discordChannels": ["your-channel-id-or-name"]
}

๐Ÿ“– Complete Discord Setup Guide for detailed instructions


How It Works

SlackONOS is a democratic music bot that gives communities fair control over shared Sonos speakers. Instead of one person controlling the music, everyone can participate through voting and democratic skip features.

Uses node-sonos for Sonos control.

Platform Support

  • โœ… Slack - Modern Socket Mode with channel-based admin permissions
  • โœ… Discord - Full support with role-based admin + emoji reaction voting
  • ๐ŸŽต Shared Queue - Both platforms control the same Sonos speaker simultaneously
  • ๐Ÿ—ณ๏ธ Cross-Platform Democracy - Gong and vote systems work across all platforms

Network Requirements

Firewall Settings:

  • Server must reach Sonos on port 1400 (TCP)
  • Sonos must have internet access for Spotify streaming
  • Recommended: Static IP for Sonos speaker

Configuration You must provide the token of your Slack bot and the IP of your Sonos in either config.json (see config.json.example), as arguments or as environment variables. Examples:

node index.js --legacySlackBotToken "MySlackBotToken" --sonos "192.168.0.1"

or

legacySlackBotToken="MySlackBotToken" sonos="192.168.0.1" node index.js

You can also provide any of the other variables from config.json.example as arguments or environment variables. The blacklist can be provided as either an array in config.json, or as a comma-separated string when using arguments or environment variables.

Channel Configuration (Important for Large Workspaces)

SlackONOS uses two channels: adminChannel (for admin commands) and standardChannel (for regular users).

For workspaces with 100+ channels: Use channel IDs instead of channel names to avoid Slack API rate limits during startup.

  • Channel names (default): "adminChannel": "music-admin" โ†’ Bot scans all channels to find ID (slow, but auto-upgrades to IDs after first run)
  • Channel IDs (recommended): "adminChannel": "C01ABC123XY" โ†’ Direct lookup (instant)

๐ŸŽ‰ NEW: Auto-save Feature

If you configure channel names, SlackONOS will automatically update your config.json with the discovered

Related Skills

View on GitHub
GitHub Stars133
CategoryDevelopment
Updated8d ago
Forks37

Languages

JavaScript

Security Score

85/100

Audited on Mar 25, 2026

No findings