could you, or ideally multiple people checkout ytube_music_player/README.md at main · KoljaWindeler/ytube_music_player · GitHub
I’ve added videotutorials to show the complete process. Installation, mini_media_player shortcuts, dropdowns
Nice addon! Does this work with non Premium account? I get the following error when try to play on the browser:
Failed to call service media_player/play_media. not a valid value for dictionary value @ data['entity_id']
that has nothing to do with the integration … that’s “just” the regular homeassistant service syntax …
e.g.
- service: media_player.play_media
data:
entity_id: media_player.ytube_music_player
media_content_id: PL6H6TfFpYvpersEdHECeWkocaPueTqieF
media_content_type: playlist
you have to provide a entity_id … which is really what the error already told you …
Ah okay thanks, so I need to define a default entity_id via Integrations, but I will still be able select a source using dropdowns, (i.e via browser)?
Correct, and you can also change the output by calling the select_source service… e.g. here towards the Mediaplayer Carlo
See also https://github.com/KoljaWindeler/ytube_music_player#services
I had a power outage yesterday and since rebooting my HA system I received the below error:
2021-03-17 19:05:01 ERROR (SyncWorker_12) [custom_components.ytube_music_player.const] The entered information has the correct format, but returned an error 403 (access forbidden). You don't have access with this data (anymore?). Please update the cookie
I tried a restart but got the same error.
I’m sure I can follow what it says and update the cookie, but why would this have happened? I have performed many restarts recently to update HA etc, but never had this issue.
Same happened to me after a restart of my router. I could imagine that it had something to do with my external IP?
honestly: no idea. Cookies have a limited lifetime
Jkw
Fair enough. Thanks for the awesome component
Anyone has an idea how I could scrobble the tracks to lastfm with this player?
I’m getting old. I had to Google what scobble is
… No …
I hope someone here can help
I have been using this media player for 2 months with no issues.
Last week, the drop down option for Playlist radio stopped working with the following error output:
2021-03-23 07:44:05 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] TURNON
2021-03-23 07:44:05 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] play_media, media_type: channel, media_id: LM
2021-03-23 07:44:05 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] prepare_play
2021-03-23 07:44:05 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] check_api
2021-03-23 07:44:05 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] - no valid API, try to login
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] - YouTube Api initialized ok, version: 0.14.3
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] _update_remote_player
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] _turn_on_media_player
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] _get_cipher
2021-03-23 07:44:06 ERROR (SyncWorker_15) [custom_components.ytube_music_player.media_player] _sync_player
2021-03-23 07:44:06 ERROR (SyncWorker_15) [custom_components.ytube_music_player.media_player] media_player.shield: off -> idle
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] get_playlist(playlistId=LM) … get_watch_playlist(videoId=eDB4ULCHCAE)
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player]
============= ytube_music_player Integration Error ================
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] unfortunately we hit an error in the sub api, please open a ticket at
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] https://github.com/sigma67/ytmusicapi/issues
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] and paste the following output:
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] Traceback (most recent call last):
File “/config/custom_components/ytube_music_player/media_player.py”, line 1124, in play_media
self._tracks = self._api.get_watch_playlist(videoId=r_track[‘videoId’])[‘tracks’]
File “/usr/local/lib/python3.8/site-packages/ytmusicapi/mixins/watch.py”, line 80, in get_watch_playlist
tracks = parse_watch_playlist(results[‘contents’])
File “/usr/local/lib/python3.8/site-packages/ytmusicapi/parsers/watch.py”, line 29, in parse_watch_playlist
‘playlistId’: nav(data, NAVIGATION_PLAYLIST_ID),
File “/usr/local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py”, line 210, in nav
raise err
File “/usr/local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py”, line 204, in nav
root = root[k]
KeyError: ‘playlistId’
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player]
thanks, Kolja
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] ============= ytube_music_player Integration Error ================
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] turn_off
2021-03-23 07:44:06 ERROR (SyncWorker_17) [custom_components.ytube_music_player.media_player] _turn_off_media_player
2021-03-23 07:44:06 ERROR (Thread-14) [homeassistant.components.cast.media_player] Failed to cast media https://www.home-assistant.io/images/cast/splash.png. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
2021-03-23 07:44:06 ERROR (SyncWorker_8) [custom_components.ytube_music_player.media_player] _sync_player
2021-03-23 07:44:06 ERROR (SyncWorker_8) [custom_components.ytube_music_player.media_player] media_player.shield: idle -> idle
2021-03-23 07:44:06 ERROR (SyncWorker_20) [custom_components.ytube_music_player.media_player] _sync_player
2021-03-23 07:44:06 ERROR (SyncWorker_20) [custom_components.ytube_music_player.media_player] media_player.shield: idle -> off
the author of the ytmusicapi released a new update I dont know how to implement it with this addon. Can someone please help me with this.
Thanks
Hi, Just to copy from GitHub: if you have issues with the radio please update to the latest version in hacs.
Jkw
I spoke too soon. When I choose playlist radio, it plays the playlist songs only and fails to generate a radio list… Frustrating
Can anyone else confirm this issue? It still works here. Please (as always) add your debug log. Or even better, let’s solve this at the GitHub ticket.
I have a different issue. First time using this. Getting this error after clicking the Playlist Button:
Failed to call service media_player/play_media. not a valid value for dictionary value @ data['entity_id']
I’ve also found this in my log:
2021-03-26 14:07:58 ERROR (SyncWorker_3) [custom_components.ytube_music_player.media_player] (input_select.ytube_music_player_speakers) is not a valid input_select entity.
Please enable debug output and send me the log. Also which is the “playlist button” ?
issue created on GitHub 4 days ago with logs. Thank you for this great addon
Hi, thank you for the excellent work on this media player, its great being able to access my YouTube Music from Home Assistant.
I have an automation that would cast a random track based on the weather each morning and I want to use the YouTube Music method now.
I have managed to have a playlist start on shuffle but would like it to stop after playing one track, is this possible?
Thank you
Well, you can call play_media with type ‘track’ and the ‘videoId’ of one song. (Set repeat to off)
Would that work?