Closed lafriks closed 3 months ago
Same issue here, but for me nothing works on a sonos group created in MA.
This should be fixed in b130. Advise if not and we can reopen
I have tried testing this, but no luck. I can not even get my sonos speakers enabled and working. They are found as an airplay device, but not as a sonos device.
If I reboot the devices they work (most of the time) but then If I update or restart the system running HA and MASS, the same issue repeats itself.
Then tested the announcement on all downstairs speakers, of which one was offline and this did not work at all:
2024-04-07 19:50:48.194 INFO (MainThread) [music_assistant.players] Playback announcement to player Kantoor (with pre-announce: False): http://192.168.207.101:8123/api/tts_proxy/77af72a57f38ac0df3a439f13e895b6da576dad1_nl-nl_6e8b81ac47_cloud.mp3
2024-04-07 19:50:48.194 DEBUG (MainThread) [sonos_websocket.websocket] Opening websocket to wss://192.168.207.243:1443/websocket/api
2024-04-07 19:50:48.194 ERROR (MainThread) [music_assistant.webserver] Error handling message: players/cmd/play_announcement: unhandled errors in a TaskGroup (2 sub-exceptions)
2024-04-07 19:50:52.576 WARNING (MainThread) [music_assistant.players] Detected announcement request to an inactive playergroup, this will be redirected to the individual players.
2024-04-07 19:50:52.576 INFO (MainThread) [music_assistant.players] Playback announcement to player Kantoor (with pre-announce: False): http://192.168.207.101:8123/api/tts_proxy/77af72a57f38ac0df3a439f13e895b6da576dad1_nl-nl_6e8b81ac47_cloud.mp3
2024-04-07 19:50:52.576 DEBUG (MainThread) [sonos_websocket.websocket] Opening websocket to wss://192.168.207.243:1443/websocket/api
2024-04-07 19:50:52.576 ERROR (MainThread) [music_assistant.webserver] Error handling message: players/cmd/play_announcement: unhandled errors in a TaskGroup (2 sub-exceptions)
2024-04-07 19:51:01.214 WARNING (MainThread) [music_assistant.players] Detected announcement request to an inactive playergroup, this will be redirected to the individual players.
2024-04-07 19:51:01.214 INFO (MainThread) [music_assistant.players] Playback announcement to player Kantoor (with pre-announce: False): http://192.168.207.101:8123/api/tts_proxy/77af72a57f38ac0df3a439f13e895b6da576dad1_nl-nl_6e8b81ac47_cloud.mp3
2024-04-07 19:51:01.214 DEBUG (MainThread) [sonos_websocket.websocket] Opening websocket to wss://192.168.207.243:1443/websocket/api
2024-04-07 19:51:01.214 ERROR (MainThread) [music_assistant.webserver] Error handling message: players/cmd/play_announcement: unhandled errors in a TaskGroup (2 sub-exceptions)
2024-04-07 19:51:25.709 WARNING (MainThread) [music_assistant.players] Detected announcement request to an inactive playergroup, this will be redirected to the individual players.
2024-04-07 19:51:25.709 INFO (MainThread) [music_assistant.players] Playback announcement to player Kantoor (with pre-announce: False): http://192.168.207.101:8123/api/tts_proxy/aa9609a82e51cdbc0f55aee98c12f96707b8e8d5_nl-nl-coletteneural_-_edge_tts.mp3
2024-04-07 19:51:25.709 DEBUG (MainThread) [sonos_websocket.websocket] Opening websocket to wss://192.168.207.243:1443/websocket/api
2024-04-07 19:51:25.710 ERROR (MainThread) [music_assistant.webserver] Error handling message: players/cmd/play_announcement: unhandled errors in a TaskGroup (2 sub-exceptions)
I tried multiple tts services with the same result.
If I try this on a group that only contains online speakers it now works and it works well, but this is pretty much unusable as there will be no guaranty that all spreakers will be alway online ( I also have battery powered sonos devices)
@HA-TB303 you are adding to a closed issue. It is a fluke we noticed this. Please open a Q&A discussion or an issue if you think something is actually broken. I can't tell what the problem is from what you ahve posted above, Make sure you review all our docs especially the troubleshooting page.
@OzGav you would be right, if you would have granted us time to confirm the issue is resoved.... You closed without any confirmation and then said yourself you would re-open this ticket if not resolved....
This should be fixed in b130. Advise if not and we can reopen
So what do you want me to do? You want me to open A identical new ticket, or re-open this one as the problem is not resolved yet?
I think your issue might be a different one as for me at least announcements do work on Sonos group
I don't know. I'm not doing anything special...
Create a sonos group:
Check if it exists:
tts to it:
Result:
Logger: homeassistant.components.websocket_api.http.connection
Bron: custom_components/mass/media_player.py:485
integratie: Home Assistant WebSocket API (documentatie, problemen)
Eerst voorgekomen: 14:43:37 (2 gebeurtenissen)
Laatst gelogd: 14:46:32
[139944312487744] Error handling message: Unknown error (unknown_error) Michel from 192.168.207.5 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0)
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 794, in handle_execute_script
script_result = await script_obj.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1713, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 509, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 539, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 507, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 736, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tts/legacy.py", line 159, in async_say_handle
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/mass/media_player.py", line 438, in async_play_media
await self._async_play_media_advanced(
File "/config/custom_components/mass/media_player.py", line 485, in _async_play_media_advanced
await self.mass.players.play_announcement(
File "/usr/local/lib/python3.12/site-packages/music_assistant/client/players.py", line 132, in play_announcement
await self.client.send_command(
File "/usr/local/lib/python3.12/site-packages/music_assistant/client/client.py", line 174, in send_command
return await future
^^^^^^^^^^^^
music_assistant.common.models.errors.MusicAssistantError: unhandled errors in a TaskGroup (1 sub-exception)
What version of Music Assistant has the issue?
2.0.0b129
What version of the Home Assistant Integration have you got installed?
2024.3.3
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
When calling TTS say service and as media player specifying sonos group created in MA UI error is shown and nothing is played on speakers
How to reproduce
Create SONOS speaker group Call TTS say service in HA and specify group media player
Music Providers
Home assistant TTS say service
Player Providers
Tried both SONOS and universal group
Full log output
2024-04-01 15:12:35.582 INFO (MainThread) [music_assistant.players] Playback announcement to player All rooms (with pre-announce: None): http://10.X.X.X:8123/api/tts_proxy/32d4d9e071d3bc1ba41d5d22e7c5cf55b631a7c7_lv-lv-everitaneural_-_edge_tts.mp3 2024-04-01 15:12:35.582 ERROR (MainThread) [music_assistant.webserver] Error handling message: players/cmd/play_announcement: 'syncgroup_c9lsrpgy' 2024-04-01 15:15:50.908 ERROR (MainThread) [music_assistant.webserver] Error handling message: players/queue/play: Player Main room can not accept play_media command, it is synced to another player.
Additional information
HA errors:
and
What version of Home Assistant Core are your running
2024.03.1
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
ODROID