HowTo: Plexconnect on Server 2012 R2 Essentials (with Icons)

I've managed to get PlexConnect running on a Server 2012 R2 Essentials box, which is no small feat due to the following:

 

It has integrated DNS

It has integrated Webservers on http and https.

 

As a Bonus, I also took all the icon code floating around, and broke it into a separate module so there's little code left in WebServer.py (so the icon code should survive git pull requests pretty well)

 

I did put a little bit of MS specific stuff in the icon module - specifically the proxy address passed by ARR, but it's backwards compatible and should not hinder those who want to use the icon code without the MS stuff.

 

Anyway, Take a look at the instructions and the changes at my github: https://github.com/megahambone/PlexConnect - I look forward to any feedback.

So can you hijack any desired hosttointercept and serve any compatible icon with this new webserver.py & icon.py? Does it work with any iOS revision 5-7 & 8? Can there be detection for iOS 5-7 and iOS 8? Do you need a modified DNSServer.py anymore?

iOS 5-7

https://github.com/wahlmanj/OpenPlex/blob/master/update/OSX/icon/ios7/DNSServer.py

https://github.com/wahlmanj/OpenPlex/blob/master/update/OSX/icon/ios7/WebServer.py

 
icons:
 
https://github.com/wahlmanj/OpenPlex/tree/master/update/OSX/icon/ios7

iOS 8

https://github.com/wahlmanj/OpenPlex/blob/master/update/OSX/DNSServer.py

https://github.com/wahlmanj/OpenPlex/blob/master/update/OSX/WebServer.py

icons:

https://github.com/wahlmanj/OpenPlex/tree/master/update/OSX/icon/ios8

This would be a great addition to the main code if it all works properly.

Edit - Ah, I see you put the DNSServer.py stuff in the Icon.py file, nice work. :)

Just thinking out loud here:

Maybe you could make a setting in PlexConnect.py to switch icons that pulls from the detected iOS 5-7 or iOS 8 icon folders. Maybe add (link) this post to here for more exposure and for a solid reference for others:

Trailers icon to Plex icon

Edit 2 - Linked it for you. I can't wait to add this to OpenPlex once it all works and for all users to be able to use this....awesome work man very glad someone found a good solution to this. Keep up the good work :)

wahlman.j:

I am such an idiot. I totally forgot about attribution. I'll take care of that right away.

I'd be interested in seeing how to implement the icon code for ios 5-7 (or if someone's using that version, I'm amenable to pull requests)

My situation is so weird, because I don't have any ability to run DNS on my box, as it's already my AD DNS server, so that's why I put in the resolver/dns stuff.

Thank you so much for the feedback!

wahlman.j: I don't see any major difference between ios 8 and the 5-7 stuff. Is it just the icon names? If so, that's a quick fix.

The icon sizes are different on iOS 8 compared to iOS 5-7 thats why I created a icon set for the different iOS revisions. Also using iOS 5-7 the hosts to intercept are different for most of them if you look at the indepentent WebServer.py for the different iOS revisions for 5-7 & 8 on my Github. 

Hi, I currently run Plexconnect on one of my Windows PCs, but I'd like to move it over to my Windows Server 2012 R2 Essentials.  I'm glad I stumbled upon this thread and the PlexConnect Essentials Build.  

I'm trying to go through the steps listed on https://github.com/megahambone/PlexConnect and I'm stuck on step 2.   I don't see the "Request Settings" on the right pane.  Am I in the right place (see screenshot below)?  

Thanks.

IIS%20screenshot.JPG

At a guess it should be the “Request Filtering” icon, second row and eighth from the left in the “IIS” icon section.

At a guess it should be the "Request Filtering" icon, second row and eighth from the left in the "IIS" icon section.

Thanks so much roidy!  I was able to find it.  I got down to step #6 now and I'm not sure if I got everything set up correctly.

The last step of #6 is:

a port 443 binding for secure.marketwatch.com with SNI and your certificate selected

I don't see the option to selecting the certificate.  And I'm not sure what SNI means.  I'm at this screen:

IIS%20screenshot2.JPG

(I'm replacing the trailer app instead of the WSJ Live app)

Sorry, no idea… I don’t use Server 2012 R2 Essentials. You’ll need to ask the author of the original instructions, try sending him a PM.

Sorry, no idea.... I don't use Server 2012 R2 Essentials. You'll need to ask the author of the original instructions, try sending him a PM.

Thanks anyway.  Hopefully Megahambone still monitors this thread and can help.

As I said, try sending him a PM or create an issue on his github, maybe he’ll see that.

You need to be doing a type of Https not http to get the ability to select your certificate.

anyone had any problems with Plexconnect settings being locked on their ATV?
 
running plexconnect on server 2012 R2 Standard.
hijacking trailers on ATV3
 
basically, I can't change any settings in plexconnect on the ATV.
for example, if I wanted to change movies from grid view to list
the value just doesn't change, as if it's locked.
 
i followed this guide
https://forums.plex.tv/topic/147160-another-server-2012-r2-iislocal-dns-guide/
 
and am running into this problem.
https://forums.plex.tv/topic/76231-cant-change-anything-in-settings/
 
please help!

Hallo,

nice work but i've got problems with https and icons. Plexconnect failed to connect to https . The Instructions  on git are not complete ( 7).4). 

OK,

i found now the rest of the instructions. But i have got still the https error.

If i delete the conditions {CACHE_URL}, than i can start plex. But still have the error with the https and cannot change some settings.

I got the private message, but I'll post here as well. Essentials is a complicated build of Windows Server, so the first step is to make sure that your IIS is working in general. Do you have a https://your.site.here/remote page working?

Make sure IIS is working, Then follow the instructions (here's the raw view: https://raw.githubusercontent.com/megahambone/PlexConnect/master/README.md)

A lot of the install is the same as plexconnect out of the box, but it gets tricky after the fact.

Basically, you're setting up an IIS reverse proxy - so you need to ensure IIS is working. Then, you need to set plexconnect to work on non-standard ports (because 80 and 443 are owned by IIS) - I took 8090 and 8091. Then, because the request hits IIS first instead of plexconnect, you have to have the certificate there too. The IIS reverse proxy is bound to listen to the site you set up (I used secure.marketwatch.com) - it listens on 80 and 443, and forwards the request to 8090 and 8091 so that plexconnect can do its thing.

Because of the complexity of the whole picture, telling me that it doesn't work isn't really a good starting point. You've got IIS to check, so look at your IIS logs. You have ARR to check, you have plexconnect to check, you have split dns to check. Also, the fact that plexconnect isn't starting tells me that there's a port conflict, so that makes me wonder if you set the http/https to 8090 and 8091 on the application. If it is starting, I misunderstood.

If it's strictly an HTTPS issue - did you double-check that the certificate was added to the essentials box? Did you use mmc and edit the local certificate store to add the certificates, as described? Once you did that, did you insure that the IIS binding for your site refers to that certificate?

Also, did you install the certificate on the appletv? I didn't put that in the steps - but you will need to load the certificate on the atv as with a vanilla install.

I can't stress the complexity enough. Basically, plexconnect is awesome - but it has built-in dns and webserver components which won't work on an essentials box, so you need to disable plexconnect's dns and use the essentials dns instead - you do this by adding new zones. You can test this out by adding a zone, doing a ipconfig /flushdns and then pinging the zone (ping secure.marketwatch.com) - this should return the internal address of the essentials box. Then the webserver stuff - you can't turn it off, but you can change to ports that aren't being used and proxy back instead.

I don't know what to tell you, but I'll try to help - we just need to pinpoint the issue a little more clearly.

any help with my issue?

anyone had any problems with Plexconnect settings being locked on their ATV?
 
running plexconnect on server 2012 R2 Standard.
hijacking trailers on ATV3
 
basically, I can't change any settings in plexconnect on the ATV.
for example, if I wanted to change movies from grid view to list
the value just doesn't change, as if it's locked.
 
i followed this guide
 
and am running into this problem.
 
please help!

@kang159 i think your problem is the same as mine, because if i delete {CACHE_URL} pattern=:^(http)://"  plexconnect works but i cannot change setting.

The main problem is still that my https cannot connect to port 8091.

Actually i checked all from the raw instructions. At Point 7.) i have to change internal.ip.of.server to the IP of my server, or? Is there something else i have to change?

OK i found my mistake.

With python 2.7.9 they now validate ssl certs by default. So i downgrade to 2.7.8. But i have the same problem as kang159. I cannot change my streaming settings. So this error don't belong to mine. And I also changed the {CACHE_URL} form "^(http)://" or "^(https)://)" to "^(.+)://".

I've looked in my IIS logs and found this

2015-04-07 18:21:06 192.168.66.1 GET /&PlexConnect=SettingsToggle:TranscodeQuality+Settings_Main&PlexConnectUDID=DY3J8FY7DRHN - 80 - 192.168.66.54 AppleTV/7.1+iOS/8.2+AppleTV/7.1+model/AppleTV3,1+build/12D508+(3;+dt:12) - 404 11 0 4

So i receive, that i want to change some settings but i can't change it.

Are you running PlexConnect as admin?

Yes