MPD for HA TTS

Has anyone had any luck getting MPD installed on a remote Raspberry (not hosted with HASS) and using it for HA TTS.

I can’t seem to get it to play the stream that HA sends

Works for me.

~Cheers

I was using MOPIDY not MPD, uninstalled mopidy , installed MPD and now its working , although it sometimes cuts off the beginning of the MP3 it works very well.

1 Like

@PhyberApex can you please tell me your configuration for MPD and how did you install MPD on your pi which is not running HASS?

Thanks.

I just apt-get installed it. Nothing else really…What gives you trouble?

~Cheers

Well I done the same as you but mine is flaky. It would play fine and then all of a sudden becomes unavailable until I restart the host running MPD or HA.

Do you experience the same?

No absolutely no problems on my end. What kind of Pi / OS are you using? And are you using the onboard sound or do you have some sort of addon for that?

~Cheers

Well I have installed mpd on a rpi1 debian jessie. The rpi1 is solely used for mpd purposes.

I don’t have any additional sound add on. I have just plugged some speakers in the 3.5mm jack.

If it is not working like that (which it should) you could try something like this https://github.com/pimusicbox/pimusicbox. Maybe this is more stable for you.

~Cheers

I have tried pimusicbox and I had similar issues to the ones I have now with mpd.

How else can I connect my HA to pimusicbox on a different system? i.e. other then the mpd component?

That sounds to me like a hardware issue if nothing else…you COULD also try to install a auto running kodi…like osmc and try the kodi component…although that would seem like overkill to me and just to absolutly make sure it is not a hardware fault. This also only works if you are not using that pi for anything else then media playback.

~Cheers

Well what I did was installed mpd on a raspberry pi zero w and surprisingly it works perfectly fine. I guess it is the rp1 that’s causing the issue.

I now need to somehow plug a 3.5mm jack on the rpi zero w.

On a different note what raspbian are you running on the mpd host?

I am too using raspi zero W’s and I am using this for audio https://shop.pimoroni.de/products/phat-dac?utm_medium=cpc&utm_source=googlepla&variant=18061094788&gclid=Cj0KCQiAvrfSBRC2ARIsAFumcm_OC5IovkG5Redwu_d6wSd--l0FJbXOYUzeUN1ZldM-8cycC6JnVVIaApusEALw_wcB
can confirm that it works.

As for the OS I use RASPBIAN STRETCH LITE from the raspi site.

~Cheers

1 Like

@PhyberApex So I got the PHAT DAC installed on my rpi zero w and I have installed mpd by just sudo apt-get mpd and can play music via HA.

However I cannot control the volume of my mpd.

The setup I used for installing the PHAT DAC was the bash script by pimroni (https://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install).

Do you face similar issues?

No I did not have any issues with that. The volume regulation is kind of icky tho. Did you try to go all the way down and up? Also did you try another Upnp software to control the volume like BubbleUpnp?

~Cheers

I will look into BubbleUpnp thanks

@PhyberApex how did you install or set up your phat dac on your rpi zero w? And did you install mpd first or set up the phat dac ?

Thanks!

It’s been quite some time since I set it up. But I think it went like this.

  1. Setup DAC
  2. Install mpd
  3. Install upnpmpdcli (I don’t know if this is still necessary as it’s included in newer mpd packages apparently. And configure the name of the upnp renderer and stuff
  4. Install snapcast client and configure it to connect to the snapcast server

I don’t actually know if I ever used mpd to control the volume only upnp…I don’t use it in any automations.

~Cheers

1 Like

@PhyberApex so everything is sorted finally but now I go back to the same old issue of playing music on mpd running on my rpi zero w on a different network.

I have setup duckdns and letsencrypt on my rpi zero w and have tried to set up mpd on the pi which is running HA.

I get on the frontend MPD “Unavailable”

Here is my configuration.yaml:

  - platform: mpd
    host: https://XXXX.duckdns.org
    port: 6600

I have already tried different instances of the host i.e. http, without http etc. I have also tried the WAN ip address of the rpi zero w which is running the mpd but no joy at all.

Did you set up anything in the /etc/mpd.conf file?

I am going to pull my hair out on this MPD !!