Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromecast speaker goes unavailable once a while #1409

Closed
V69dxz opened this issue Jul 29, 2023 · 13 comments
Closed

Chromecast speaker goes unavailable once a while #1409

V69dxz opened this issue Jul 29, 2023 · 13 comments

Comments

@V69dxz
Copy link

V69dxz commented Jul 29, 2023

What version of Music Assistant has the issue?

2.0.0b60

The problem

Chromecast speaker goes unavailable once a while:

  1. in the players pop up menu, the speaker (player) is greyed out and says 'idle'.
  2. in the players section under settings, there is an hour glass symbol shown next to the three dots.

I can reach the speaker through the Google Home app and the google cast integration in HA.

How to reproduce

I don't know yet. It happens once in a while. It seems related listening to Spotify music (children's books) for a while. Restarting HA brings the speaker back online.

Relevant log output

I am unsure which log files to include, but this morning -- before the error occurred again -- I got several of these errors. Please let me know if there is something else to look for.

2023-07-29 08:52:50.034 ERROR (MainThread) [music_assistant.webserver] [281473222236752] Error handling message: CommandMessage(message_id=49, command='players/queue/play_media', args={'queue_id': 'ugp_1', 'media': {'item_id': '24Rr00fR1Y5JVIevUKoMI2', 'provider': 'spotify', 'name': 'Dummie de mummie en de schat van Sohorro', 'provider_mappings': [{'item_id': '24Rr00fR1Y5JVIevUKoMI2', 'provider_domain': 'spotify', 'provider_instance': 'spotify', 'available': True, 'audio_format': {'content_type': 'ogg', 'sample_rate': 44100, 'bit_depth': 16, 'channels': 2, 'output_format_str': 'ogg', 'bit_rate': 320}, 'url': 'https://open.spotify.com/album/24Rr00fR1Y5JVIevUKoMI2', 'isrc': None, 'barcode': '4064067472015', 'details': None}], 'metadata': {'description': None, 'review': None, 'explicit': None, 'images': [{'type': 'thumb', 'path': 'https://i.scdn.co/image/ab67616d0000b2737ed0fe48c50365886d1e4b07', 'provider': 'url'}], 'genres': None, 'mood': None, 'style': None, 'copyright': '2018 Uitgeverij Unieboek | Het Spectrum bv', 'lyrics': None, 'ean': None, 'label': 'Van Goor', 'links': None, 'chapters': None, 'performers': None, 'preview': None, 'replaygain': None, 'popularity': None, 'last_refresh': None, 'checksum': None}, 'favorite': False, 'media_type': 'album', 'sort_name': 'dummie de mummie en de schat van sohorro', 'uri': 'spotify://album/24Rr00fR1Y5JVIevUKoMI2', 'timestamp_added': 0, 'timestamp_modified': 0, 'version': '', 'year': 2018, 'artists': [{'item_id': '202', 'provider': 'library', 'name': 'Tosca Menten', 'provider_mappings': [{'item_id': '0Dxt1dTA5GbW8HiIbZGI4v', 'provider_domain': 'spotify', 'provider_instance': 'spotify', 'available': True, 'audio_format': {'content_type': '?', 'sample_rate': 44100, 'bit_depth': 16, 'channels': 2, 'output_format_str': '?', 'bit_rate': 320}, 'url': 'https://open.spotify.com/artist/0Dxt1dTA5GbW8HiIbZGI4v', 'isrc': None, 'barcode': None, 'details': None}], 'metadata': {'description': None, 'review': None, 'explicit': None, 'images': [{'type': 'thumb', 'path': 'https://i.scdn.co/image/ab67616d0000b2737ed0fe48c50365886d1e4b07', 'provider': 'url'}], 'genres': None, 'mood': None, 'style': None, 'copyright': None, 'lyrics': None, 'ean': None, 'label': None, 'links': None, 'chapters': None, 'performers': None, 'preview': None, 'replaygain': None, 'popularity': None, 'last_refresh': None, 'checksum': None}, 'favorite': True, 'media_type': 'artist', 'sort_name': 'tosca menten', 'uri': 'library://artist/202', 'timestamp_added': 1690144380, 'timestamp_modified': 1690612665, 'mbid': None}], 'album_type': 'album', 'mbid': None}, 'option': 'replace', 'radio_mode': False, 'start_item': '52aTS9lYyACXnmJJbgwwsO'})
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/webserver.py", line 372, in _run_handler
    result = await result
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/player_queues.py", line 242, in play_media
    await self.play_index(queue_id, 0)
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/player_queues.py", line 527, in play_index
    await player_prov.cmd_handle_stream_job(player_id=queue_id, stream_job=stream_job)

AttributeError: 'NoneType' object has no attribute 'cmd_handle_stream_job'
2023-07-29 08:52:50.037 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Sysselt
2023-07-29 08:52:50.240 INFO (MainThread) [music_assistant.metadata] Unable to get musicbrainz ID for artist Tosca Menten
 - using lookup-album(s): Dirkje Bakkes, brandnetelspecialist/Prutsers en pechvogels/Dummie de mummie deel 0 (Een jonge prins in het oude Egypte)/Dummie de mummie en de schat van Sohorro/Dummie de mummie en het geheim van Toemsa/Dummie de mummie en de smaragd van de Nijl/Dummie de mummie en de drums van Massoeba/Dummie de mummie en de ster Thoeban/Dummie de mummie en de dans van de cobra/Dummie de mummie en het masker van Sebek-Ra/De wraak van Knor/Dummie de mummie en de sfinx van Shakaba/Dummie de mummie en de tombe van Achnetoet/Dummie de mummie en de gouden scarabee/Tom Piekepol en de schat van Kartoni
 - using lookup-track(s): Chapter 7.4 - Dummie de mummie en de schat van Sohorro/Chapter 2.2 - Prutsers en pechvogels/Chapter 1 & Chapter 2.1 - Prutsers en pechvogels/Chapter 2.3 - Prutsers en pechvogels/Chapter 6.5 & Chapter 7.1 - Dummie de mummie en de schat van Sohorro/Chapter 11.2 - Dummie de mummie en de schat van Sohorro/Chapter 5.4 - Dummie de mummie en de schat van Sohorro/Chapter 9.4 - Dummie de mummie en de schat van Sohorro/Chapter 10.5 - Dummie de mummie en de schat van Sohorro/Chapter 9.3 - Dummie de mummie en de schat van Sohorro

2023-07-29 08:52:53.347 ERROR (MainThread) [music_assistant.webserver] [281473222236752] Error handling message: CommandMessage(message_id=50, command='players/queue/play_pause', args={'queue_id': 'ugp_1'})
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/webserver.py", line 372, in _run_handler
    result = await result
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/player_queues.py", line 403, in play_pause
    await self.play(queue_id)
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/player_queues.py", line 380, in play
    await self.resume(queue_id)
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/player_queues.py", line 487, in resume
    await self.play_index(queue_id, resume_item.queue_item_id, resume_pos, fade_in)
  File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/player_queues.py", line 527, in play_index
    await player_prov.cmd_handle_stream_job(player_id=queue_id, stream_job=stream_job)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Additional information

I have another Google nest mini which does not has these issues.

I also experience issues with the Spotcast integration, don't know if they are related: fondberg/spotcast#397 . Sometimes I cannot activate the nest mini player through the media player front card, but can activate it on the integration page and, often I cannot start playing Spotify content through the media player.

Note that turning the Nest mini on through the integration page does not turn the speaker on on the Music Assistant page.

What version of Home Assistant Core are your running

2023.7.3

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

ODROID

@V69dxz V69dxz added the triage label Jul 29, 2023
@OzGav
Copy link
Contributor

OzGav commented Jul 30, 2023

Might be a problem with the device or a network issue?

@V69dxz
Copy link
Author

V69dxz commented Jul 30, 2023

Good suggestion to check, will do. But I would expect that the device becomes available after the connection is re-established.

Keep you posted.

@OzGav
Copy link
Contributor

OzGav commented Jul 31, 2023

I see you say restarting HA brings it back online, Did you mean MA?

@OzGav
Copy link
Contributor

OzGav commented Jul 31, 2023

Not sure why restarting HA will bring a MA player back online? Unless you are restarting the host. If so you should be able to just trying restarting the addon and that should fix it. Doesn't solve your original problem I know but just trying to minimise your pain. It will be difficult without logs to fix this. Exactly what type of speaker are you using? Do other speakers have this problem?

@V69dxz
Copy link
Author

V69dxz commented Jul 31, 2023

Thanks for the advice! Restarting MA (add on) makes sense and works.

  • It is a chrome cast speaker (nest mini). I included the logs in my original message. Please let me know if there are other logs / errors to check.
  • It seems not to be a network issue. Because if I block the network connection, the device is rediscovered by MA if I re-establish the connection.

I'll have limited time the next 2 weeks to check, but will continue with this after these 2 weeks.

@OzGav OzGav added the More info label Aug 4, 2023
@OzGav
Copy link
Contributor

OzGav commented Aug 13, 2023

Hi again. Checking how this is going. Please only test with the latest beta.

@V69dxz
Copy link
Author

V69dxz commented Aug 13, 2023

👋 back home. Will test the next few days.

Reading other issues, I saw that some people have issues with unifi networks (as is mine). So it might be a network issue after all.

Will keep you posted

@OzGav
Copy link
Contributor

OzGav commented Aug 21, 2023

Hi again. Just checking how this is going. We will need to close this soon if there is no more news.

@V69dxz
Copy link
Author

V69dxz commented Aug 22, 2023

Hello, I will close the issue. Last week I only experienced the issue once more. I will try to tweak the network settings, but don't have time for this in the next few weeks. If I come up with something I will share it here.

Thank you for all the work on MA!

@V69dxz V69dxz closed this as completed Aug 22, 2023
@V69dxz
Copy link
Author

V69dxz commented Aug 31, 2023

FYI,

I think I have found the issue. Every night around 3:00 am both my speakers become 'unavailable' in HA. The one in the bathroom changes to 'off' a few minutes later, but the other one (i.e., the problematic one) does not, and remains 'unavailable'.

What I have done is pinned the problematic one to the nearest Access Point (Unifi network) to force a better network connection hopefully.
Hope this work.

Have other users experienced the same problem?

@V69dxz V69dxz reopened this Aug 31, 2023
@OzGav
Copy link
Contributor

OzGav commented Aug 31, 2023

There is discussion about issues with Unifi networks if you don’t ensure the mdns traffic can flow freely. Check all the settings…

@OzGav
Copy link
Contributor

OzGav commented Sep 5, 2023

We will close this soon and ask you to report again if you have more info to add

@V69dxz
Copy link
Author

V69dxz commented Sep 5, 2023

I close this issue myself. The problem is unrelated to MA, but a more general issue in HA. Luckily I am not the only one experiencing these frustrating issues :(

@V69dxz V69dxz closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants