owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD audio server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.06k stars 235 forks source link

support for MQTT possible? #1371

Open kalle2000 opened 2 years ago

kalle2000 commented 2 years ago

Would it be possible to add support for MQTT to owntone? This would make it super easy to integrate it easily into many home automation platforms. On the one hand side owntone can push infos (e.g. track changes etc) to a MQTT server and on the other hand it could retrieve main commands (e.g. play, stop, pause, volume etc) from a MQTT server

kalle2000 commented 2 years ago

Does this reference help? https://github.com/mikebrady/shairport-sync/blob/master/mqtt.c

ejurgensen commented 2 years ago

The feature sounds fine, but I won't be adding this myself, since I wouldn't be using it and thus wouldn't be able to maintain it either.

clach04 commented 2 years ago

@kalle2000 you could try implementing a, external bridge (e.g. in Python). If that sounds daunting you could use https://github.com/jpmens/mqtt-launcher and some command line tools. This would allow control (but not viewing status), with a small amount of effort.

LordMyschkin commented 2 months ago

I just noticed there is a project wrapping mpd commands into mqtt: https://github.com/orbifly/mpd2mqtt?tab=readme-ov-file Maybe that solves that problem, although you have to run a docker image next to owntone