MPD Device is not visible in HA

Hi,
MPD is installed and running successfully. Log is clean and no error in the the logs.

As you see in the log, I was able to use the yMPD on the sidebar and successfully play mp3 file on the speaker connected to Pi 4.
Below is my HA info

The configuration file also has the correct info.

However, I am unbale to see the MPD device/entity in HA. I cannot see it in Automation nor in Developer tools.

For past two days I have been searching the net and this forum and have not been able to found any answers to my issue. May be I have not been looking in the right place and I am sorry for that.
I am not a savvy in HA and don’t know where to look to find why it is not showing up as device.
Not sure if it is related, I found the following in the Audio log and check the github and seems there is no solution for this yet.

E: [alsa-sink-bcm2835 Headphones] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write.

E: [alsa-sink-bcm2835 Headphones] alsa-sink.c: Most likely this is a bug in the ALSA driver ‘(null)’. Please report this issue to the ALSA developers.

As you see I have VLC via Telnet installed on HA because could not get MPD showing up. And you may ask why aren’t you using the VLC. My problem with VLC is that when I try play a file using automation or Developer tool. It plays only the first file I played to test it. It will not play any other files. When I pass the file it keep play the old file. It seems it has cached the file and I can clean the cache. I clean use the clean playlist (which I don’t have any) but nothing changes.
I thought may be VLC intervene with MPD so I did uninstall it still the could not see MPD.

I appreciate your help in advance.

Your MPD installation is probably an addon and you need an integration to interact with it.
MPD is normally found automatically, but yours are running on localhost (127.0.0.1) and that might cause the discovery to fail.

You might have to add it manually by going to settings and opening up the section for integrations, then clicking the add integration button and search for Music Player Demon (MPD).
When clock bg install the guide should steer you through the setup

Hi Wally, Thank you for your reply and spot on on the answer. The integration was missing and I added however, I still cannot see the entity.

I added the integration under the Host 127.0.0.1 and did not work. Then I changed the host name to what MPD service is running in the Configuration file. Then added the integration and still Entity is not available. I tired with HA IP address as well, ended up with same result.

I restarted the HA and now I see this error
image
I removed the commented out the Media player section for MPD and error is gone but integration is not working
Now I see the following error

That sounds like you have something added to your configuration.yanl and the integration have a GUI setup instead.

Below is my Configuration file. It does not have much

You probably need to remove the media_player entry with the 3 lines below it, then restart your HA and go to the settings and add the integration there.

correct, MPD is no longer setup via Yaml in the configuration file, but via the UI, see Music Player Daemon (MPD) - Home Assistant

did it and no change.
I am still getting the following error:
media_player.music_player_daemon unavailable

Going to remove the VLC and MPD and reinstall the MPD see if it works

Removed the VLC and MPD. Reinstalled MPD and use all following options for host when adding integration and still cannot get the integration working

68413af6-mpd
127.0.0.1
HA IP

I get the error media_player.music_player_daemon off

I have no idea how a localhost address works in relation with a docker container.
Can you reconfigure your MPD player to use another IP address or simply bind to all addresses (typical by using the address 0.0.0.0)?

I would but I do not know how. I will try to research the topic and see what I find

In case you haven’t yet, you need to restart Home Assistant anytime you add an integration so that HA sees it properly.

Yes I have reboot the HA and system and still not working.

Ok , Everything is working now.
What let me to figure out my problem was that there was no issue.
It seams the deamon by defult is set to off and in the automation you have to turn the MPD player on first then you can play the file.
What led me to this was the UI for Mobile where it shows a Power button beside the entity where you can turn it on. However, all along I was looking at the entity on desktop browser where it does not show the Power button beside the entity. (Picture that was posted 6 days ago)
I don’t recall the documentation said anything about the powering on the player in automation.
So, here is the action section of the automation for the MPD

Does anyone know why the HA UI on the desktop is not the same as mobile APP?

I will give my vote to Wally as he is first respond was a key

Either cache issue.
In Androidyou can clear the frontend cache through the settings → Companion App → Troubleshooting (I think that is the path to it. I am going off my head at the moment, but it is somewhere in the Companion app section).

Or it is due to screen resolutions.
You do not say what is different, so it can just be something with how the hardware is defined.

Most of us do not care about the vote.
The important thing is you got it to work.
The vote is mostly to quickly guide the next user with this problem to the solution, but here they may have to read the thread.
There are a lot of good things in the thread, so no problem. :slight_smile: