HassPiAudio - Snapcast Multiroom Server with DLNA Support

Raspberry DLNA Server, that shares local Home Assistent Media and a DLNA Renderer on local 3.5mm Headphone out. Also Snapcast Server & Client for MultiRoomAudio!

Based on: badaix/snapcast and hzeller/gmrender-resurrect

DLNA Server → DLNA Render → Snapcast Server → Snapcast → Audio Out

It’s working, and no latency on 64bit clients (Snapcast Android App & RaspPi Audio out! :+1:

I coul’d need some help in the structure of the addon, so thos maybe can be an Community Addon!

Todo:

  • Other Soundcards Audio out on RaspPi
  • Test on other systems (i386, amd64, e.g.)
  • Split into three addons Dlna Server, HassPIAudio (DLNA renderer & Snapcast Server), Snapcast Client + Audio out

Installation:

  • Copy folder into addons
  • Install it from HA addons
  • Add Snapcast integration from HA

No Setup needed (Except IP-Ports if needed)
UPNP Server shares HA Media folder in Network
UPNP Renderer will be detect as HassPiAudio Media Player by HA DLNA


(Sample made with HACS Mini Media Player)

2 Likes

Thanks for share it, I will try it.

If there are any questions - I’ll try to help…

Android Client:

Other Platforms:

Hey @wullewatz , thank you for sharing the addon.

I tried installing it but compilation fails for me with:

gcc -DHAVE_CONFIG_H -I. -I..  -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/upnp -DPKG_DATADIR=\"/usr/local/share/gmediarender\"   -g -O2 -MT upnp_renderer.o -MD -MP -MF .deps/upnp_renderer.Tpo -c -o upnp_renderer.o upnp_renderer.c
upnp_renderer.c:44:10: fatal error: ithread.h: No such file or directory
   44 | #include <ithread.h>
      |          ^~~~~~~~~~~

I have:
Home Assistant 2023.9.2
Supervisor 2023.09.2
Operating System 10.5
Frontend 20230911.0 - latest

looks like it’s missing ithread.h.
you can search for files in packages with apt-file

installation

$ sudo apt install apt-file
$ sudo apt-file update

searching

$ apt-file search ithread.h
...
libupnp-dev: /usr/include/upnp/ithread.h
...

so it should be ok once you installed that

$ sudo apt install libupnp-dev
1 Like

I don’t want to necro-post, but I also don’t want to start an entirely new topic when I literally got mine working based on this exact post.

Basically ithread.h was replaced as a dependency. I had to update this file:
src/upnp_renderer.c
and change the line
#include ithread.h
to
#include pthread.h

and then add a command to the end of the dockerfile to make files under /etc/services.d/ executable.
RUN chmod -R +x /etc/services.d/