Flex TV: I'm not Dead, I Swear

@Flippage said:
This is really coming along amazingly.

One question in relation to:

My intention as of right now is to package this as a self-contained version of XAMPP/LAMP/WAMP.

How difficult is it going to be to set up on an existing XAMPP setup?

I’m already running a webserver with all of my other apps, so I’d prefer not to have to setup a second instance, or to overwrite what I have.

This is probably a bit early to be asking, but I figured I’d throw it out there. If you factor in that most people with Plex would probably have a webserver running already.

Can’t wait until this is ready to test with PMP :slight_smile: - My excitement is palpable.

Once again, amazing work mate. You’re doing so much with this project, and meanwhile the PMP devs haven’t done anything for the last few months. That may be why you’re not getting a response from the PMP devs? They’re supposedly releasing a new version of PMP… One day.

Might be easier to integrate with this, once the new version is released.

Shouldn’t be that difficult at all. You need CURL enabled. You need to suppress some warning messages, but those should be squashed on my end before release. It’ll need a valid SSL certificate. And more than likely, I’m thinking my final implementation will need to be able to listen on a custom port, as I may wind up using the devices.xml endpoint directly on Plex in order to facilitate figuring out the IP address of the Phlex server. :wink:

Today, yesterday, I worked mainly on UI stuff and making the API.ai stuff smarter. There’s now a button in Settings to allow deploying the API.ai config directly to their site in the event I update the code, etc. I have little “test” buttons set up to verify that Phlex can talk to Sonarr/CouchPotato/Plex/Etc. The login screen isn’t just an ugly black voide.

And for API.ai, I’ve now added the ability to detect multiple results for a search, and then ask you which one to play and respond by playing the title you stated, etc. It can now handle search requests directly, as well as most “play, stop, pause, skip, seek” commands. And, as I’ve mentioned, if you do not have a piece of media you requested to play, it’ll ask if you want to download it…and then it’ll download it.

Behind all this is a lot of work to adhere to Google’s requirements for conversation stuff. You have to queue the app to stop listening for requests after playing something or downloading something. You have to tell it to switch to a new intent when downloading or asking for results. It’s a lot to learn in a short time.

Still have to figure out how I handle the bit of linking up every individual Phlex server to a main one, which in turn handles the authorization between Google/Alexa and Phlex, and shuttles commands to the specific server. Fortunately, I can use a person’s Plex username and password to authorize against Plex.tv, then pull the device list and find the public IP of the Phlex server, so I shouldn’t have to personally cache any kind of information for anybody. I hope. I really don’t want anybody’s info, I just want this to work like an official app.

So, that’s what I’m working toward. Not just some hacky thing only master developers can install, but that anybody with the ability to install Plex can set up and use with minimal hassle.

Anybody familiar with the process of google authorization…hit me up. That’s next on my list to crack into - API # 6 or 7 to learn. :stuck_out_tongue:

but google assistant is coming very soon on shield, mibox and some others android tv and so don’t need to have a google home anymore to use ok google. will it work with google assistant on the shield ?

@user654784 said:
but google assistant is coming very soon on shield, mibox and some others android tv and so don’t need to have a google home anymore to use ok google. will it work with google assistant on the shield ?

I can’t say for certain, but if it’s the exact same assistant, then I don’t see why not. It works with the Assistant on my phone.

Can you just imagine:

“Hey Alexa, I’m missing season 2 episode 5 of House, download it for me.”

the possibilities!

@digitalhigh thanks for keeping us all updated on your progress :slight_smile:
will the first release come compatible with Alexa?

This is progressing nicely awesome work @digitalhigh! I would like to suggest integration with SickRage which is a fork of SickBeard if possible. I of course could switch to Sonarr which I would like to check out anyway. Either way my primary use would be to tell it to play something from Plex, the downloads are just really nice additions. Rock ‘n’ roll!

@danjames92 said:
Can you just imagine:

“Hey Alexa, I’m missing season 2 episode 5 of House, download it for me.”

the possibilities!

Hmmm. That reminds me…I haven’t actually set up “named episode” downloading yet, it just looks for series title. Maybe I should work on finishing out Sonarr stuff at some point in time today.

@“Main Plex” said:
@digitalhigh thanks for keeping us all updated on your progress :slight_smile:
will the first release come compatible with Alexa?

I can’t say for sure yet. I’ve been focusing on doing my homework for proper google Home integration first, as there’s already somebody working on a proper Alexa skill for Plex in an official capacity. I think it really will depend on how different Google And Amazon’s authentication systems are, and how complex it will be to add an account linking bit for Alexa like I’m working on with Google.

Really, the only thing I’m using API.ai for is to strip the “I want to watch” and “Can you play’s” off of my queries, the rest of the language parsing is all done manually by my code. :smiley:

@SCDemanett said:
This is progressing nicely awesome work @digitalhigh! I would like to suggest integration with SickRage which is a fork of SickBeard if possible. I of course could switch to Sonarr which I would like to check out anyway. Either way my primary use would be to tell it to play something from Plex, the downloads are just really nice additions. Rock ‘n’ roll!

SickRAGE. Check. Hopefully, as Sonarr is a fork of SB, they’ll all use the same-ish API. That would be excellent.

Also, started writing the “main server” component of this last night, today I intend on working out how to make it prompt to link to your Google/Plex account, then store a token to correlate all that data. Also posted on Stack Overflow, I should probably look and see if I got a reply there yet…my guess is somebody just ripping me a new one for not phrasing it correctly or posting it in the wrong section or something.

Gotta love SO…

You just made it to my watchlist :wink:

Additional challenge for you: I am an Alexa user (and would require German language skill - which I would be willing to assist in translating).

See my signature… my PMS is running locally on a QNAP NAS… a web server is already running on it… wouldn’t that make a perfect place to put Phlex also to it? :slight_smile:

I really cannot wait see this being done.

Of course, I would be willing to act as a BETA tester for Alexa development also… :wink:

Cheers.

@rossinior said:
Of course, I would be willing to act as a BETA tester for Alexa development also… :wink:

I’d second this
I have my own domain secure with a signed ssl
All linked to idashboard so I can access htpc manager|omni|sonarr|couchpotato|mylar

Windows 10

@“Main Plex” said:

@rossinior said:
Of course, I would be willing to act as a BETA tester for Alexa development also… :wink:

I’d second this
I have my own domain secure with a signed ssl
All linked to idashboard so I can access htpc manager|omni|sonarr|couchpotato|mylar

Windows 10

iDashBoard?!?!?!

Oh no, you need to be using Muximux. I hear one of the developers is a real standup guy. :wink:

This might be of interest to you @digitalhigh
https://play.google.com/store/apps/details?id=com.atomjack.vcfp

Seems you can use Tasker on android to link this to your Google Home.

You have some competition :wink:

I don’t have Android though, and his app doesn’t support PMP either, so it’s no use to me. Thought other people might be interested though. Competition is healthy. I’d still prefer to run this at the server level though, rather than relying on a phone app.

Really hope this wont be too difficult to implement. I’m familiar with xampp and can create a ssl certificate but I hope that is enough.

@XmemphistoX said:
Really hope this wont be too difficult to implement. I’m familiar with xampp and can create a ssl certificate but I hope that is enough.

As of right now, the SSL requirement will probably be going away.

Today I’m working on “the main server” of Phlex, and integrating registration and google linking. It’s fun…trust me.

So far, I’ve got the “big boy” server set up and an SSL cert created for that.

I have the “phlex client” application auto-registering it’s IP address and the user’s API token with the main server.

I have API.ai pointed at the main server, and set up to require Google “account linking”. This mostly works. You get a neat little card in the Google Home app that tells you to link your account. Click the card, it takes you to the main server, where you’re then prompted to allow google to view your basic info. This redirects you to another page on the server where you need to re-enter your API key. Once you enter a valid API key, the Google token gets stored with your server IP and Phlex key.

And for the moment, this is where I’m stuck. I can save all the data and associate the Google Token with Phlex key and IP. But, I’m fighting with Google to return the proper confirmation message to let them know that I have a key and that the account is linked.

Once I sort that bit out, then I still have to write the mechanism that will take requests from API.ai, associate them with the user’s Google Token, and then shuttle the request off to their individual server. But that part should be pretty easy.

Similarly, I should be able to write a very very similar mechanism that utilizes Alexa’s authorization system instead of Google, so I just need to look up a person’s respective token in order to know where their server is.

And the nicest part - I don’t have to store ANY identifying data about you or your setup in order for it to work. As the client is written currently, the API token can only be used to send commands to Phlex, not access the UI, so the worst that could happen if the main server were compromised would be a person could download crappy movies or trigger player commands until the API key were reset on the client.

All of this is very exciting for me. TBH, the concept of hosting a centralized server somewhere, as well as dealing with Google Auth and all this other stuff was a bit daunting. What started as a moderately simple project has become quite complex…so to have this part mostly worked out now is a big relief. I am hoping that in a few more days, I can have all the big moving pieces finalized and working so I can submit my Action to google for “for real” approval as an actual app.

Y’know…versus a hacky implementation that requires hijacking the mic on your phone to do voice commands. Ain’t nobody got time fo dat…

This should really be implemented using a direct action rather than a conversation action, but the direct action API isn’t open yet.

James

Hey All,

I have made a small guide to get Google Home working with Plex. It’s is a bit hacky and definitely no where near as amazing as digitalhigh’s bespoke program sounds, but it just about works for anyone who desperate! :slight_smile:

@digitalhigh

Did you see the new WebHooks?
https://support.plex.tv/hc/en-us/articles/115002267687

Can this make things easier for you?

For those of you with an echo Plex just became an Alex skill.

https://www.plex.tv/alexa/

Since I don’t have an echo I’m still anxiously waiting for Phlex !

@Flippage said:
@digitalhigh

Did you see the new WebHooks?
https://support.plex.tv/hc/en-us/articles/115002267687

Can this make things easier for you?

Not…especially?

No, the webhooks are more of a “update the status of other things on what Plex is doing” - from what I understood of the article.

So, you’ve got a lighting system - you could auto-dim your light when plex sends a JSON message to controller X"s IP address saying playback has started.

Hell, actually, I could do the same thing with Phlex…and the JSON format would even be similar! Although it could still be an interesting thing to play with for other purposes.

Also, I saw the Alexa skill is available now too. Which is neat. But…does it download stuff you don’t have?

I could get all flustered and rush to release this just to say I had it out there now…but I think it’ll wind up a much better product if I take my time and work on making this the best API-API interface out there. :smiley:

On that note - I’m noticing the “web app” for the actual Plex server is just .js files…I’m highly considering trying to convert all the work I’ve done so far into JS. Theoretically, I could just make this a bundle for Plex that you drop right onto your server, versus all the work of a separate instance and all that jazz. We’ll see. It seems like every day is bringing big conceptual changes to this project.

Hey, wanted to say thanks for your work and share some personal experience

Having used sickbeard, the TPB sickbeard fork, sickrage, then finally landing on sonarr - I can say that for me nothing automated is going to be used too often. Kind of like sending text messages by voice commands, too many hooks needed for effectiveness. It may just be my personality, but the defaults on sonarr rarely ever serve me. When adding a series I sometimes want all past episodes, only future episodes, sometimes full HD, etc

Also I never seem to be happy with couch potato for the same reason. I basically leave it as a metadata grabber / renamer but rarely ask it to go grab anything

Anyway, not to discourage your work by any means, but after trying automation I mostly went to full manual for adding (except some tasks like renaming and sonarr which always finds new episodes without intervention already)

Your project is exciting to follow. A bundle that you could drop in to your plex server that enables Plex playback on Google home would be very fun. Sometimes the best approach for multiple purpose apps is multiple apps. Just a thought. Thanks again for your work

@theolympuserver said:
Hey, wanted to say thanks for your work and share some personal experience

Having used sickbeard, the TPB sickbeard fork, sickrage, then finally landing on sonarr - I can say that for me nothing automated is going to be used too often. Kind of like sending text messages by voice commands, too many hooks needed for effectiveness. It may just be my personality, but the defaults on sonarr rarely ever serve me. When adding a series I sometimes want all past episodes, only future episodes, sometimes full HD, etc

Also I never seem to be happy with couch potato for the same reason. I basically leave it as a metadata grabber / renamer but rarely ask it to go grab anything

Anyway, not to discourage your work by any means, but after trying automation I mostly went to full manual for adding (except some tasks like renaming and sonarr which always finds new episodes without intervention already)

Your project is exciting to follow. A bundle that you could drop in to your plex server that enables Plex playback on Google home would be very fun. Sometimes the best approach for multiple purpose apps is multiple apps. Just a thought. Thanks again for your work

Well now, this could be a great opportunity to toss a little feedback into the app.

What about TV automators don’t you like? This isn’t just a chance to have some hooks to do “a thing” by voice command - but to have a full on conversation and tell it what you want. Okay google - I want to download all the episodes of Buffy The Vampire Slayer. OK Google, I want to download the latest season of House. Etc. What should it do?

For Couchpotato, I found that the only thing I really needed to tweak was the quality profiles - I just made one profile called “best” which has all qualities available, and then it’s set to mark it as finished once it gets final quality version.