H
passive-yellow
Media Player troubleshooting
hi, I have installed the Hass.Agent (2) on my PC and the forked integration on HA via HACS. I have been trying to get media player to work. My PC shows up as a media player in Home Assistant, but I cannot get it to actually play any audio. I have tried both TTS and playing a media file stored in home assistant. both tts and the file play fine through the browser, but when I select the pc media player as the output, it accepts the command (green checkmark) but nothing happens. Nothing in the logs either. Strangely, the gui media controls in home assistant like resume and pause do work if something is already playing on my pc. Any assistance would be very appreciated!
8 Replies
Can you go into configuration > logging and enable extended logging
Then restart hass.agent, try playing audio and then upload the most recent log here, U can open it and just copy paste any errors if U don't want to show Ur machine name
passive-yellowOP•2mo ago
thank you. all the stuff between "<" ">" are things I removed from the logs. let me know if any of that is necessary to diagnose
passive-yellowOP•2mo ago
looks like HASS.Agent is not able to download the file
if you put the URL to the file into an incognito browser window, does it download?
is the HAdockerIP the same as you've configured in HASS.Agent for HA connection?
passive-yellowOP•2mo ago
no, the file does not download (no response). Also, the IP is not what I configured in HASS.agent for the HA connection. In the logs, it is a 172.16 IP, but the hosting server is a 168.192 IP (that's why I said docker container ip rather than server ip). To access HA in the browser I would use the server IP and the HA-Port, which is what I configured in the HASS.agent settings.
ok, so it looks like there is a permission issue to access the file, if the resource URL is at the same IP/domain as the HA configured in HASS.Agent, HASS.Agent will use the also configured token to authenticate itself when accessing X or Y within HA
now the question is why can't you download the file
passive-yellowOP•2mo ago
well I think it is because it is using the docker container internal ip (172.16.x.x) rather than the hosting server ip (192.168.x.x). the docker container ip is not accessible outside of the docker container. I configured HASS.agent to use the server ip, but for some reason it seems to be using the docker container ip for this purpose. If I use the url from the logs, but replace the docker container ip with the server ip, I can download/play the file.
Is is possible that part of the auto discovery process with the HASS.agent integration would set the IP for media player to whatever the home assistant instance reports as its own ip? because that would be the docker container ip.
passive-yellowOP•2mo ago
ah. I found it... in Home Assistant Network settings, the Automatic setting in local network was offering the docker container IP. Setting it manually to the server IP (or dns proxy) works. Thanks for getting me pointed in the right direction 👍
