parautenbach / hass-shairport-sync

A custom media player for Home Assistant that allows you to control and get updates from a Shairport Sync installation using MQTT.
Apache License 2.0
69 stars 12 forks source link

Recommendation for a docker-compose.yaml #20

Closed jperquin closed 5 days ago

jperquin commented 9 months ago

Hi there,

Kudo's for this development.

Any chance you can recommend a docker-compose config that works right out of the box with mqtt so that it reflects the compile options you suggested ( ./configure --with-mqtt-client --with-metadata)?

Thanks in advance, Joost

parautenbach commented 9 months ago

Thank you.

Unfortunately, I don't have a recommendation for you.

jperquin commented 9 months ago

Looking at this post https://github.com/mikebrady/shairport-sync/pull/1635 it appears that MQTT is integrated into the latest release. Any tips on debugging?

I have made the necessary adjustments to shairport-sync.conf but not seeing any traffic on my MQTT broker..

Thx, JP

mill1000 commented 9 months ago

Here's the MQTT config I use if that helps.

mqtt =
{
    enabled = "yes";
    hostname = "<redacted>";
    port = 1883;
    username = "<redacted>";
    password = "<redacted>";
    topic = "stereoberry/shairport";
    publish_parsed = "yes";
    publish_cover = "yes";
    enable_remote = "yes";
};
jperquin commented 9 months ago

Here's the MQTT config I use if that helps.

mqtt =
{
    enabled = "yes";
    hostname = "<redacted>";
    port = 1883;
    username = "<redacted>";
    password = "<redacted>";
    topic = "stereoberry/shairport";
    publish_parsed = "yes";
    publish_cover = "yes";
    enable_remote = "yes";
};

Thanks, mine looks the same.

Not sure if the standard docker image I pulled was compiled with MQTT enabled..

JP

mill1000 commented 9 months ago

I haven't tried the docker image, but if you exec a shell in the container you should be able to check. e.g.

pi@StereoBerry:~ $ shairport-sync --version
4.2-alac-OpenSSL-Avahi-ALSA-soxr-metadata-mqtt-mpris-sysconfdir:/etc
jperquin commented 9 months ago

That's a step in the right direction! :-)

This is what I am getting:

/ # shairport-sync --version 4.3.1-dirty-AirPlay2-smi10-alac-OpenSSL-Avahi-ALSA-pa-dummy-stdout-pipe-soxr-convolution-metadata-mqtt-dbus-mpris-sysconfdir:/etc

Still no chatter on my MQTT broker though..

mill1000 commented 9 months ago

Ok, try running with -vv and look in the output for MQTT messages. It should let you know if it connected ok

jperquin commented 9 months ago

Ok, try running with -vv and look in the output for MQTT messages. It should let you know if it connected ok

I am running shairport in docker. Where do I find the output?

mill1000 commented 9 months ago

There's a docker logs command, or you could exec into the container and run shairport directly.