Share] Apple Music for Mac (Modern) - Fast & Local HACS Integration

:red_apple: Apple Music for Mac (Modern)

The ultimate local integration for macOS Music users

Hi everyone! :waving_hand:

Tired of slow or cloud-based solutions to control your Mac's music? I've built a fast, local, and modern HACS integration to bring your macOS Music app (formerly iTunes) directly into your Home Assistant dashboard.

:link: GitHub Repository: GitHub - leguernadrian-boop/apple-music-mac-ha: Intégration moderne Apple Music pour Home Assistant (2026). · GitHub

:rocket: Why use this integration?

:high_voltage: Zero Latency: No cloud, no delay. Everything stays on your local network.

:framed_picture: HD Artworks: Automatically fetches high-resolution covers via iTunes API.

:control_knobs: Full Control: Play, pause, skip tracks, and adjust volume with precision.

:bar_chart: Live Metadata: Real-time updates for Title, Artist, and Album.

:hammer_and_wrench: Quick Start Guide

  1. The Mac Side (The Bridge)

This integration uses a lightweight Node.js server to talk to macOS.

  1. Install Node.js.

  2. Setup your folder and run npm install express.

  3. Launch your server.js (code available on GitHub) with: node server.js.

  4. The Home Assistant Side

  5. HACS: Add the link above as a Custom Repository.

  6. Install: Download the integration and restart HA.

  7. Config: Go to Settings > Devices & Services and add the integration.

  8. Link: Enter your Mac's IP and port 8181.

:locked_with_key: Important: macOS Permissions

To allow the server to "speak" to the Music app, don't forget this step:

Go to System Settings ➔ Privacy & Security ➔ Automation ➔ Enable Music for your Terminal.

:speech_balloon: I'm 16 and this is my first major contribution, so feel free to give me feedback or open an issue on GitHub!

Developed with :heart: by @adrianleguern

Love it! Ran into a few issues setting this up that might help others:

  1. The server code in the README’s <details> block has a missing closing code fence, so it renders broken on GitHub and can’t be copy-pasted
  2. The original server builds JSON inside AppleScript — any track with a " in the title (e.g. “Heroes”) breaks parsing and the entity drops to OFF
  3. The config flow calls /_ping to verify the connection during setup, but the original server doesn’t implement it — this causes every setup attempt to fail with cannot_connect with no clear explanation
  4. The /volume endpoint interpolates user input directly into a shell command

I submitted a PR with a fixed server.js and updated docs (including AirPlay speaker detection): Add server.js and fix setup docs by matt-drazba · Pull Request #1 · leguernadrian-boop/apple-music-mac-ha · GitHub