Snapcast setup?

If I am going to use the SnapCast integration for HA/MA,does that mean I still need 2 PIs? One for the server and one for the client?

I have a Pair of Passive speakers and Some bluetooth speakers I would like to put in use.

I was also looking into a WiiM device.

Snapcast server and client can run on the same machine.
You can have multiple machines with a snapcast client to connect to the server.

You don’t even need HA, as you can access snapcast web GUI on your local network. But it’s a nice to have for automations (or to you use MA).

I wasn’t aware that they could be on the same machine.I thought it was two seperate machines.

I run it on two machines, but I think the MA can act both as a server and a client today.
Earlier it was only able to act as a client.

Are they a write up on how to set that up?

I dont know any guides, since I had mine configured before MA provided a snapcast server.

But here is the link to the MA section.

Hello,
MA can be your snapserver. After you activate the snapcast provider and if you have a snapclient correctly configured pointing to the snapserver in the same network the client will show up.

The following post is only for snapcast but the steps works with MA as well, just you don’t need to install the server as it is already there.
Snapcast

Hope it helps

Thanks for the link,I’ll check it out.

Thanks,I’ll look into it.

I tried the Snapcast integration and it wants my snapcast server. Is that the IP of my HA?

Ah,I see its under MA. So it’s already there.

Setup a PI as a client an I’m getting

May 31 20:23:13 SnapClient snapclient[439]: (Connection) Failed to connect to host '192.168.0.xxx', error: Connection refused
May 31 20:23:13 SnapClient snapclient[439]: (Controller) Error: Connection refused
May 31 20:23:13 SnapClient snapclient[439]: (Connection) Error in socket shutdown: Transport endpoint is not connected

Thats using… systemctl status snapclient

Nevermind,it was an issue with the IP address.

Alright,I get audio using the test wav file using some old USB speakers. When I choose them in MA,no audio. Not sure what I need to check now.

Hello,

USB connected to client, we suppose this works as you get the test audio out, but I have no experience with USB audio out.
You get test audio but no audio out from MA stream if I understood.

As you have USB I suppose you have audio jack as wll on the PI client, if it is the case just set the output to audio jack and check if this is an issue.

First on the server_ip:1780 you should see all the connected client - like in the docs
Can you run and stop music on the client from there?
Double check the setup of your audio setup on client (ALSA/Pulse).
check the known issues in the MA docs for Snapcast, maybe ports?

EDIT: what is the source of the audio? local file accessible by MA? or other? Try local server file just to make sure is not on server file side.

I meant to update this thread,but I just used Squeezlite and it connected right away using a Pi Zero W and HA as the server.

Hello,

Ok I use squeezelite as well, on esp32.

Good you got to a solition.

Hold on a minute,you can use an ESP32 for this? I have numerous ESP32s lying around doing nothing.

Hello,

Yes there is an installer for esp32 for both squeezelite and snapcast.
Just you have to pay attention to psram and esp module.

Squeezelite

Webinstaller

Snapcast

The HW requirements for squeezelite from github:
Depending on the hardware connected to the esp32, you can send audio to a local DAC, to SPDIF or to a Bluetooth speaker. The bare minimum required hardware is a WROVER module with 4MB of Flash and 4MB of PSRAM (ESP32 Wi-Fi & Bluetooth Modules I Espressif). With that module standalone, just apply power and you can stream to a Bluetooth speaker. You can also send audio to most I2S DAC as well as to SPDIF receivers using just a cable or an optical transducer.

Then you need to connect I2S audio dac or amp and a speaker.

I personally use Lilygo ESP32 Wrover module with squeezelite.
Don’t expect superpower :slight_smile: