Skip to content

luizof/ha-multicast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultiCast - Cast to Multiple Google Cast Devices

hacs_badge GitHub Release

A Home Assistant custom integration that lets you cast media to multiple Google Cast / Chromecast devices simultaneously, with playback synchronization.

Features

  • Cast to multiple devices at once — play the same media on all selected Cast devices simultaneously
  • YouTube support — paste a YouTube URL and it plays on all devices via the YouTube Cast app
  • Local media & cameras — browse and cast HA local media files and camera feeds
  • Playback sync — periodic position correction keeps all devices aligned (configurable interval and thresholds)
  • Playlist management — queue multiple items with single play, repeat, and shuffle modes
  • Auto-retry — if a device fails to start, the integration retries for up to 2 minutes
  • Auto-reconnect — disconnected devices are re-discovered every 5 minutes
  • Overlapping groups — multiple groups can share devices; casting to one group transfers ownership of shared devices
  • Full HA integration — exposed as a media_player entity with play, pause, stop, seek, volume, next/previous track

Installation

HACS (Recommended)

  1. Open HACS in Home Assistant
  2. Go to Integrations
  3. Click the + button and search for MultiCast
  4. Download and restart Home Assistant

Manual

  1. Copy the custom_components/multicast folder to your HA config/custom_components/ directory
  2. Restart Home Assistant

Setup

  1. Go to Settings → Integrations → Add Integration
  2. Search for MultiCast
  3. Enter a name for your cast group
  4. Select 2 or more Cast devices from the discovered list
  5. Configure sync options (optional)

Services

Service Description
multicast.play_media Play a URL or YouTube link on the group
multicast.add_to_playlist Add media URL to the playlist queue
multicast.clear_playlist Clear the playlist
multicast.set_playlist_mode Set mode: single, repeat, or shuffle
multicast.sync_now Force immediate position sync

Example: Play YouTube on all devices

service: multicast.play_media
data:
  media_url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Example: Play local media

service: multicast.play_media
data:
  media_url: "/media/local/my_video.mp4"

Example: Target a specific group

service: multicast.play_media
data:
  media_url: "https://example.com/song.mp3"
  entity_id: "media_player.multicast_living_room"

Options

After setup, click Configure on the integration to adjust:

  • Enable Sync — toggle position synchronization on/off
  • Sync Interval — how often to check positions (5–60 seconds)
  • Soft Sync Threshold — drift before seeking individual devices (0.5–5.0s)
  • Hard Sync Threshold — drift before pause-seek-play all devices (2.0–30.0s)

How It Works

  • Uses pychromecast to maintain connections to Cast devices
  • Reads device states from HA's built-in Cast integration (reliable, no duplicate connections)
  • Sends play/pause/seek/stop commands in parallel via asyncio.gather()
  • Position sync uses median position as reference to correct drifting devices

License

MIT

About

Cast media to multiple Google Cast devices simultaneously from Home Assistant

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages