feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

Snapcast support

Open MayeulC opened this issue 5 years ago • 19 comments

Describe the problem you have/What new integration you would like Integrating the following work with esphome: https://github.com/jorgenkraghjakobsen/snapclient

Please describe your use case for this integration and alternatives you've tried: Create a free software, cheap sonos clone for multi-room audio.

Additional context I would like to have a system that is as energy-efficient as possible, I think the esp32 might be suitable for this. Ideally, the workflow would be the following:

Materials needed:

  1. ESP32
  2. MA12070P or similar
  3. Analog speakers
  4. (battery if you want) power supply

Software needed: Snapcast server

Ideally, I would like the installation process to be as simple as soldering together the modules, specify it in the config, and flash, then have it pop in homeassistant.

A possible alternative would be to use separate bluetooth speakers. I am not sure how feasible this would be?

MayeulC avatar Aug 18 '20 15:08 MayeulC

It would be great to see this integrated. Sadly I lack the required knowledge to do so. I've recently started experimenting with LyraT 4.3 boards and this fork seems to be working well. It looks more advanced than the original in the post above

velaar avatar Oct 26 '22 18:10 velaar

Hi, Just passing by. adding snapcast support will make music adaptive lights with home assistant possible.

Bram-diederik avatar May 10 '23 22:05 Bram-diederik

Just to add some more recent forks of the snapclient:

  • https://github.com/CarlosDerSeher/snapclient
  • https://github.com/pschatzmann/arduino-snapclient

h3ndrik avatar Feb 16 '24 16:02 h3ndrik

I have begun working on something that has a slight possibility of turning into a Snapcast component. This is my first time ever developing components for esphome. Although I have experience with both Arduino and ESP-IDF I am by no means an expert in c++ which heavily limits this specific type of development with protocols, buffers, memory allocations and all the other low level stuff where I'm not that strong.

Dev fork: https://github.com/mads03dk/esphome

At the moment, I don't have the time required to complete this. This is heavily reflected in the catastrophe of a commit I just made to repo.

If anyone wants to help or take inspiration from my crappy sketch, feel more than free to do so :)

What works:

  • Esphome .yaml config
  • Connection to server
  • Base message serialization/deserialization
  • Hello message to the server
  • Codec message handling
  • Time message receiving (correction doesn't work yet)

mads03dk avatar Jun 27 '24 19:06 mads03dk

I would love to have an esphome snapcast component. Synced multi-room audio right out of the sensor nodes! Is there any progress / timeline on this? I might be able to put some work in myself, although I am in a similar situation as @mads03dk and would be very grateful for some handholding.

yggi avatar Sep 29 '24 10:09 yggi

@mads03dk awesome work! are you planning to work on synchronization of streams?

saeugetier avatar Oct 14 '24 14:10 saeugetier

@saeugetier If I had the time and skill to do it, then yes. But unfortunately, I'm currently depleted of criteria no. 1 and lack criteria no. 2. Perhaps sometime during the winter, if I'm not too booked out and have the energy to do it. But I'd be more than happy if someone else would take a look at the integration in the meantime

mads03dk avatar Oct 15 '24 12:10 mads03dk

There is an arduino port for snapclient, would it make sense to use it as library for esphome? Maybe this would not need much work to port here...

Chreece avatar Nov 23 '24 14:11 Chreece

This would be huge to allow the Home Assistant Voice PE hardware to be used as the basis for a real multiroom audio system!

Californian avatar Feb 02 '25 22:02 Californian

It looks like a couple of developers have picked up the old project:

Fingers crossed that this will help streamline the ESPHome implementation! I’d love to contribute, but unfortunately, I don’t have development skills. Wishing the best to those working on it!

a-d-r-i-a-n-d avatar Feb 24 '25 16:02 a-d-r-i-a-n-d

And these seem to be made for ESP-IDF, not arduino

nagyrobi avatar Feb 24 '25 19:02 nagyrobi

Snapcast support will be great as I assme at present there is no path for HomeAssistant VE to have Multi-room audio.

velaar avatar Feb 24 '25 22:02 velaar

@luar123 thx for integrating this, really looking forward to have snapcast natively in esphome! ❤

Do you need any help with testing, documentation, etc?

yggi avatar Apr 03 '25 09:04 yggi

Came Across HA VPE. Used Chromecast Devices over Years. Streams are interrupted sometimes. Spent much money for things that never worked correctly. 💯 would buy HA VPE for every fucking room when Snapcast is implemented. Stable streams over Music Assistant in the year 2025 with AI/KI should be possible. Right? 👍

steel4me avatar Sep 30 '25 17:09 steel4me

@steel4me It looks like the team went in a different direction. Hopefully a better one.

velaar avatar Sep 30 '25 17:09 velaar

@steel4me you can probably use the the snapclient component from the PR on HA VPE. Or use other hardware like louder esp: https://github.com/sonocotta/esp32-audio-dock

And as mentioned MA and esphome teams are working on a own/better protocol.

luar123 avatar Sep 30 '25 20:09 luar123

Snapcast on ESPHome is laggy AF so far.

formatBCE avatar Sep 30 '25 20:09 formatBCE

AFA Resonate is better and working correctly; I go for it. Just need something that is working correctly.

steel4me avatar Oct 01 '25 10:10 steel4me

FYI, FutureProofHomes developer for their ESPHome fork (gnumpi) has added their own Snapcast client implementation to that repo during the last few months, see:

  • https://github.com/FutureProofHomes/Satellite1-ESPHome/pulls?q=is%3Apr+snapcast

and

  • https://github.com/FutureProofHomes/Documentation/pulls?q=is%3Apr+snapcast

Hedda avatar Oct 08 '25 13:10 Hedda