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

24

Comments

  • brinkiebrinkie Member
    edited February 2016

    Did some more testing tonight. I now do get the "YouTube media changed" trigger, but the second part casting the video to my Chromecast isn't working (I have two added to devices). I know the video URL is correct now, because I can send it to myself through a notification or have Homey annouce it after the trigger occurs. I also tried re-adding my Chromecast device without any luck.

    Is the Chromecast app v0.10.1 working on Homey v0.8.20?

    Any suggestions on how to proceed debugging this?

  • Try debugging chromecast app driver. First find out if devices are discovered and uncomment logs in playVideo.
  • I think I've found something. The Chromecast app crashes when I send it a second video. I've reported the issue on GitHub.
  • 0.3 in market with playlist autoplay.
  • JesperJesper Member
    edited March 2016
    Thanks MatjaLipu

    I just tested version 0.3 and the autoplay with the playlist set on shuffle works now  :) . I saw there is also a stop playlist flow card to prevent Homey to keep sending new songs to your chromecast even when you stopped listening/watching. However, I saw that this card does not stop the playlist but pauses it, which also works for me.

    I will let you know if I encounter some bugs during some extensive testing which i will probably do this weekend. Furthermore, I will also post all my suggestion here whenever I have one so you can keep improving this app.
  • @MatjaLipu ;

    After some more testing I noticed that the next video is being send a little bit before the end of the video which is currently playing. Because of that you will never see the end of the video but you miss the last couple of seconds. Is there a way to prevent this?
  • Hey, thanks for your feedback.

    Did you called play playlist action multiple times or just once? Maybe skipping some item may cause this issue, but will need to investigate further.
  • I found that when trying to manipulate the volume of chromecast via an seperate flow youtube or chromecast stops working. A reboot via the reboot options seems to clear things. Not sure if it's the chromecast app or the youtube app stops responding. Load avg also sky high to 2+ :confused: 
  • JesperJesper Member
    Used the YouTube app a few times  last week for playing playlists in shuffle mode (in combination with the Chromecast app) but it still does not show the last seconds of a video. It starts the next video in the playlist a little bit too early. Are you working on a fix for this @MatjaLipu ?
  • @Jesper  it looks this happens when initial video buffering takes long time. Since YouTube app doesn't know when video start/stops playing exact playback is not possible.
    I will add 'playlist next item delay' setting.
  • MatjaLipuMatjaLipu Member
    edited May 2016
    Added support for delaying next item playback in playlist in version 0.3.2. You can grab it on github, until it's published.
  • JesperJesper Member
    @MatjaLipu Tested the updated YouTube app today. Setting a 5 seconds delay for the YouTube app on the settings menu for Homey works great for me. Thanks for fixing this.

    Now I noticed two other small issues.
    Sometimes no song is played for a couple of minutes (it happens after about every 10-15 songs). I think the chromecast did not get the command to play the song (no. 15) and when the next song (no. 16) in the playlist is selected by the YouTube app the Chromecast gets a new command and starts playing the song (no. 16). I think this is more a chromecast app issue as a YouTube app issue since the chromecast failed to get the command.

    Another issue is that the shuffle function tends to chose some songs more than other songs (it looks like it is not completely random). When I start the playlist it starts often with one of the three (out of 60) songs it likes the most. And I often notice that about 10 songs (out of 60) are played almost everytime when I run the playlist for about 2 hours.
  • Just a simple question, would it be possible to let Homey add a pair code for your smart tv?
    I have a Samsung and it doesn't seems so easy to make the right app for that.
    On my phone i can pair the youtube app with my smartphone by adding it with a pairing code. Could this be possible with Homey as well? :)
    http://www.androidcentral.com/pairing-youtube-mobile-device-tv-without-chromecast

  • MatjaLipuMatjaLipu Member
    edited June 2016
    Homey YouTube app supports only fetching video and playlist. Playback is not handled by this app. But it works great with Chromecast app.
    Regarding your idea, I think Homey Samsung TV app should handle this pairing, since TV is media player in this case.

    Jesper, regarding first issue that's very likely what's happening. I'll take a look if I can detect chromecast command status. As for the second issue it looks like you found a bug where random is not so random. I'll work on it..
  • 0.4.1 (in review atm) fixes random bug.
  • Will https://www.youtube.com block this app for any reason ?
  • It's using official API, so it shouldn't. Why do you think it would?
  • MatjaLipu said:
    It's using official API, so it shouldn't. Why do you think it would?
    Do you know this site: http://linktomp3.com/
    It was very famous because it opened a case study about google and youtube API, youtube blocked their API and IP in 2 days.
  • This app uses official API for playlist and video info. However for audio playback it uses www.youtube-mp3.org so there is a slight possibility it get's blocked, but this site is running for ages.
  • MarcoWijkMarcoWijk Member
    edited August 2016
    @MatjaLipu Is there a way to let Homey put youtubeclips in a queue? I'm running a shoutcast playlist. Homey grabs the current playing song and is then playing the video as well. However the timing is always of. Mainly because the duration of the mp3 playing never is the same as the videolenght. If there is a way to que the youtube url and let homey just play that queue, i figure thats how that  problem could be fixed.
  • There is a plan for Homey media player playlist. Let's wait what support will bring and if could be reused for YouTube app. Until then we can add new actions for queues (add, play,...). PRs welcome!

    Currently YouTube app has a technical difficulty to exactly match video duration since it's not fetched in playlist, so it must be especially queried when playlist is playing.
  • MarcoWijkMarcoWijk Member
    edited August 2016
    MatjaLipu said:
    There is a plan for Homey media player playlist. Let's wait what support will bring and if could be reused for YouTube app. Until then we can add new actions for queues (add, play,...). PRs welcome!

    Currently YouTube app has a technical difficulty to exactly match video duration since it's not fetched in playlist, so it must be especially queried when playlist is playing.
    @MatjaLipu  Great! So if I understand correctly a playlist/queue could be added in the future in the app itself? If possible could you add the features in the near future? Until Homey supports playlist as a whole?
  • Would a simple queue be enough for starters?
    - add video (via search/url)
    - remove from queue
    - play queue (fifo)
  • MatjaLipu said:
    Would a simple queue be enough for starters?
    - add video (via search/url)
    - remove from queue
    - play queue (fifo)
    @MatjaLipu That would be great! I think i can work with that :smiley: 
  • Hi @MatjaLipu ;

    I don't tested yet but how is wenn i want to stream different Playlists on different Chromecast at the same time? Is this working? While wenn i set the Playlist on the first started chromecast is going to be overwritten by the second start or not?

    Tnx
    Viktor
  • Currently "YouTube media changed" supports only one media/playlist.
    We could add "tag" token to trigger and connect it with actions (search, playlist). With that, we could identify from where media changed came from.  Does this sound ok? 

    Other option would be to create YouTube device, but afaik Athom does not allow virtual devices.

    Do you have any other idea?
  • Hi @MatjaLipu ;

    Tnx for the reply, maybe the "tag" with "playlist" in the "when" or "and..." is a good Idea.
    Wenn "youtube media changed" and the "playlist url =..." from the flow bevor then "cast url"

    Or:
    Flow1: Into "when.." take the Playlist from youtube and "then..."set it as string into the Better Logic String for example Chromecast1.
    Flow2: A variable changed "Chromecast1" then... "cast a Youtube video" on Chromecast with tag from variable


    Is almost the same like your suggestion.

  • "Get YouTube playlist" is an action, but we first need trigger.

    Now I am thinking, a simple "source" token on "YouTube media changed" would be enough.
    Which would be URL of video for search actions and playlist url for playlist action.
    And then you could simply use and condition..
  • Hallo @MatjaLipu ;

    Tnx for the new App Version, i installed it from git already. Can you please give me some hint how to use ti?
    Tried with setting a string with url in better logic and then using it for the cast playlist but no success.

    Tnx and greets
    Viktor
  • 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...
Sign In or Register to comment.