Youtube Music - Media Browser

It should be related to the end of the first song to the start of the second, the parameter should be remote_player_state that goes from playing to idle. Is it waiting for a different parameter name?

Between the first song and the end of it when it should start de second one, but doesn’t…

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros: playing → idle

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_track

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - Playing track nr 2 / 25

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_url

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_check_api [E]

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - try to find URL on our own

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - self decoded URL via cipher

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_get_url

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - forwarding url to player media_player.casa_exceto_banheiros

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_extra_sensor [E]

2022-07-26 14:54:40 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros: idle → idle [E]

2022-07-26 14:54:41 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros: idle → idle [E]

2022-07-26 14:54:41 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros: idle → playing [E]

2022-07-26 14:54:41 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_extra_sensor [E]

2022-07-26 14:54:41 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_get_track

2022-07-26 14:54:41 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_sync_player

2022-07-26 14:54:42 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros: playing → buffering [E]

2022-07-26 14:54:42 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros: buffering → playing [E]

2022-07-26 14:54:43 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros: playing → playing [E]

2022-07-26 14:54:56 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros [E]

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player … media_player.casa_exceto_banheiros: playing → idle

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_track

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - Playing track nr 3 / 25

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_url

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_check_api [E]

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - try to find URL on our own

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] self.get_song(videoId=fiB-FCkhIzQ,signatureTimestamp=19198)

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player]

== == == == == == = ytube_music_player Integration Error == == == == == == == ==

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] unfortunately we hit an error, please open a ticket at

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] Issues · KoljaWindeler/ytube_music_player · GitHub

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] and paste the following output:

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] Traceback (most recent call last):

File “/config/custom_components/ytube_music_player/media_player.py”, line 1356, in async_get_url

File “/config/custom_components/ytube_music_player/media_player.py”, line 1356, in

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player]

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] == == == == == == = ytube_music_player Integration Error == == == == == == == ==

2022-07-26 15:01:12 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - forwarding url to player media_player.casa_exceto_banheiros

File “/config/custom_components/ytube_music_player/media_player.py”, line 776, in async_sync_player

File “/config/custom_components/ytube_music_player/media_player.py”, line 1318, in async_get_track

After having YouTube Music not working for months within HA I’ve tried to get it fixed.
I have had this is the error log for months:

2022-09-14 14:49:15.430 ERROR (MainThread) [custom_components.ytube_music_player.media_player]

== == == == == == = ytube_music_player Integration Error == == == == == == == ==

2022-09-14 14:49:15.431 ERROR (MainThread) [custom_components.ytube_music_player.media_player] unfortunately we hit an error, please open a ticket at

2022-09-14 14:49:15.431 ERROR (MainThread) [custom_components.ytube_music_player.media_player] https://github.com/KoljaWindeler/ytube_music_player/issues

2022-09-14 14:49:15.431 ERROR (MainThread) [custom_components.ytube_music_player.media_player] and paste the following output:

2022-09-14 14:49:15.432 ERROR (MainThread) [custom_components.ytube_music_player.media_player] Traceback (most recent call last):

File "/config/custom_components/ytube_music_player/media_player.py", line 1085, in async_update_playlists

self._playlists = await self.hass.async_add_executor_job(lambda: self._api.get_library_playlists(limit=self._trackLimit))

File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run

result = self.fn(*self.args, **self.kwargs)

File "/config/custom_components/ytube_music_player/media_player.py", line 1085, in <lambda>

self._playlists = await self.hass.async_add_executor_job(lambda: self._api.get_library_playlists(limit=self._trackLimit))

File "/usr/local/lib/python3.10/site-packages/ytmusicapi/mixins/library.py", line 27, in get_library_playlists

response = self._send_request(endpoint, body)

File "/usr/local/lib/python3.10/site-packages/ytmusicapi/ytmusic.py", line 142, in _send_request

raise Exception(message + error)

Exception: Server returned HTTP 401: Unauthorized.

You must be signed in to perform this operation.

2022-09-14 14:49:15.433 ERROR (MainThread) [custom_components.ytube_music_player.media_player]

thanks, Kolja

2022-09-14 14:49:15.433 ERROR (MainThread) [custom_components.ytube_music_player.media_player] == == == == == == = ytube_music_player Integration Error == == == == == == == ==

So I thought I would enter a new cookie to see what would happen, but when pasting in a new cookie I get the following error:

image

Any idea what it’s complaining about?

Hey,
I seem to be having a login issue in which when I attempt to login, this happens:


Help would be appreciated

Hey @JKW, this is amazing - thanks for all your efforts. I’ve read through this whole thread and you are so open and responsive.

Unfortuantely I was not able to solve my issue - the only media I can open is Last Played Songs. When I try to open Library Playlists/ Albums/ Songs etc I get Media Browsing Error. Screenshot

I’ve tried more than a dozen different cookies using fresh instances of incognito mode. I’ve removed and reinstalled the integration 4 times as well. It’s probably user error but I can’t work it out.

Playing my last played on repeat is great but there’s only so much Rufus the people around me can tolerate.

Any advice greatly appreciated!

Hi @bigbrainbonobo … honestly … no idea … can you please post the debug log? GitHub - KoljaWindeler/ytube_music_player: YouTube music player for homeassistant
JKW

1 Like

I also have the same issue. Help would be appreciated

Thanks @JKW, I tried to pull the logs using both methods but was unsuccessful twice.

1st method using ytube_music_player.call_method - it shows this error message at the bottom

2nd method - I added the logger to configuration.yaml and restarted HA. Where are the logs meant to generate? Could not locate them.

Cheers

Hi, I’m having this error:
Logger: custom_components.alexa_media.media_player
Source: custom_components/alexa_media/media_player.py:1326
Integration: Alexa Media Player (documentation, issues)
First occurred: 20:31:39 (2 occurrences)
Last logged: 20:32:23

Sorry, text to speech can only be called with the notify.alexa_media service. Please see the alexa_media wiki for details. h t t p s : / /github.com/custom-components/alexa_media_player/wiki/Configuration%3A-Notification-Component#use-the-notifyalexa_media-service

Alexa speaks the error too. can anybody help me? I thank.

Did you ever find a fix for this, having the same issue and haven’t found a fix.

not for my issue

I’m having the same issue inane69 has had for a while,

I can browse my media fine, if I use the ytube player entity and browse from there, but it doesn’t show up as one of the options in the normal media player.

Any ideas?

1 Like

@JKW Thank you for all of your hard work making this wonderful addon.
I am having issues trying to get multiple speakers working. I am able to get everything running with my google home mini, but I am not getting the input_select sensors in Dev tool or in your yaml lovelace dashboard. Is there a way to force the input_select sensors to be created? I have reinstalled the addon with several reboots. I have left the default values in the config_flow setup and have tried changing the names to get them to generate.
Thanks

Thanks, have you tried to call the select source service.

That way you should be able to send the music to any media_player that support streaming from a url. But be aware that only google Chromecast and mpd are tested

Jkw

After I configure the integration the following configure button stays and does not look like the video instructions. Is it configured correctly?

image

Per instructions
image

Hello,

Thanks a lot for this tool! It works beautifully.

I went through this thread and different souces only but could not find an answer to the issue I face.

I am looking into changing the “source” through a drop list on a dashboard.
If the drop list consist of only physical entities speaker, I can switch from one to another without issues.
However, if I am currently on a speaker group (group defined thourgh google home app and not through group function of HA), and I switch to a physical speaker then the player becomes inactive and I cannot operate it anymore.

When simulating the issue described above:
Right after switching from a physical speaker to a google home speaker group (things are still working but I get this log):

> 2023-01-12 13:14:24.372 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.media_seek (c:01GPJYE6KEEXSY2QPPG5C6RV3V): entity_id=['media_player.downstairs'], position=13.237857>
> Traceback (most recent call last):
>   File "/usr/src/homeassistant/homeassistant/core.py", line 1773, in catch_exceptions
>     await coro_or_task
>   File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
>     await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
>   File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
>     await service.entity_service_call(
>   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 655, in entity_service_call
>     raise HomeAssistantError(
> homeassistant.exceptions.HomeAssistantError: Entity media_player.downstairs does not support this service.

Right after switching from a google home speaker group to a physical speaker:

> 2023-01-12 13:14:33.404 WARNING (SyncWorker_1) [pychromecast.controllers] Quick Play failed for https://www.home-assistant.io/images/cast/splash.png:image/png({})
> 2023-01-12 13:14:33.406 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.turn_on (c:01GPJYE5N7GDVJCVDM6561XKM2): entity_id=['media_player.tvlivingroom']>
> Traceback (most recent call last):
>   File "/usr/src/homeassistant/homeassistant/core.py", line 1773, in catch_exceptions
>     await coro_or_task
>   File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
>     await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
>   File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
>     await service.entity_service_call(
>   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
>     future.result()  # pop exception if have
>   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 958, in async_request_call
>     await coro
>   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
>     await result
>   File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 707, in async_turn_on
>     await self.hass.async_add_executor_job(self.turn_on)
>   File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
>     result = self.fn(*self.args, **self.kwargs)
>   File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 514, in turn_on
>     quick_play(chromecast, "default_media_receiver", app_data)
>   File "/usr/local/lib/python3.10/site-packages/pychromecast/quick_play.py", line 77, in quick_play
>     controller.quick_play(**data)
>   File "/usr/local/lib/python3.10/site-packages/pychromecast/controllers/media.py", line 547, in quick_play
>     raise PyChromecastError()
> pychromecast.error.PyChromecastError
> 2023-01-12 13:14:37.297 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellydimmer2-3C6105E323BF data: Error fetching data: DeviceConnectionError()
> 2023-01-12 13:15:01.166 WARNING (SyncWorker_0) [pychromecast.controllers] STOP command requested but no session is active.
> 2023-01-12 13:15:01.857 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.media_seek (c:01GPJYFB6XVNHWY4V0666YCK8J): entity_id=['media_player.speakerkitchen_audio'], position=33.416682>
> Traceback (most recent call last):
>   File "/usr/src/homeassistant/homeassistant/core.py", line 1773, in catch_exceptions
>     await coro_or_task
>   File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
>     await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
>   File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
>     await service.entity_service_call(
>   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 655, in entity_service_call
>     raise HomeAssistantError(
> homeassistant.exceptions.HomeAssistantError: Entity media_player.speakerkitchen_audio does not support this service.

Do you have any idea what I could do to make this work?

Thanks a lot again for your support,

Brice

Is there any additional data I could share to make it easier for you @JKW to have a look?
Thanks a lot again,

Brice

Thanks for this awesome integration @JKW!

I’ve managed to get this working with room selectors and playlists.

My question now is, could I even add -outside YT- radio stations to the card? This way I could create one integrated music unit! I tried to use a script and point it to ytube_music_player but that didn’t work…

I could create a separate card but all in one would be neat.

Been using this great integration every day for a year now - but I’m not able to see my Library Playlists anymore.
Is this a cookie token issue? Time to renew? Everything else works though. Thanks!

still same issues occurring - is anyone else having the same issue?
Can you open library playlists or library albums?