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.39k stars 51 forks source link

Setting player error #1199

Closed chanha0406 closed 1 year ago

chanha0406 commented 1 year ago

What version of Music Assistant has the issue?

2.0.0b27

The problem

Nothing shows up in Settings -> Player.

How to reproduce

Go to Settings -> Player

Relevant log output

2023-04-18 18:11:53 WARNING asyncio -- Executing <Task finished name='Task-2' coro=<run..new_coro() done, defined at /usr/local/lib/python3.11/site-packages/aiorun.py:227> result=None> took 0.811 seconds 2023-04-18 18:11:55 ERROR music_assistant.websocket_api -- [140395371654928] Error handling message: CommandMessage(message_id=9, command='config/players', args=None) Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/music_assistant/server/providers/websocket_api/init.py", line 219, in _run_handler result = handler.target(args) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/config.py", line 240, in get_player_configs for player_id, raw_conf in self.get(CONF_PLAYERS).items() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'items' 2023-04-18 18:11:58 ERROR music_assistant.websocket_api -- [140395371654928] Error handling message: CommandMessage(message_id=12, command='config/players', args=None) Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/music_assistant/server/providers/websocket_api/init.py", line 219, in _run_handler result = handler.target(args) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/config.py", line 240, in get_player_configs for player_id, raw_conf in self.get(CONF_PLAYERS).items() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'items' 2023-04-18 18:12:13 ERROR music_assistant.websocket_api -- [140395389199952] Error handling message: CommandMessage(message_id=9, command='config/players', args=None) Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/music_assistant/server/providers/websocket_api/init.py", line 219, in _run_handler result = handler.target(**args) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/config.py", line 240, in get_player_configs for player_id, raw_conf in self.get(CONF_PLAYERS).items() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'items'

Additional information

No response

What version of Home Assistant Core are your running

2023.04.0

What type of installation are you running?

Home Assistant Supervised

On what type of hardware are you running?

Linux

OzGav commented 1 year ago

What players do you expect to see though? Are they all on the same subnet as the MA server?

chanha0406 commented 1 year ago

What players do you expect to see though? Are they all on the same subnet as the MA server?

image

Galaxy Home Mini is already connected on HA.

OzGav commented 1 year ago

What is the IP of the host for your MA server and what is the IP for your Galaxy Mini?

chanha0406 commented 1 year ago

it under same network 192.168.1.*

is there a way to set up Player manually?

OzGav commented 1 year ago

I don’t know what that device supports. If it doesn’t support one of these player providers then it won’t work at the moment https://github.com/orgs/music-assistant/discussions/710#discussioncomment-3343044

In the next couple of weeks the HA integration will be released which will expose HA media player entities to MA but there may be limitations in what MA features are supported. What those limitations are, if any, won’t be known until the integration is complete.

Let us know if you think it should be discovered if it supports one of the player providers

OzGav commented 1 year ago

@marcelveldt I am not sure if the error is due to this being an unsupported player or if it s a bug?

erkr commented 1 year ago

A player config error was fixed in b28, so please check if this still fails in the latest b29

marcelveldt commented 1 year ago

It seems to be a DLNA player, good chance this is indeed now fixed in b29

OzGav commented 1 year ago

@chanha0406 has this been fixed in b29?

chanha0406 commented 1 year ago

@chanha0406 has this been fixed in b29?

it not works on 29b.

OzGav commented 1 year ago

Is the log entry exactly the same as before?

chanha0406 commented 1 year ago
2023-04-24 12:41:34 WARNING asyncio  -- Executing <Task finished name='Task-2' coro=<run.<locals>.new_coro() done, defined at /usr/local/lib/python3.11/site-packages/aiorun.py:227> result=None> took 0.810 seconds
2023-04-24 12:41:39 ERROR music_assistant.websocket_api  -- [139627176063504] Error handling message: CommandMessage(message_id=8, command='config/players', args={})
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/providers/websocket_api/__init__.py", line 229, in _run_handler
    result = handler.target(**args)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/config.py", line 269, in get_player_configs
    for player_id, raw_conf in self.get(CONF_PLAYERS).items()
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'items'

like this..

Can't I use it with my Galaxy Home Mini? ( I have tested the Galaxy Home Mini to work as a DLNA player with Android phone. )

Can I get a list of tested devices?

OzGav commented 1 year ago

There is no listed of tested devices. As you are the only person reporting this we will hold this here for now and monitor for other DLNA issues.

OzGav commented 1 year ago

@chanha0406 please advise if this is still an issue with beta 36

OzGav commented 1 year ago

We will close this soon unless it is still an issue.