KoljaWindeler / ytube_music_player

YouTube music player for homeassistant
345 stars 53 forks source link

Can't get YouTube Music to play on either Acrylic or Sonos #350

Closed EvanWasHere-zz closed 4 months ago

EvanWasHere-zz commented 5 months ago

**Edit: Title should be Arylic, not Acrylic

I installed ytube_music_player and linked it to my YouTube Music account. I was successfully able to play YouTube Music from my Arylic and Sonos amps. I decided I didn't need Music Assistant anymore and uninstalled that. But then YouTube Music stopped playing on mini player. I spent hours trying to get it to work again before wiping Home Assistant and trying on a fresh install.

Won't play YouTube Music to either of those 2 amps. All that shows is time code counting up on left side while right side stays at 0:00. I tried playlists and individual songs. I tried a different account on Google. I tried signing in/out of google.

If I switch output to Google clock, then Ytube_music_player works right away. If I switch back to Sonos or Arylic, it stops. I can also play all other sources on the Sonos and Arylic amps.

I also tried reinstalling Music Assistant and couldn't recreate my original success.

Version All latest versions, including Ytube_music_player 20240517.01, mini music player v1.16.9,

This error keeps popping up in logs: Logger: custom_components.ytube_music_player.media_player Source: custom_components/ytube_music_player/media_player.py:277 integration: yTubeMediaPlayer (documentation, issues) First occurred: 11:59:57 AM (1 occurrences) Last logged: 11:59:57 AM

signature not found, decoding__

Another error I got when I first connected to my google account:

Logger: homeassistant Source: helpers/entity.py:984 First occurred: 11:57:59 AM (1 occurrences) Last logged: 11:57:59 AM

Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/config/custom_components/ytube_music_player/media_player.py", line 997, in async_select_source_helper return await self.async_select_source(source_entity_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ytube_music_player/media_player.py", line 1055, in async_select_source self.async_schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1254, in async_schedule_update_ha_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 997, in async_write_ha_state self._async_verify_state_writable() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 984, in _async_verify_state_writable raise NoEntitySpecifiedError( homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity ytube_music_player

Thanks

KoljaWindeler commented 4 months ago

Hi @EvanWasHere-zz .. this component is using the Build-in method of Homeassistant to send an URL to a media_player. if the media_player can stream from an URL it will play the song.

My google devices (nest-mini, chromecast etc) can do that .. as far as I'm aware Sonos can NOT do that. There is a workaround in place please read here https://github.com/KoljaWindeler/ytube_music_player?tab=readme-ov-file#proxy and try methode 2