music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.4k stars 51 forks source link

Voice commands no longer working in Music Assistant #3132

Closed nikito closed 3 weeks ago

nikito commented 3 weeks ago

What version of Music Assistant has the issue?

2.4.0b4

What version of the Home Assistant Integration have you got installed?

2024.11.0

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

When issuing any voice command, such as "Play music by X", the command fails and results in the following errors:

Logger: homeassistant.helpers.intent
Source: helpers/intent.py:142
First occurred: 3:03:46 PM (13 occurrences)
Last logged: 3:19:39 PM

Error handling MassPlayMediaOnMediaPlayer
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/intent.py", line 142, in async_handle
    result = await handler.async_handle(intent)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mass/intent.py", line 121, in async_handle
    await mass.player_queues.play_media(
  File "/usr/local/lib/python3.12/site-packages/music_assistant_client/player_queues.py", line 208, in play_media
    await self.client.send_command(
  File "/usr/local/lib/python3.12/site-packages/music_assistant_client/client.py", line 250, in send_command
    await self.connection.send_message(command_message.to_dict())
  File "/usr/local/lib/python3.12/site-packages/music_assistant_client/connection.py", line 125, in send_message
    await self._ws_client.send_json(message, dumps=json_dumps)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_ws.py", line 240, in send_json
    await self.send_str(dumps(data), compress=compress)
                        ^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/music_assistant_client/helpers.py", line 92, in json_dumps
    return orjson.dumps(
           ^^^^^^^^^^^^^
TypeError: default serializer exceeds recursion limit
Logger: py.warnings
Source: components/openai_conversation/conversation.py:
First occurred: 3:03:46 PM (4 occurrences)
Last logged: 3:19:39 PM

/usr/src/homeassistant/homeassistant/components/openai_conversation/conversation.py:-1: RuntimeWarning: coroutine 'Music.get_item_by_name' was never awaited

How to reproduce

Issue any voice command, such as "Play music by x" or "Play the x playlist".

Music Providers

Spotify, SiriusXM

Player Providers

Chromecast

Full log output

music-assistant.log

Additional information

No response

What version of Home Assistant Core are your running

2024.10.4

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)

paducz commented 3 weeks ago

Same here

OzGav commented 3 weeks ago

Yes it appears assist is not yet in the revamped integration. Please go back to the previous if you need that.

OzGav commented 3 weeks ago

This has been fixed in 2024.11.1