MPD troubleshooting

Hi,

I’m trying to troubleshoot problems related to TTS and MPD player. Here is my set up:

  1. Home Assistant (“HA” at 192.168.2.20) is running on a dedicated server machine and uses a self signed certificate.
  2. MPD is running on my desktop (“Client” at 192.168.5.2) machine and have the root certificate of HA installed as I am able to access HA UI (port 8123) via Client using https.
  3. On client, I have confirmed running MPD player locally using ncmpcpp.
  4. The configuration in HA for the media player is as follows:
# Media Player configuration
media_player:
  - platform: mpd
    name: client_mpd
    host: 192.168.5.2
  1. From HA machine, I am able to ping Client so firewall rules are OK.
  2. When I restart the HA machine, on Client machine (tail -f /var/log/mpd/mpd.log) I do see a request come from HA machine so all seems good.
Oct 08 16:11 : client: [2] opened from 192.168.2.20:48648
Oct 08 16:11 : client: [2] process command "commands"
Oct 08 16:11 : client: [2] command returned 0
Oct 08 16:11 : client: [2] process command "status"
Oct 08 16:11 : client: [2] command returned 0
Oct 08 16:11 : client: [2] process command "currentsong"
Oct 08 16:11 : client: [2] command returned 0
Oct 08 16:11 : client: [2] process command "readpicture "1.mp3" "0""
Oct 08 16:11 : mad: detected LAME version 3.99 ("LAME3.99r")
Oct 08 16:11 : mad: LAME peak found: 0
Oct 08 16:11 : mad: encoder delay is 576, encoder padding is 1297
Oct 08 16:11 : client: [2] command returned 0
Oct 08 16:11 : client: [2] process command "albumart "1.mp3" "0""
Oct 08 16:11 : client: [2] command returned 3
Oct 08 16:11 : client: [2] process command "listplaylists"
Oct 08 16:11 : client: [2] command returned 0
Oct 08 16:11 : client: [2] process command "idle "database""
Oct 08 16:11 : client: [2] command returned 1
Oct 08 16:12 : client: [2] process command "status"
Oct 08 16:12 : client: [2] command returned 0
Oct 08 16:12 : client: [2] process command "currentsong"
Oct 08 16:12 : client: [2] command returned 0
Oct 08 16:12 : client: [2] process command "idle "database""
Oct 08 16:12 : client: [2] command returned 1
  1. In the developers tools, the state of client_mpd is shown as “off” and not sure if this normal or a problem. When I try to invoke tts service from the developer tools, I get an error which towards the bottom lines seems related to this call and the timestamp is also very close.
2022-10-08 16:12:46.783 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1:
2022-10-08 16:12:46.785 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140331419113392] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 648, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 409, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 453, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 216, in async_say_handle
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 207, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/mpd/media_player.py", line 443, in async_play_media
play_item = await media_source.async_resolve_media(
File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 155, in async_resolve_media
return await item.async_resolve()
File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 83, in async_resolve
return await self.async_media_source().async_resolve_media(self)
File "/usr/src/homeassistant/homeassistant/components/tts/media_source.py", line 125, in async_resolve_media
if manager.base_url and manager.base_url != get_url(self.hass):
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 201, in get_url
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError
  1. And I also have following in my configuration.yaml:
tts:
  - platform: google_translate
    base_url: "https://192.168.2.20:8123"
    language: 'en'

And the weird thing is that it was working till last few weeks (with https) and I have not tweaked any of the above configurations.

Please let me know if you see anything odd or can help troubleshoot this one.
Thanks.