[PLUGIN] YouTube for Volumio

Uhm i just checked it again… and now it works out of the blue again …loll

Thank you for your awnser and making this plugin available for us…!!!

I have never tried to use the plugin on an x86 platform. What do you mean with Main plugin?

volumio.jpg

Well, it’s not present into plugin list…maybe Michelangelo has to do something ?

There is an open issue for the plugin github.com/volumio/volumio-plugins/issues/183

Well, i just found a workaround: i have a raspberry PI with volumio … i took the youtube directory from plugins directory with winscp and copied into x86 volumio. At that point i enabled plugin, and VOILA, working ! :slight_smile:

Well, that are great news! Enjoy the plugin. :slight_smile:
Would be nice if you could give me some feedback or improvement wishes.

I tried all, but the playlist endet on the 50th song…
volumio1.jpg
volumio2.png
volumio3.png

Well, i would LOVE to cast videos to volumio like a tv … but don’t know if it is possible.

I will take a look.

You mean using the Youtube app on your smartphone to control volumio?

Yes, just like a tv, or a chromecast :slight_smile:

Ok im stuck. Gonna ask here.

I used to use Volumio with this addon a lot.
Had to install Volumio new after like 3 Months Break cause of moving to another Flat.

It will not let me register this Device on Google. I get:

  1. That’s an error.

There was an error. Please try again later. That’s all we know.

But only if its a new code… if i wait for it to expire i get told it expired.

Any idea? Its an absolutely fresh install with only youtube addon

Hi Sepherim,
I am aware of the problem and I will be looking into it as soon as I have a moment.
I will make sure to update this thread once it is fixed.

Best Regards,
Cris

When I played this LIve Stream on Youtube plugin, it is stopped after 30 secs play.
youtube.com/watch?v=jiLkBxw2pbs

I think, Non LIve Stream clips are good(not stopped)

attached Log
logs.volumio.org/volumio/fKcRXao.html

This is a really good plugin that many people use. Thank you for your work and support.

If we exceed the limit, will we have to pay a monthly fee or pay a one-off fee to Google?

Creating your own api key would be complicated for plugin users?

It is a good idea to keep a list of polled music, because if I choose something from the plugin’s polled list and I click to my playlist and then go back to the plugin’s polled list, the list is no longer visible and you need to change a character in the search field and retrieve it to appear in the list generates unnecessary queries.

I think today we’ve again exceeded Google API’s quota.

Hey,

I installed Volumio yesterday and spent the whole evening trying to figure out why the Youtube plugin doesn’t work. Glad that I found this thread and now know why - just checked my logs, I have the “daily limit exceeded” problem as well.

Would be awesome if you guys could add the possibility that I can enter my own API key as well. I think that users that run software like Volumio should be able to do this and I assume this is the easier solution to fix this than to get a paid solution for everybody?

Thanks for maintaning this plugin, hope I can use it soon!

Cheers,
Stefan

Would it make sense to at least offer users the option to generate your their own key and enter it.

If the user doesn’t enter the key then they fall back and default to the shared API key. It could be under a hidden “Advanced configuration” section in the UI that just overrides the default.

I completely agree that expecting every user to create their own key isn’t a suitable solution. But allowing users to enter their own key, would:

a) allow more technical users an option to continue use when the API limit is hit.
And b) potentially reduce the load on the shared API key by removing the number of users utilising it.

I’m sure if you shared some step by step instructions for creating a key, the majority of Volumio users would be technical enough to follow and understand it if they wanted to. :slight_smile: But those that can’t would still just use the shared key by default if don’t decide to configure anything.

Seems google repaired the Device problem on their end.

They seemed to have fucked up.

Im happy it all works again now.

Please help me
Your search on youtube is not working!
I installed the latest version still does not work
Thanks
youtube loi.jpg

To the plugin author: Congratulations on the heavy usage! Well past free tier pretty often : )

To the users: This plugin works great, but indeed does often run out of free API usage due to so many users. It is entirely possible, if you have a google account, to create project credentials yourself to access the youtube API without using the build in volumio-youtube key. Some brief instructions are below.

Activate the API

  • Uninstall the Youtube plugin, then reinstall it, then reboot your volumio. Don’t ‘enable’ the plugin yet.
  • Log into google developer section at https://console.developers.google.com. You might have to activate a new project, or your account in some way, that I had already done.
  • Find the API library, and search for and enable Youtube data API v3.
  • You are 1/3 of the way done.

Create credentials

  • Create a new project, named something like volumio-youtube-yourusername
  • Use the google developer page to add credentials for this project. Select the youtube data API you just enabled. It will say lots of things about oauth2, and the like. If you have to choose an access category, webserver should work fine.
  • Download the resulting credentials in json format. It will probably be called client_id.json or similar.
  • You are now 2/3 done.

Edit the auth.json file for the plugin

  • Copy the /data/plugins/music_service/youtube/auth.json file off your volumio
  • Edit it in a text editor, and replace all the matching fields with the data from your client_id.json file, except the redirect.
  • You’ll end up with something like this:
{
  "volumio": {
    "client_id": "biglongrandomnumber9131928319273192873.apps.googleusercontent.com",
    "project_id": "the-name-ofthe-project-you-created",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://www.googleapis.com/oauth2/v3/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_secret": "ADIFFERENT_SECRET_THAN_THE_ORIGINAL",
    "redirect_uris": [
      "http://127.0.0.1:9004"
    ]
  }
}
  • Copy the file back into your volumio at the correct location:
/data/plugins/music_service/youtube/auth.json
  • Enable the youtube plugin. Copy the code displayed as previously, into google.com/device
  • Leave the youtube plugins settings page, then go back in. It should successfully authenticate.

Done
You now have a (mostly) functioning youtube plugin. Depending how you configure your project, accessing user account data may not work, but public results should always function. You’ll have enough free API usage for your personal use, I’m sure.

Don’t paste your client secret anywhere on the internet unless you want other people using your API credit.

If you update the youtube plugin, your changes will get blown away - so save the auth.json file you create. Maybe the author will add expert settings for you to plug in your own values for client_id and client_secret - but it is too much generally to expect users to deal with these values and API registration. If I was the developer I’m would probably have other higher priorities.

Hi throwawayguy,

Thanks for the tips and the well documented how-to.
I just followed the steps as described but I get stucked on the plugin settings page where the code zone remains empty.
Any idea on what I forgot ?

Many thanks,

Hi!

Awesome plugin, thank you!

I got stuck at the same point as edwin69.
After looking into it, i changed the “ytapi_key” in the index.js (same folder) and kept the original auth.json. (I think you will need to deinstall and restart … and then make the change in the index.js)
I see now my requests in the google console, so this seems to work. For this you need to create an api key and not a oauth-client-id.

Hope this helps anyone.