Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Flex TV: Google Assistant/Alexa + Plex Integration (with support for Sonarr, Couch, Sick, etc.)

2456756

Answers

  • SCDemanettSCDemanett Members, Plex Pass Posts: 11 Plex Pass

    @digitalhigh said:

    @drummondst said:
    This all looks great! I am very eager to get a hold of this. Is Chromecast support on your roadmap? or Searching multiple servers?

    Also I would be very willing to help alpha/beta test if you are looking for volunteers!

    Once I get all/more Plex player types working, I'll consider looking at the cast protocol. Multiple servers should be easy.

    Beta testers... Not ready yet, but anybody volunteering should have an Android player and some technical knowledge to help debug stuff.

    I'd be happy to beta I have Google Home and Echo Dot and an IFTTT account with a Sony Android TV and of course Plex on it with PlexPass. I would also pay for this kind of functionality being able to tell GHome what to play on Plex. Awesome looking work digitalhigh!

  • drummondstdrummondst Members, Plex Pass Posts: 30 Plex Pass

    @digitalhigh said:

    @drummondst said:
    This all looks great! I am very eager to get a hold of this. Is Chromecast support on your roadmap? or Searching multiple servers?

    Also I would be very willing to help alpha/beta test if you are looking for volunteers!

    Once I get all/more Plex player types working, I'll consider looking at the cast protocol. Multiple servers should be easy.

    Beta testers... Not ready yet, but anybody volunteering should have an Android player and some technical knowledge to help debug stuff.

    I have been a Software QA Engineer for 7 years. I have worked on a wide range of products in both hardware and software. I have QA experience with multiple programming languages(C#,Ruby,Python,Java). Just to give a general idea of my technical knowledge.

    As far as an android player I just noticed what section this post is under. I just found it from the search bar so that is my bad. I currently use 3 chromecasts 1 firestick as well as a computer directly connected to the TV. I doubt the computer counts for you as a Android player but I would still be willing to help in any way I can so let me know.

  • digitalhighdigitalhigh Members, Plex Pass Posts: 288 Plex Pass

    @drummondst said:

    @digitalhigh said:

    @drummondst said:
    This all looks great! I am very eager to get a hold of this. Is Chromecast support on your roadmap? or Searching multiple servers?

    Also I would be very willing to help alpha/beta test if you are looking for volunteers!

    Once I get all/more Plex player types working, I'll consider looking at the cast protocol. Multiple servers should be easy.

    Beta testers... Not ready yet, but anybody volunteering should have an Android player and some technical knowledge to help debug stuff.

    I have been a Software QA Engineer for 7 years. I have worked on a wide range of products in both hardware and software. I have QA experience with multiple programming languages(C#,Ruby,Python,Java). Just to give a general idea of my technical knowledge.

    As far as an android player I just noticed what section this post is under. I just found it from the search bar so that is my bad. I currently use 3 chromecasts 1 firestick as well as a computer directly connected to the TV. I doubt the computer counts for you as a Android player but I would still be willing to help in any way I can so let me know.

    I'd still be interested in knowing if the fire stick will work with this, and a proper QA person is usually an essential part of my development process. I'll definitely keep both of you in mind.

  • digitalhighdigitalhigh Members, Plex Pass Posts: 288 Plex Pass

    As another fun little update - I think I'm ALMOST there in getting the proper formatting to make this baby play to ANY plex player on your local network. All I need to do now is work out taking the media requested for playback and putting it into a play queue, then passing the path for the play queue to the player, versus the direct path to the media like I'm doing now.

  • lolcatzurulolcatzuru Members Posts: 9 ✭✭

    i have a firestick too if you wanna use me!

  • kevman95kevman95 Validating, Plex Pass Posts: 7 Plex Pass

    I would love to test any Chromecast support, so do let me know :)

  • FlippageFlippage Members, Plex Pass Posts: 69 Plex Pass

    I don't have android myself, but I'm running PMP on Windows 10, so if you want that tested out give me a shout.

    I'm keen to test this out for you

  • bramvdhbramvdh Members Posts: 4 ✭✭

    Sounds like some great work!

    I have a 2016 chromecast, synology nas with sickrage and plex, and a google home. Definitely willing to give this a try if you want.

    Do you have any plans of releasing this on GitHub? Might be intersting as well to create a Heroku package from this, so we can easily replicate this and run our own (free) server.

  • lolcatzurulolcatzuru Members Posts: 9 ✭✭

    @bramvdh said:
    Sounds like some great work!

    I have a 2016 chromecast, synology nas with sickrage and plex, and a google home. Definitely willing to give this a try if you want.

    Do you have any plans of releasing this on GitHub? Might be intersting as well to create a Heroku package from this, so we can easily replicate this and run our own (free) server.

    im sure he'll release it, but he has said in the past that it would be a bit.

  • bramvdhbramvdh Members Posts: 4 ✭✭

    @lolcatzuru ah ok thx, I'll wait a bit longer then...

  • digitalhighdigitalhigh Members, Plex Pass Posts: 288 Plex Pass

    Still hard at work on this puppy! Been driving myself crazy the past few days working on trying to crack what I'm doing wrong triggering remote playback on non-Android devices. It seems to be that when firing remote from commands from the plex Web UI, the process goes Poll Player -> Fetch Transient Token -> Send media to Play Queue -> Send Play queue address to player.

    However, in emulating this process, I am having difficulty fetching the proper Play Queue ID, which I think may be because I am not an actual player, and don't have an actual Play Queue. So, trying to work out if there's a way to spoof a play queue, or perhaps fire back responses to the Server when it goes looking for my device's properties.

    But, aside from battling insanely with pretending to be a plex device when I'm not really one - I've done a lot of work on making everything dynamic, and tied to the ID of the logged-in user. The challenge comes from this needing to operate headlessly...I have to provide test and setup functionality for the WebUI - in which the actual Plex Apps have user-prompted inputs to trigger for scraping of client lists, servers, etc.

    Because commands from IFTTT start a brand-new session with every command, I'll need to store some device information locally just to make it faster. But, when accessing the Web UI for Phlex, clicking on a dropdown for a player or server will pull that data directly from Plex TV. In fact, everything works just using your user credentials now - there's no need to figure out tokens or IP's or anything else. Just log in, set your primary server, and I'll handle the rest.

    Also, you can now specify the ID of the player to use in API requests, meaning you can theoretically customize a command for every player you have on your network (provided I get it working for all types). And, because each user has their own API key which is used for IFTTT commands, it is also possible to set up commands associated with each user, and have those commands tracked properly back to that person.

    So, while I've only made marginal progress extending player stuff, I'm making big strides on the backend in terms of making it adaptable to any number of users and players in your home environment.

    Curious - if anybody else out there has worked on remote playback before - feel free to share anything you know that may help me get this squared away. I've been staying up past 1, 2 AM most days working at this lately, so having the "all players" bit right would be amazing.

  • FlippageFlippage Members, Plex Pass Posts: 69 Plex Pass

    Awesome job man. Love how hard you're working on it.

    Out of curiosity, have you looked at Google Actions to possibly replace IFTTT? Like, "Hey google, let me speak to Plex" and then issuing commands straight to your server software?

    Just a thought, probably for future releases.

    Keep up the good work mate!

  • digitalhighdigitalhigh Members, Plex Pass Posts: 288 Plex Pass

    @Flippage said:
    Awesome job man. Love how hard you're working on it.

    Out of curiosity, have you looked at Google Actions to possibly replace IFTTT? Like, "Hey google, let me speak to Plex" and then issuing commands straight to your server software?

    Just a thought, probably for future releases.

    Keep up the good work mate!

    I did look at the API, and I thought about it, but I don't like the idea of having to step into another subset of commands in order to do simple things. I prefer to have a One-Shot command in order to play media, or do anything else.

  • drummondstdrummondst Members, Plex Pass Posts: 30 Plex Pass

    @digitalhigh said:

    @Flippage said:
    Awesome job man. Love how hard you're working on it.

    Out of curiosity, have you looked at Google Actions to possibly replace IFTTT? Like, "Hey google, let me speak to Plex" and then issuing commands straight to your server software?

    Just a thought, probably for future releases.

    Keep up the good work mate!

    I did look at the API, and I thought about it, but I don't like the idea of having to step into another subset of commands in order to do simple things. I prefer to have a One-Shot command in order to play media, or do anything else.

    As far as I know it can still be a one shot command.

    For example with todoist I say "Hey google tell todoist to add task put thank you notes in the main tomorrow".

    That sentence activates google, which switches to todoist who then adds the task and asks if I would like to change anything.
    I am not sure if all apps work this way but the ones that I have used do. Just for future reference.

  • FlippageFlippage Members, Plex Pass Posts: 69 Plex Pass

    Well I think there's 2 sets of commands with google actions.

    One is to speak directly to apps.
    The other is to ask google to speak to plex first, etc and then throw the commands at it.

    I think the first is only for Google partners? Or maybe you just have to request it to be added or something.

    Sorry I'm probably just talking out of my **** ahah. I'm just going off things I've heard tbh.

    Either way, I'm happy with IFTTT for now, And maybe someone can give you a hand with the Google actions in future.

  • digitalhighdigitalhigh Members, Plex Pass Posts: 288 Plex Pass

    Hey everybody - great news! After beating my head against a wall all weekend trying to get remote playback working beyond my Shield, I finally made some progress.

    I can now stream to and control an instance of the Plex Web Player using Phlex, without all this stuff about play queues I was seeing when logging the web player's output traffic. Same goes for the windows 10 app - Playback to that works like a charm!!

    However, playing to Plex Media Player is still problematic, and I'm trying to work out why. Right now, the only issue I see is an error about being unable to lock up subscriber. The command gets through, is formatted correctly...there's just something different about PMP that makes it tougher to talk to. I'll keep at it...but I'm still quite happy that I've expanded playback to web and the 10 app. I'll probably spin up a 'Nix VM this evening to install PMP on there and see how it works.

    All in all, I'm doing a buttload more in terms of caching and scraping and storing and displaying, and trying to make sure that this could, in theory, play as well from Plex Cloud or a remote server as it can locally. This means lots of extra calls to Plex.TV for full server info, but also means this should be super-flexible when done.

    Still need to do a lot of bug squashing on the final output JSON for playback commands...It's largely uniform, but there are also some things I threw in there for my own purposes while testing that need to get pulled out, as well as some stuff that just doesn't make it out despite being a successful command.

    Regardless...still chugging along. I might hang it up early tonight and try to get some actual sleep...but odds are just as likely that I'm up till 2 again tonight now that I've made real progress. :D

    @Flippage said:
    Well I think there's 2 sets of commands with google actions.

    One is to speak directly to apps.
    The other is to ask google to speak to plex first, etc and then throw the commands at it.

    I think the first is only for Google partners? Or maybe you just have to request it to be added or something.

    Sorry I'm probably just talking out of my **** ahah. I'm just going off things I've heard tbh.

    Either way, I'm happy with IFTTT for now, And maybe someone can give you a hand with the Google actions in future.

    That sounds right. I did apply for an "action", but because I was just kinda bombing through it, it was denied for a bunch of issues that I have yet to correct and resubmit. Been working more on "make it work" before worrying about how to tie it to the full-blown AI bit.

    However, that's not to say that I'm not considering how to interact with an AI agent at some point in the future. As it works now, with every command submitted, you get back a JSON-formatted Array which contains the originally submitted command, the parsed command as the app interprets it, the entire XML section for the media if some is found, as well as a result of the playback command if it makes it to that point.

    So, basically, it's designed so that not only can you easily send commands to Plex in plain spoken English, but the results sent back to whatever is calling it can be parsed and interpreted and (hopefully) spoken. I think now that I have a less abstract idea of what I want and need to do with IFTTT, I will re-submit for an actual widget maker thingamabob that better outlines how a google conversation could flow with this fella.

  • FlippageFlippage Members, Plex Pass Posts: 69 Plex Pass

    Amazing dude! I love how your posts are so detailed.

    This is what the amount of detail the Plex guys should be giving us with the development of PMP. Instead, it's just silence.

    Looking forward to seeing more with this as it comes along mate. Glad to hear you are getting more apps working. I can't say I'm surprised that there was issues with PMP. Just add it to the pile of PMP problems haha. Of course that's the app that my wife has gotten used to, so I can't change it now lol.

    Excited to see where this goes :)

  • digitalhighdigitalhigh Members, Plex Pass Posts: 288 Plex Pass

    Just finished up basic genre searches for "I want to watch a horror movie" or "I want to watch a comedy". Now I'm going to try chaining genre + year + cast in one search and see if I can parse out all those commands without **** up other title searches. This becomes further compounded if I want to be nice and include checking for individual decades (a comedy made in the 80's", which then takes my "year" parameter and makes it a range of years, and now a function that needs to be able to juggle five different possible input variables and return an accurate result.

    Hehe. It kind of makes me wonder if using a conversation API would even be possible, considering as how much back and forth with the Plex Server I have to do to be able to generate a result.

    Oh, also - I'm going to start making considerations for a handful of beta testers soon. Ideally, I want to test IFTTT against the following search assistants and player devices, so if you have one of these, please let me know which ones you have, as well as a refresher on your technical knowledge in terms of web debugging and general setup and diagnostics of network/web applications.

    The List:

    Siri
    Alexa/Echo Dot
    Fire TV/Fire Stick
    Roku-Based Devices
    Apple TV
    any other kind of random device that may have a one-off version of the Plex Player app.
    An Android-TV based Smart TV
    A Non-Android TV based Smart TV
    A Linux box running PMP
    Is there plex for RasPi? Then that.

    I don't need help testing the win10 app, I know that works fine.

    If you have one of the above devices and feel like playing, let me know. You'll need to be comfortable setting up your own webserver with PHP+curl, as well as port forwarding to your page, etc. so that it's publicly accessible via IFTTT. Eventually, I'll be encapsulating this in some kind of "set and forget" webserver package, but for now, I just want to make it work.

    It's time for tryouts. :D

    image

  • kevman95kevman95 Validating, Plex Pass Posts: 7 Plex Pass

    @digitalhigh

    Is testing with chromecast apart of this list? i would love to be able to help in anyway i can.

    Thanks!

  • digitalhighdigitalhigh Members, Plex Pass Posts: 288 Plex Pass

    @kevman95 said:
    @digitalhigh

    Is testing with chromecast apart of this list? i would love to be able to help in anyway i can.

    Thanks!

    Sorry, not yet. I did some very very preliminary homework on the cast protocol, but haven't even begun to try and wrap my head around how I'd need to encapsulate the requested media or enumerate cast devices on the LAN, or then present them to the user and API. It's on my radar...It's just that there are a bajillion other blips on my radar, and the act of addressing one of them often adds another three to look at and think about. :D

Sign In or Register to comment.