This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Youtube app

13

Comments

  • Version 0.5 adds source token to media changed trigger and changes how playlist autoplay is working.
    Now it directly communicates with media player (chromecast app) and thus requiring Chromecast app version  0.12.1.

    Apps are currently available on github
    https://github.com/matjaz/homey-youtube
    https://github.com/matjaz/com.google.chromecast

    Source token is set as follows:
    - from "Search YouTube" action source is set to "'video=<video id>"
    - from "Search YouTube (live)" action, source is set to "search=<query>"
    - from  "YouTube playlist" action, source is set to "playlist=<playlist id>"

    And with that we can use and.. column.
  • viktor said:
    Sorry, now testing to get the playlist, but is always showing no playlist items. Searching for Videos showing cannot read property of "map" of und...
    Hi @MatjaLipu ;

    Installed both new Apps, having the problem as described in quote.
  • PeaoPeao Member
    I am using this app since relase for my chromecast. I recently bought three chromecast audio to create a cheap multiroom speakersystem. Its working fine and I am happy that casting a youtube video to chromecast audio works too but it would be nice if I could choose my chromecast-group (Multiroom) as output to listen to the same song in every room simultaneously . Dunno if this is possible.
  • Victor, can you try help debug an error. It looks like response from server is not as expected. Let's open github issue and discuss there.

    Peao, try adding action for each Chromecast.
  • Hi @MatjaLipu ;

    with pleasure, i'm going to try debugging tonight.

    Tnx
  • PeaoPeao Member
    @MatjaLipu I tried this, but It plays not in sync (1-2 Sec Delay, when testing the flow you can see the green checkmarks are also delayed for each card)
  • You're right. It's no possible to call actions simultaneously. Also with that, you would have issues with sync because of different buffering, since each chromecast streams media separately. It's not that simple as it looks like.
  • PeaoPeao Member
    Ah ok, I thought the media is played on Homey and only the audio output is streamed to the chromecast. Like when I use the chromecast app on my smartphone where the Multiroom-Feature is working.
    ok I guess I have to wait till Homey supports different audio-outputs including chromecast as they mentioned earlier.


  • @MatjaLipu Fiddling around with youtube. Works great, but is there a maximum of video's a day for the api?... nothing illegal, ;)  just wondering...
  • YouTube API has quotas. Currently API uses one key, but if we exceed those quotas will need to provide our own API key. Currently we are far from quotas.
  • @MatjaLipu Okay, clear on that. But how many units does the app use on 1 request/play?

    I've created a flow which plays the videos of songs played on a particular radiostation and, thru a third party program, it plays them one at a time. In the meanwhile on each song played it cycles to the next (pre-defined) station. Creating my own playlist thru the day as it where of my favorite stations.

    My problem is that sometimes the youtube app fails to load anything for a few hours. Before I re-arange my complete network for extra speed, I need to be sure it's not a quota thingy, :blush: 
  • For example playlist retrieval (contentDetails part) requires 2 quota units per 50 items in playlist.

    I'll add setting where you can add your own API key and app would use you key. (similar as wolfram alpha).
    You can obtain YouTube Data API server key from https://console.developers.google.com

    When app wide key will hit quota limits, I'll consider removing it and requiring your own key.
  •  @MatjaLipu ; adding a own api key would be perfect!
  • @MatjaLipu aha, adding the env.json did it! now playing with my own api key. 
  • The App is not compatible with Homey  version 1.0.2  :(
  • 0.5.1 solves this (pending approval).
  • with 0.5.2 on FW1.1.2:



    Did you already have a version where you can put in your own api-key? But I suspect something else is wrong to be honest...
  • with 0.5.2 on FW1.1.2:



    Did you already have a version where you can put in your own api-key? But I suspect something else is wrong to be honest...0
    @BasVanDenBosch download the app from github. unpack and add/create a env.json file in for ex. notepad in the directory of the app.

    Then add:

     {
        "YOUTUBE_KEY": "-your API key-"
    }

    Then manually install the app (athom project --install), then u will use your own api key. ;)
  • dhadha Member
    Hi All,

    Any change we can use this not only to cast to chromecast, but also via dlna/upnp, for example i have multiple Kodi installations in my house, it would be awesome to cast youtube to Kodi as well ! ( and dlna/upnp is a universal protocol implemented in many media hardware/software devices :-) )

    Thnx for the great work !

    Dave


  • Added custom YouTube API key in setting in 0.5.3 (pending).
  • @dhaWe have to wait for firmware 1.2.0 of Homey for this. That will include mediasupport. Perhaps it's already in there, perhaps not...
  • @MatjaLipu I can't cast a Youtube URL to my chromecast in the latest version of both apps.. My tv just shows the light blue cast icon, nothing happens. I am using the Chromecast ultra
  • ldjldj Member
    Dear @MatjaLipu , I've got the same problem as EvertorN.

    Direct casting (without Homey) from phone or tablet is no problem. Connection (from Homey) is there (as I see the volume bar (of Chromecast) changed through triggering the flow. Variabele values (link youtube) are set correct as I can see in (tags) Homey and they work as I copy and paste them in browser. Chromecast is on latest version. But for some reason it will not do further to youtube anymore and stops at small light icon of cast in centre of TV-screen.
    Also latest versions of Youtube app en Chromecast app.
  • Yeah 100% sure the tags work. I had homey read out the URL to me and it's a valid youtube URL. The chromecast just doesn't want to play it.
  • MarcoWijkMarcoWijk Member
    edited February 2017
    EvertorN said:
    Yeah 100% sure the tags work. I had homey read out the URL to me and it's a valid youtube URL. The chromecast just doesn't want to play it.
    @MatjaLipu same here, this is what i get via debug:

    ChromecastK [ EventEmitter {
        domain: null,
        _events: { status: [Function] },
        _eventsCount: 1,
        _maxListeners: undefined,
        config: { name: 'ChromecastK', addresses: [Object] },
        host: '192.168.1.4',
        playing: false },
      EventEmitter {
        domain: null,
        _events: { status: [Function] },
        _eventsCount: 1,
        _maxListeners: undefined,
        config: { name: 'ChromecastK-2', addresses: [Object] },
        host: '192.168.1.5',
        playing: false } ]
    [Error: status code 404]

    Notice the 404 error. 

    I use 2 chromecasts, 1 for audio only and one for musicvideo. The audio plating chromecast is the 1st generation hooked up to an aux. The second one is a 2nd generation. I use them seperatly.  I also have my own API-key and it shows that the requests are received proper. No errors there. (also tried key via env.json, just to be sure)

     Still using the old chromecast app, due to it's capability to read the casts status. For testing purposes i tried the new chromecast app, but it didn't make a differance.

    I also created a flow which puts the youtube search result in to a string. Copying the strings value (search result) to my browser DOES play the video in my browser, figuring the search result is valid. 

     'till a couple of days ago it worked fine. Once in a while chromecast is suddenly able to play a video, but most of the times it does nothing. Could it be that google changed some codecs or apis??

    -------EDIT
     It seems that older versions of the app, have the same problem. Could it be a google-'ban' ?! If so, there is some hard recoding to do :(


  • hmmm... looks like a youtube thingy... I tried copy/pasting the urls and play them directly thru chromecast via a flow. Now i got the 404 error. But not on all of them, thats the weird bit. Some DO load, most of them won't. It's like they changed the codecs or api's or the rules on the whole. <span>:sweat:</span>
  • YouTube app 0.6.0 (in review) adds media support. https://apps.athom.com/app/com.youtube

    Kudos to Marvin Schenkel!

    Cheers!
  • @MatjaLipu

    Getting this error while searching on youtube in "Music". Installed the 0.6.0 version


    you.JPG 10.5K
  • @mbalik79 Did you use your own YouTube key? You can set this up via settings, the default key might have hit the quota 
  • mbalik79mbalik79 Member
    edited March 2017
    @EvertorN
    No I did not, have to make one (let's find out..hahah)


    ...nope, same problem.

Sign In or Register to comment.