[PLUGIN] YouTube for Volumio

I don’t have any youtube plugin install yet. I’m not sure which link to download from. I’ve seen several. Can you provide the correct link?

the best is using the one with youtube-20191224.zip on the end…
and use google auth. to login…

Where can I find the zip file?

https://community.volumio.com/uploads/short-url/kUCARJ0igV4TOyX8HLClrdHVK1a.zip

Thank You! I’ll give it a try.

it’s not perfect it will hang some times at 6 a 7 seconde…and you have 2 restart it some times…

Ok. I appreciate the help. Thanks

if you need any help…
there are steps after install.

Ok where can I find those steps?

YT plugin version 0.1.0 ( date 20191224 ) as base.
Also run in terminal : cd /data/plugins/music_service/youtube/
Then run : npm install ytdl-core@latest inside
Then run : reboot volumio

Awesome! Thank you very much

you will need a google account and make this…


This may come a bit late but I have made some changes to the YouTube plugin to allow specifying your own API credentials in the plugin settings.

The API key used by the official YouTube plugin is broken as of this writing, so you cannot access YouTube without first granting Volumio to your YouTube account. However, even after granting such access, sometimes the plugin fails with Quota Exceeded errors. This is because the quotas associated with the API credentials used by the official YouTube plugin have exceeded due to too many requests (the credentials are shared by all users of the plugin). It is therefore ideal to instruct the plugin to use your own API credentials, which would mean all quotas are reserved only for you (whether or not you grant access to your YouTube account). The attached plugin caters for this.

Before using the plugin, you need to create the credentials in your Google Developer Console as follows:

    Go to your Google Developer Console

    Create a Project (click ‘Select a Project’, then ‘New Project’).

    On the left menu, choose Library, then enter “YouTube Data API v3” in the search box. In the search results, click on the API and enable it.

    Then choose Credentials on the left menu. This is the place where you will create your API credentials.

    Click ‘Create Credentials’, choose ‘API Key’. An API Key will be created and you can optionally choose to restrict it to the YouTube Data API v3.

    Then click ‘Create Credentials’ again and choose ‘OAuth client ID’.

    You will be asked to configure the consent screen, so let’s do that. On the configuration page:
        Set Application name (e.g. volumio-youtube-your-username). This name will be shown during the process where you grant Volumio access to your YouTube account

    Click ‘Add scope’, then check the box for ‘YouTube Data API v3 …/auth/youtube.readonly’

    Click Save.

    You will be brought back to the Create OAuth Client ID page. Choose ‘Other’ for Application type and provide a name (e.g. volumio-youtube-client). Click Create.
    Done! You have just created the API credentials needed for YouTube access. On the Credentials page, you will see the API key and Client ID. The Client Secret can be obtained by clicking the Edit icon corresponding to the Client ID.

To install the plugin:

    If you have the official YouTube plugin installed, you should uninstall it first, followed by a Volumio restart. To restart Volumio, you can enter the following in the console:

volumio@volumio:~$ volumio vrestart

    Download the attached zip file and place it in your Volumio home directory (/home/volumio)
    In Volumio console, enter the following:

volumio@volumio:~$ cd /home/volumio
volumio@volumio:~$ mkdir volumio_youtube_install
volumio@volumio:~$ cd volumio_youtube_install
volumio@volumio:~/volumio_youtube_install$ miniunzip ../<name of zip file downloaded>
volumio@volumio:~/volumio_youtube_install$ volumio plugin install

    You can delete the volumio_youtube_install directory after installation is complete

volumio@volumio:~/volumio_youtube_install$ cd ..
volumio@volumio:~$ rm -rf volumio_youtube_install

Using the API credentials with our plugin:

    Open Volumio web interface in your browser, go to Plugins->Installed Plugins and enable the YouTube plugin. Then click Settings.

    The default is to use the credentials provided by the official YouTube plugin. To change that:
        Under API Settings, turn off the ‘Default’ switch.

    In the corresponding fields that appear, enter the API key, Client ID and Client secret you created in your Google Developer Console.

    Click Save.

    A dialog will appear reminding you to use new Code for granting Volumio access to your YouTube account.
    Note the change in the Code shown under Account Access. You may have to wait up to 10 seconds to see the change.
    Use the new Code for granting access to your YouTube account. The process is the same as with the official YouTube plugin. Note that you might get a “This app isn’t verified” warning in the process. This is normal since you haven’t gone through the Google verification step after creating the OAuth Client ID, but it is nonetheless safe to proceed by clicking ‘Advanced’ and 'Go to '.
    If you change the API settings again, you will need to grant / regrant access with new Code.

Please feel free to test it and point out any issues or suggestions. If this works well then maybe this can be merged into the official plugin…

Thanks dvo,
I was able to go through all the steps you provided. When I tried going to one of my playlists, I got an error “No Results”.

I’m not sure what to do at this point.

One other question. Is it only the videos that I have in my YT playlist and likes that I will be able to play in Volumio? I was hoping that I could also search for music through the plugin and just have songs playing from youtube.

Screen Shot 2020-09-04 at 10.43.16 PM

do you have a google account and made the
youtube api key :
client ID :
Client secret :?
and returned your google device code…
that went well then switch youtube plugin on/ off and press under the secret key the button a few times it will come… and try to load your folders again…

Thanks dvo! That worked!

Is there a way to autoplay related videos? It would be a great option.

youtube plugin is a bit broken… didn’t find any fix for that …

Hi to all,

have installed and configured the youtubw plugin some month ago, then it won’t work with personal api credential. After some experiments and the read of this topic now the plugin is working perfectly. I think the plugin is no more followed by developers but some issues occurs. It’s not a problem. The only great problem is: the music stopped at 80% of the playback. How many users have experienced the same behaviour?
Is there a solution? I’ve noticed that if i launch music subscribed from some channels sometime the track is driven correctly.

Maybe an official youtube plugin with tha chance to use personal api maybe the best. I know it’s not for all, don’t know the solution.

Bye

ps: This announcement is showed on my api page:
"Al momento stiamo riscontrando alcune interruzioni del servizio e non siamo in grado di fornire informazioni sulle quote.

Volumio-youtube-plugin MODIFICA APP

Stato di verifica

Necessita di verifica

Because you’re using one or more sensitive scopes, your app registration requires verification by Google. Prepara la tua app per inviarla per la verifica."

I have to verify the app?

Really great to see that there’s a solution now!!!
However, for me it’s that somehow I fail when it comes to the step where I should grant Volumio read-only access to my YouTube account :frowning: Under “Account Access” there is no code given but stated “Code not yet available. Please come back later.” I came back later 5 min, but still there is no code given. I tried it several times, by switching on and off the plugin, but always face the same problem.
Any idea what I can do?

I like to add: What’s strange to me is that if chose YouTube as source that I can search and find things, it’s only that I cannot play them !?

did you use the youtube-20191224.zip?
did you fill out Api key, Client ID, Client Secret ?
and saved it?
if you don’t get a return key for your device reinstall it again… till you do…
it could be that a firewall could block it… i had that with my firewalla removed it
from my network and worked oke after that…

YT plugin version 0.1.0 ( date 20191224 ) as base.
Also run in terminal : cd /data/plugins/music_service/youtube/
Then run : npm install ytdl-core@latest inside
Then run : reboot volumio