Skip to main content

Mixlar API Documentation

Complete API reference for integrating with and extending Mixlar Mix Control.

Overview

Mixlar Mix Control provides three powerful APIs for integration and extension:
  1. Toast Notification API - HTTP REST API for sending notifications
  2. Web Controller API - Complete remote control via REST and WebSocket
  3. Plugin API - Extend functionality with custom Python plugins

Toast Notification API

📖 Full Documentation
Lightweight HTTP REST API for sending toast notifications to your Mixlar device from any application.

Quick Start

Features

  • ✅ Simple REST API (POST requests)
  • ✅ API key authentication
  • ✅ Rate limiting (30 req/min)
  • ✅ Tailscale HTTPS support
  • ✅ Multi-language examples (Python, JS, Bash, PowerShell)

Use Cases

  • CI/CD build notifications
  • Server monitoring alerts
  • Task automation completion
  • Custom application integrations
  • Smart home events

Key Endpoints

Port: 8889 (default)

Web Controller API

📖 Full Documentation
Complete REST API and WebSocket interface for remote control of your Mixlar device.

Quick Start

REST API:
WebSocket:

Features

  • ✅ Complete device control (sliders, mutes, macros)
  • ✅ Real-time WebSocket updates
  • ✅ Optional password authentication
  • ✅ Session management
  • ✅ CORS enabled
  • ✅ HTTPS with Tailscale

Control Categories

  • Audio: Sliders, mutes, master volume, assignments
  • Macros: Trigger macros, view pages
  • Smart Home: Control lights, switches, brightness
  • OBS Studio: Switch scenes, toggle sources
  • Profiles: Load audio profiles

Key Endpoints

WebSocket Events

Port: 5000 (default, configurable)

Plugin API

📖 Full Documentation
Extend Mixlar functionality with custom Python plugins.

Quick Start

1. Create Plugin Structure:
2. Define Manifest (manifest.json):
3. Create Plugin (plugin.py):

Features

  • ✅ Event-driven architecture (17+ hooks)
  • ✅ Serial communication access
  • ✅ Custom macro types
  • ✅ Settings persistence
  • ✅ State queries (sliders, device, Spotify)
  • ✅ Thread-safe APIs

Available Hooks

Lifecycle:
  • on_load(), on_unload(), on_enable(), on_disable()
Device Events:
  • on_device_connect(port), on_device_disconnect()
Input Events:
  • on_slider_change(index, value)
  • on_macro_button(index, page)
  • on_mute_button(index, state)
  • on_encoder_turn(direction)
  • on_encoder_press(press_type)
Serial & Display:
  • on_serial_receive(data)
  • on_page_change(page_name)
  • on_macro_page_change(page_index)
Application:
  • on_spotify_track_change(track_info)
  • on_macro_execute(macro) → bool

API Methods

Serial: send_serial(command) Macros: trigger_macro(index, page), register_macro_type(type_name, handler) State: get_slider_value(index), get_device_state(), get_spotify_state(), get_all_macros() Settings: get_setting(key, default), set_setting(key, value), get_all_settings() UI: show_notification(title, message), log(message, level)

Integration Examples

CI/CD Pipeline Notifications

GitHub Actions:

Mobile App Control

Flutter:

Custom Plugin Integration

Discord Webhook Plugin:

Network Access

Local Access

  • Localhost: http://localhost:{PORT}
  • Local Network: http://192.168.x.x:{PORT}

Remote Access (Tailscale)

  1. Install Tailscale: https://tailscale.com/download
  2. Generate Certificates:
  3. Place Certificates: main/certs/
  4. Access:
    • Toast API: https://yourhostname.tailnet.ts.net:8889
    • Web Controller: https://yourhostname.tailnet.ts.net:5000

Security

  • API Keys: Store securely (environment variables, secrets manager)
  • HTTPS: Use Tailscale certificates for encryption
  • Authentication: Enable password protection for Web Controller
  • Firewall: Block ports from internet if not using Tailscale

Default Ports


API Comparison


Quick Reference

Toast API - Send Notification

Web Controller - Set Slider

Plugin - Custom Macro


Getting Help

Documentation Files

  • toast-api.mdx - Complete Toast API reference
  • web-controller-api.mdx - Complete Web Controller reference
  • plugin-api.mdx - Complete Plugin API reference
  • index.mdx - This overview document

Additional Resources

  • CLAUDE.md - Project architecture and development guide
  • toast/API_DOCUMENTATION.md - Toast system architecture
  • toast/PLUGIN_DEVELOPMENT.md - Plugin development guide
  • plugins/README.txt - Plugin system documentation

Support

  • Issues: Report bugs and request features
  • Examples: See plugins/executable/ for working plugin examples
  • Testing: Use toast/api/test_api.py for API testing

Version History

v1.5 (Current)

  • ✅ Toast Notification API with Tailscale HTTPS
  • ✅ Web Controller API with WebSocket support
  • ✅ Plugin API with 17+ event hooks
  • ✅ Custom macro type registration
  • ✅ Complete API documentation

API Versions

  • Toast API: v1.0
  • Web Controller API: v1.0
  • Plugin API: v1.0

Documentation Version: 1.0 Last Updated: 2025-12-10 Mixlar Version: 1.5