Closed HA-TB303 closed 4 months ago
Is this a gen2 or gen 1 sonos device ?
Gen2 sonos arc, move 2, era 100, era300 and 1 roam
OK, looks like one of the players denied the request - I assume some of the players actually played the message ?
No, none of the speakers played the message. When i cast music to the same group, that does work on all speakers.
@HA-TB303 Can you recheck with the latest betas just to confirm there hasn't been any change in behaviour
Hi, no it still does not work. I also still have trouble getting all my Sonos speakers working within MA (some are found found but are marked with an hourglass) even though they work in HA and in the Sonos app. If I create a new group that contains available speakers only (in this case 'Keuken' en 'Kantoor'), it works most of the time, but that is just not usable, since some speakers are battery powered and thus not always connected to the network.
In MA: in HA:
HA: 2024.5.2 Supervisor: 2024.05.1 OS: 12.2 MA addon: 2.0.0b147 ( MA integration: 2024.5.0
Thanks it will be investigated in due course
Hi! I've also encountered this when I updated from b144 to 2.0.0. I have a sonos group made up of 3 symfonisk gen 2 and 1 era 100. I don't see any errors in logs though, the TTS just doesn't work. It also doesn't work when I target individual player entities exported by music assistant (but works when I target player entities from HA sonos integration). When I restored b144 from backup it started to work again.
Just tested this with the current version (2.0.6) and its working fine - can someone confirm that the issue is resolved ?
@HA-TB303 @vijexa Can one of you heck if this is still an issue?
Wow, great!
This:
service: mass.play_announcement
data:
use_pre_announce: true
announce_volume: 35
url: http://192.168.207.101:8123/local/audio/sire_er_is_post_voor.mp3
target:
entity_id: media_player.sonos_beneden
and this:
service: tts.cloud_say
data:
entity_id: media_player.sonos_beneden
message: Dit is een test.
Work great!
Just this doesn't, but might be unrelated as it also does not work for just one speaker. I took this example from the docs.
service: mass.play_media
data:
media_type: track
media_id: Queen - Innuendo
target:
entity_id: media_player.sonos_beneden
https://music-assistant.io/faq/massplaymedia/
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/mass/media_player.py", line 438, in _async_play_media_advanced
media_type=media_type,
^^^^^^^^^^^
File "/config/custom_components/mass/media_player.py", line 500, in _get_item_by_name
)
File "/usr/local/lib/python3.12/site-packages/music_assistant/client/music.py", line 199, in get_library_artists
return PagedItems.parse(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/common/models/media_items.py", line 620, in parse
items=[item_type.from_dict(x) for x in raw["items"]],
~~~^^^^^^^^^
TypeError: list indices must be integers or slices, not str
I also found an issue in the HA integration. Can you check the HA integration update 2036.6.2 ?
I tested all three service calls using versions 2.0.7 and 2024.6.2, and everything works great now!
You all did fantastic work on this! I will start using this in 'production' now, and if anything comes up, I'll report it.
Thanks again!
What version of Music Assistant has the issue?
2.0.0b136
What version of the Home Assistant Integration have you got installed?
2024.4.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 casting to a Sonos group created in MASS tts fails.
How to reproduce
Create a Sonos group:
Verify if it exists:
Verify if music can be played to it:
This works...
This fails..
Music Providers
n/a
Player Providers
Sonos
Full log output
Full mass log:
Additional information
Tried other tts servies, same result...
What version of Home Assistant Core are your running
2024.4.3
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Generic x86-64 (e.g. Intel NUC)