Get real-time information about what music, video, or other media is currently playing across all applications, and automatically sync this data to Home Assistant as a binary sensor for seamless smart home automation.
MediaStateMonitor sits in your macOS status bar and continuously monitors media playback across your system. It can detect and display information about:
- Currently playing music (Spotify, Apple Music, iTunes, etc.)
- Video playback (YouTube, Netflix, VLC, QuickTime, etc.)
- Podcast apps (Overcast, Pocket Casts, etc.)
- Any media application that uses system media controls
Then it sends the media state as a binary sensor to Home Assistant, specifically the binary_sensor.mac_media_playing entity. If it doesn’t already exist, it will create it.
- Real-time media monitoring - Detects what's playing across all apps
- Status bar integration - Clean, unobtrusive status bar display
- Home Assistant integration - Sends media state as a binary sensor to Home Assistant
- Auto-start capability - Can be set to launch automatically on login
- System-wide detection - Works with any media application
- Lightweight - Minimal system resource usage
- macOS 10.15 or later
- Xcode 12.0 or later
- Swift 5.0 or later
Download the latest version from the releases page and run the app directly.
-
Clone the repository:
git clone https://github.com/saihgupr/MediaStateMonitorMac.git
-
Open
MediaStateMonitor.xcodeprojin Xcode -
Build and run the project (⌘+R)
-
The app will appear in your status bar and begin monitoring media state
Once running, MediaStateMonitor will automatically detect and display information about any media currently playing on your system. Click the status bar icon to see current media information or access settings.
The app uses AppleScript to query the current media state through system APIs, allowing it to detect playback information from virtually any media application on macOS.
This project is available for personal use.

