Skip to content

jb1228/snapcast-ha-player

 
 

Repository files navigation

Snapcast Player Home Assistant Integration

Custom media_player integration that streams audio into a Snapcast source using ffmpeg.

Installation

Install via HACS or copy custom_components/snapcast_player/ into your Home Assistant custom_components/ directory.

Home Assistant Setup

The integration now supports modern Home Assistant config entries.

  1. Go to Settings -> Devices & Services -> Add Integration
  2. Search for Snapcast Player
  3. Enter host/port (or pipe path), name, and Snapcast sampleformat

Supported configuration fields

key required example description
host yes 127.0.0.1 Snapcast source host, or a local pipe path such as /tmp/snapfifo
port no 4953 TCP port for Snapcast source type tcp
name no Living Room Entity name
sampleformat no 48000:16:2 Snapcast source sample format (rate:bits:channels); sampleformat=48000:16:2 is also accepted
start_delay no 1s Optional ffmpeg adelay value to avoid clipped starts (for example announcements)

Default sample format: 48000:16:2

Snapcast Source Configuration

Match your snapserver source sampleformat to this integration's sampleformat.

Example snapserver source:

source = type=tcp,name=HomeAssistant,sampleformat=48000:16:2

Legacy YAML (still supported)

media_player:
  - platform: snapcast_player
    host: 127.0.0.1
    port: 4953
    name: Living Room
    sampleformat: 48000:16:2
    start_delay: 1s

About

Home Assistant custom integration to enable TTS playback through a snapcast server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%