Media player entity not created
Opened this issue ยท 24 comments
I have two devices using HASS.Agent:
- 1st one working fine, integration set up notification service and media player entity exist
- 2nd one: integration only created the notification service but not the media player entity.
During HA Core restart and autodiscovery of the HASS.Agent integration for 2nd device, there was no audio program running (other than for the 1st device).
So after the initial integration adding I tried several times:
- start a program like Spotify and play music
- restart HA
- reload HASS.Agent integration for 2nd device
Nothing helped, there's no media player entity showing up for that device.
In MQTT browser I still only see one entry in hass.agent / media_player
.
Is there a certain rain dance ceremony needed for adding the media player?
Oh man... no it wasn't. What a shame. I was sure either I configured both machines completely identically or it was enabled by default.
HASS.Agent is now restarted. What's needed to make the entity appear in the HASS.Agent integration in HA? I try to avoid restarting HA Core if possible...
Note: reloading the integration from the UI did not make the media player entity appear.
OK, that's interesting: the checkbox disappears.
Main screen:
As you can see, local API is not enabled. The media settings section states "local API is needed", but that seems to be an outdated information. Proof: on machine number 1 the media player is working very well and it also does not use the local API.
Hello.
Actually I have the same issue on a recent installation. HA has been restarted several times since the HASS.Agent install, as has the Windows PC that is running the agent.
All the other sensors are there and fine, but the media player is not showing up - yet it has for previous Windows devices.
Are there any other local permissions we can look at providing?
@loryanstrant is your GUI setting keeping the tick? As stated my affected client does not.
@loryanstrant is your GUI setting keeping the tick? As stated my affected client does not.
My tick stays there, but it doesn't do anything.
it doesn't do anything
Like the progress in this issue ๐
Unfortunately there seems to be nothing from a user perspective to test or provide. Sit & wait mood activated...
Bump-i-di-bump
@bcutter maybe this helps you.
I had this issue for quite a while and was able to solve it by removing an old reference of my previous computer in the MQTT server. It retained the computer (different name) in the hass.agent/media_player
topic, and after removing the entire hass.agent
topic, removing the hass.agent integration in homeassistant, restarting homeassisant and adding it using the auto-discovery made it all work again.
Use https://github.com/thomasnordquist/MQTT-Explorer to connect to your MQTT server and check to see if there is any old/different PC names under the hass.agent/media_player
topic
It retained the computer (different name) in the
hass.agent/media_player
topic, and after removing the entirehass.agent
topic, removing the hass.agent integration in homeassistant, restarting homeassisant and adding it using the auto-discovery made it all work again.
Thank you, this helped me.
@bcutter maybe this helps you.
I had this issue for quite a while and was able to solve it by removing an old reference of my previous computer in the MQTT server. It retained the computer (different name) in the
hass.agent/media_player
topic, and after removing the entirehass.agent
topic, removing the hass.agent integration in homeassistant, restarting homeassisant and adding it using the auto-discovery made it all work again.Use https://github.com/thomasnordquist/MQTT-Explorer to connect to your MQTT server and check to see if there is any old/different PC names under the
hass.agent/media_player
topic
You are a life saver! Thank you for sharing this.
@bcutter maybe this helps you.
I had this issue for quite a while and was able to solve it by removing an old reference of my previous computer in the MQTT server. It retained the computer (different name) in the
hass.agent/media_player
topic, and after removing the entirehass.agent
topic, removing the hass.agent integration in homeassistant, restarting homeassisant and adding it using the auto-discovery made it all work again.Use https://github.com/thomasnordquist/MQTT-Explorer to connect to your MQTT server and check to see if there is any old/different PC names under the
hass.agent/media_player
topic
Unfortunately this did not work out for me: in the hass.agent topic there's only one media player topic - the one from the other machine working fine.
The issue is, that this media player topic is not created at all for the machine...
@bcutter maybe this helps you.
I had this issue for quite a while and was able to solve it by removing an old reference of my previous computer in the MQTT server. It retained the computer (different name) in thehass.agent/media_player
topic, and after removing the entirehass.agent
topic, removing the hass.agent integration in homeassistant, restarting homeassisant and adding it using the auto-discovery made it all work again.
Use https://github.com/thomasnordquist/MQTT-Explorer to connect to your MQTT server and check to see if there is any old/different PC names under thehass.agent/media_player
topicUnfortunately this did not work out for me: in the hass.agent topic there's only one media player topic - the one from the other machine working fine.
The issue is, that this media player topic is not created at all for the machine...
If it's not created, then you have to start over. But before you go that route, make sure that media player is enabled in the Hass Agent on the machine that's missing. I'd start here:
Close HASS.Agent
Uninstall the addon from Home Assistant (HA)
Restart HA
Install the addon
Restart HA
Start HASS.Agent
That's a wild route. Next to killing my working machine this way, it also ignores the discovered behavior in HASS.Agent on the endpoint itself:
Before purging the whole (working) environment I would like to make sure it's not an endpoint thing - which it tastes like at the moment.
Tried all of solutions, mentioned here. Nothing worked. Media_player topic is not created. And the Media checkbox dissappears after hass.agent restart.
Don't know what to do.
Tried all of solutions, mentioned here. Nothing worked. Media_player topic is not created. And the Media checkbox dissappears after hass.agent restart.
Don't know what to do.
I know it's been a while but I would suggest making a github issue over on the Hass agent github(the app one). Because if no mqtt message is being added then it is nothing Todo with the integration and this repo.
@Bajkot @bcutter could you please enable the debug logging option and upload logs from the "scenario" where the checkbox dissapears? Basically:
- enable extended logging
- tick the media player checkbox
- wait a few seconds
- restart HASS.Agent
@DrR0X-glitch is right that if the MQTT mesage is not published this is most likely a HASS.Agent issue and not the integration's fault.
The provided logs will allow me to verify this and have some starting point for the investigation - I'll create a HASS.Agent issue then to cover this.
for me its still not working.. im out of ideas what to do.. everythiing is up to date, still no media players from windows 11 pc
Did you try the forked version?
Did you try the forked version?
what fork? Agent fork or the integration in HA fork?
Can you point me to that fork?
I used the HACS the agent integration that is 3months old (it says that in the HACS store page).
Then i got the client for windows from official https://github.com/hass-agent/HASS.Agent repo
Then i got the client for windows from official https://github.com/hass-agent/HASS.Agent repo
Yes that's the actively maintained fork. The original repo we're tracking this issue here seems to be currently unmaintained.
So after a lot of searching, I stumbled upon this thread.
Uninstalling the existing HASS.Agent integration in HA (also removing all existing entities) and then reinstalling the one here (mentioned in the thread above) worked. I now have the media player entity in HA and can control music playing in a chrome browser on my windows machine from HA.