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!

Phlex - Google Home + Plex Integration (with support for Sonarr, Couchpotato, etc.) NOW LIVE!

1246744

Answers

  • JasonMeudtJasonMeudt Members, Plex Pass Posts: 211 Plex Pass

    @digitalhigh said:

    >

    Either way...suuuuuuper exciting. I can't wait till I can have my first conversation with this puppy. :D

    The rest of us are eagerly awaiting a release version as well!

  • digitalhighdigitalhigh Members, Plex Pass Posts: 245 Plex Pass

    Well, let's just say I've got the interfacing betwen Phlex and API.AI worked out.

    photo Untitled_1.png

    Now it's just a matter of going nuts with the possibilities. This is gonna be fun.

  • Main PlexMain Plex Members, Plex Pass Posts: 200 Plex Pass
    edited January 25

    @digitalhigh said:

    @Main Plex said:

    @digitalhigh said:

    Also, now verified that this will work to control Plex running on Roku, so that's one more device added to the list. Unfortunately, it looks like this won't work right away with Alexa and IFTTT due to limitations there, but I am also tinkering with the actions API on API.AI, so it's possible that I'll be trying to utilize more intelligent responses and the ability to use it on alexa down the road.

    This is amazing I really hope to see an alexa integration as I'm in the uk and I can't get Google home :(

    It just happens to be your lucky day. The tip from @JasonMeudt got me motivated into looking harder at API.AI. I then talked to the creator of AutoVoice for a bit, which filled me in nicely on how the API.AI system actually works.

    So, this does a few things for the scope of the project:

    One, for API.AI to work, you apparently need a valid, not self-signed SSL cert and domain for API.AI to talk to. This isn't horribly difficult to set up using XAMPP, but does take the setup to a slightly higher difficulty.

    >
    Superb!

    Do you have a donate page because

    I have a 3yrs ssl signed by noip they also host my own private domain all using nginx to proxy run all my usenet programs.

    I currently have ifttt and eventghost hooked up together to send http-get to run custom scripts

    "Alexa trigger clean plex"

    Will alexa require an intent word to activite this?

    I don't know if it's been mentioned, radarr an alternative to couchpotato is getting a lot of traction, its so based on sonarr.

  • digitalhighdigitalhigh Members, Plex Pass Posts: 245 Plex Pass

    @Main Plex said:

    Superb!

    Do you have a donate page because

    I have a 3yrs ssl signed by noip they also host my own private domain all using nginx to proxy run all my usenet programs.

    I currently have ifttt and eventghost hooked up together to send http-get to run custom scripts

    "Alexa trigger clean plex"

    Will alexa require an intent word to activite this?

    I don't know if it's been mentioned, radarr an alternative to couchpotato is getting a lot of traction, its so based on sonarr.

    I have a donate account on Paypal, yes. donate.to.digitalhigh@gmail.com ;)

    To trigger Alexa, I have not gone down that road yet. On Google Home, it looks like commands can be invoked by "Tell Phlex to play Batman Begins'. This then passes the command directly to the API.ai bot, which parses it, bounces the command to the Phlex instance, processes it, does a thing, and then sends back a reply.

    What's nice about the API.ai stuff is that because I put some forethought into designing this, all of the info I need to format questions and responses is already present. I record whether or not I find media, the relevant identifiable information on it, and what the status of the command was sent to the player. So, the bot can say back the actual title of what it found, and whether or not it was played successfully.

    Today, I'll be working up prompting for multiple results and the second command to play a specific title, etc.

    Oh, also already got it saying "I couldn't find that in your collection, would you like to download it?".

    For Alexa, one of my testers already has one, so I'll get my new code pushed to git for them today, we'll see what it takes to actually get it talking with a "not-google" service. :D

    Yeah yea, also, I want to see about if it's at all possible ever to trigger playback from outside the network. If it is, this whole thing could be hosted somewhere in one instance and tied to ppl's Plex account using Oauth...

    Maybe...

  • Main PlexMain Plex Members, Plex Pass Posts: 200 Plex Pass

    Really exciting!

    I was like a kid at Xmas telling my wife about what alexa could potentially do soon (I hope)

    How are you getting on with PMP
    I'm the same as another poster on here my wife like PMP so I'm stuck on it.

  • digitalhighdigitalhigh Members, Plex Pass Posts: 245 Plex Pass

    @Main Plex said:
    Really exciting!

    I was like a kid at Xmas telling my wife about what alexa could potentially do soon (I hope)

    How are you getting on with PMP
    I'm the same as another poster on here my wife like PMP so I'm stuck on it.

    Haven't looked at the PMP issue much yet, been going nuts with all the things related to API.ai integration.

    However, I did just reach out to the fellow who's doing the Alexa Skill for Plex. Hopefully, we can chat, maybe collaborate or at least share information. I'd hate to have my hard work rendered useless when Plex rolls out an official Voice action a week before I'm ready to release this. :/

  • Main PlexMain Plex Members, Plex Pass Posts: 200 Plex Pass
    edited January 25

    Yeah I understand that are they really that close?.

    Linking it to sonarr and couch would be a winner for a lot of people.

    My thinking is
    Watch (insert movie/tv)
    Response
    I don't have blah blah would you like me to grab it

    Then again I can now imagine my young son asking for a lot of random stuff lol

  • digitalhighdigitalhigh Members, Plex Pass Posts: 245 Plex Pass

    @Main Plex said:
    Yeah I understand that are they really that close?.

    Linking it to sonarr and couch would be a winner for a lot of people.

    My thinking is
    Watch (insert movie/tv)
    Response
    I don't have blah blah would you like me to grab it

    Then again I can now imagine my young son asking for a lot of random stuff lol

    That's the functionality I've got in place now. At least, the responses. "I'm sorry, I don't have XXX. Would you like me to download it?".

  • Main PlexMain Plex Members, Plex Pass Posts: 200 Plex Pass

    When your ready I would highly recommend posting this in r/plex on reddit :)>-

  • kevman95kevman95 Validating, Plex Pass Posts: 7 Plex Pass

    Im waiting for Cast protocol support, i do hope this is still on your radar as well. As that is all i got.

    Again, im constantly watching this, i am very interested with adding the functionality to my Google Home :)

    Thanks again for this!

  • lolcatzurulolcatzuru Members Posts: 9 ✭✭

    this is good stuff, i plan on donating again when i have money.

  • WeeflixWeeflix Members, Plex Pass Posts: 238 Plex Pass

    I can't wait for release. Hopefully someone will be able to create an unraid docker for Phlex for ease of installation.

  • digitalhighdigitalhigh Members, Plex Pass Posts: 245 Plex Pass

    @Weeflix said:
    I can't wait for release. Hopefully someone will be able to create an unraid docker for Phlex for ease of installation.

    From what I'm understanding about the Google Actions API stuff, for this to be a "simple to use" addon for Plex, I'd need to be able to have Google authenticate against the Phlex server or some other fixed public website in order to accommodate the work of talking between google and a Phlex instance and/or Plex. For the downloading bits, it'd almost definitely require a single solution.

    That is, of course, almost totally separate from what I've been describing with IFTTT. That will work for all the stuff I've been describing, it's just iFTTT will only read back what you ask it, nothing more.

    With the API.ai stuff, it becomes a slightly bigger hurdle, but offers the possibility of doing stuff like asking if you meant a show or movie, telling you you don't have that thing you want to watch, but you can download it, or asking for clarification if several results are found. And I can make it swear.

    So, my wheels are turning at full speed, and I'm honestly thinking about setting up some kind of very basic website where you can set up a user and pass, which then gives you an oauth token to talk to the server with your Google or Alexa apps.

    Also, I'm very nearly convinced that you can trigger remote playback on Plex without being on the same network as the player by sending commands to the server. Or...there's got to be some way that @OverloadUT is able to make an Alexa skill that doesn't need to be tied to an on-site application.

    If that's the case, then yeah, I might very likely start a website up or something...

  • lolcatzurulolcatzuru Members Posts: 9 ✭✭

    @digitalhigh said:

    @Weeflix said:
    I can't wait for release. Hopefully someone will be able to create an unraid docker for Phlex for ease of installation.

    From what I'm understanding about the Google Actions API stuff, for this to be a "simple to use" addon for Plex, I'd need to be able to have Google authenticate against the Phlex server or some other fixed public website in order to accommodate the work of talking between google and a Phlex instance and/or Plex. For the downloading bits, it'd almost definitely require a single solution.

    That is, of course, almost totally separate from what I've been describing with IFTTT. That will work for all the stuff I've been describing, it's just iFTTT will only read back what you ask it, nothing more.

    With the API.ai stuff, it becomes a slightly bigger hurdle, but offers the possibility of doing stuff like asking if you meant a show or movie, telling you you don't have that thing you want to watch, but you can download it, or asking for clarification if several results are found. And I can make it swear.

    So, my wheels are turning at full speed, and I'm honestly thinking about setting up some kind of very basic website where you can set up a user and pass, which then gives you an oauth token to talk to the server with your Google or Alexa apps.

    Also, I'm very nearly convinced that you can trigger remote playback on Plex without being on the same network as the player by sending commands to the server. Or...there's got to be some way that @OverloadUT is able to make an Alexa skill that doesn't need to be tied to an on-site application.

    If that's the case, then yeah, I might very likely start a website up or something...

    This is very exciting.

  • digitalhighdigitalhigh Members, Plex Pass Posts: 245 Plex Pass

    Allright allright allright allright!

    Been on a kind of "philosophical hiatus" the past few days, turning over the new issues and ideas presented by API.ai. The most pressing of questions being - How do I make this as easy for people to implement as possible, without also requiring I make people jump through fifteen-hundred different flaming hoops?

    The answer came to me just now, as I read through Autovoice's setup instructions in a post on XDA-Developers.

    Basically, the way he is implementing the setup of AV with a personal device is very clever:

    You create an API.ai account, set up an "AI" named AutoVoice. Don't configure anything else.

    Get your API.ai Auth tokens, put them into AutoVoice.

    AutoVoice then pushes whatever commands you configure TO API.ai via their API, which handles the work of communicating between the official Google action and API.AI.

    This is something I can totally do. My idea is now this:

    You still need to set up a Phlex device on your home network. My intention as of right now is to package this as a self-contained version of XAMPP/LAMP/WAMP. I can set the PHP.ini settings so that stuff just works OOB, I can add a script that handles most of the work of grabbing and registering a SSL cert for the server, and that can all be shoved into a Docker container as well. :D

    Once Phlex is up, you can either set up the V1 API to talk with IFTTT and do "dumb responses".

    Or, you can pop into Phlex settings, throw in API.ai keys, and it'll reach out to API.ai and create the agent and link it up with your Google account automagically.

    Yeah, yeah, that should totally work. XD

    So, okay. I have a plan again, and it doesn't require I rewrite 3/4 of the code I've already got. Just add a bunch more.

    Yay. I love figuring stuff out.

  • dbinottdbinott Members, Plex Pass Posts: 65 Plex Pass
    via Email
    Thanks for the great work. Please don't rely on IFTTT for this. It can be
    unpredictable.
  • digitalhighdigitalhigh Members, Plex Pass Posts: 245 Plex Pass

    @dbinott said:
    Thanks for the great work. Please don't rely on IFTTT for this. It can be
    unpredictable.

    Nope, I'm absolutely not. It will be another way you can integrate with this, but as of right now, I am going to be targeting API.AI as the recommended method of tying this to a voice agent, with IFTTT being an optional or alternative method of using it.

    As of my previous post, I've already got the UI set up to input the required API.ai credentials and store/access them, and I'm actively going over their API for modifying bots to figure out how to push up the Bot I've created for anybody that uses it. :D

  • dbinottdbinott Members, Plex Pass Posts: 65 Plex Pass
    via Email
    awesome. thanks
  • lolcatzurulolcatzuru Members Posts: 9 ✭✭

    @digitalhigh said:

    @dbinott said:
    Thanks for the great work. Please don't rely on IFTTT for this. It can be
    unpredictable.

    Nope, I'm absolutely not. It will be another way you can integrate with this, but as of right now, I am going to be targeting API.AI as the recommended method of tying this to a voice agent, with IFTTT being an optional or alternative method of using it.

    As of my previous post, I've already got the UI set up to input the required API.ai credentials and store/access them, and I'm actively going over their API for modifying bots to figure out how to push up the Bot I've created for anybody that uses it. :D

    i managed to scrounge up some more money and donated it to you again, thanks for all the work.

  • Ph4rPh4r Members, Plex Pass Posts: 18 Plex Pass

    Thanks for the help today, I wish you the best on this project. Maybe you extend it to Alexa in the future and I give it a go.

Sign In or Register to comment.