Rpi as custom dns for trailer app?

Hello everyone,

First off big thanks to all the makers of Plex Connect, I love my apple tv again:)

 

Now my girlfriend want me to remove plexconnect because she cant use the apple tv without my laptop in the network (without resetting the dns all the time)

 

So I have investigated in the possibility to do a DNS entry for trailer.app to my PMS IP so it wont effect all apps and airplay.

 

But It dosent look like my router Tomson T789VN support custom dns entrys.

 

So i just want to check if it would work to have raspberry PI setup as a custom DNS for the apple tv?

 

I dont have any fancy NAS or stuff like that.  

 

I just want two custom DNS entries on my localnetwork for:

 

trailers.apple.com  ipofyourplexconnect

atv.plexconnect   ipofyourplexconnect

 

Would it be possible to do this on a raspberry PI?

 

Thanks

 

Pop

 

 

 

You could just run PlexConnect on your PI :wink:

You could just run PlexConnect on your PI ;)

Hm,  Would it be easier to set up?;)

Probably, it uses very little power and you would not have to worry about turning your laptop on to use PlexConnect.

Thanks I will look into it! 

wished there was a Host file on the router where i could copy past the dns entry.. :(

To answer your original question though, PlexConnect does support using your own DNS server.

See the advanced options section of the wiki.

just to clarify.

say Plex runs on my pc on 192.168.0.100

and PlexConnect runs on my Pi on 192.168.0.5

if i point my AppleTV to 192.168.0. 5 for the DNS setting, then will everything (apart from trailers) work as normal when my PC is off? (assuming the Pi is always on)

thanks

j

PMS will need to be on as well.

sorry what i meant was, will PlexConnect continue to do the normal routing for my AppleTV, but just not be able to do any media-serving (obviously since PMS is off)

well that would be the ideal situation... currently if my PC is off I have to go to my AppleTV settings and repoint the DNS. what would be useful is if the AppleTV remained functional (apart from the trailers app/plex stuff) when the PC was off, because everything is being routed thru plexconnect on the Pi.

ie could we have it so that if no PMS is found then PlexConnect just routes trailers.apple.com to trailers.apple.com. 

that means if run PlexConnect on my Pi and leave my Pi on, the AppleTV will always work whether the PMS is on or not.

if PMS is on then i get Plex instead of Trailers.

I believe it will work the way you want it to. As long as Plexconnect is setup correctly and running it will forward all apps to the dnsmaster ip even if PMS is not running.

but trailers.apple.com won't work? 

i was thinking something along the lines of

pseudocode:

param['HostToIntercept']="trailers.apple.com"

there’s a PMS_list in PlexAPI.py although not sure if that requires PlexGDM (which doesnt work for me)

anyway somehow work out if we have a plex server present then…

if num_connected_PMS > 0
hijack = param[‘HostToIntercept’]
hijack_twisted = hijack[::-1]
intercept = [hijack, param[‘HostOfPlexConnect’]]
else
intercept = param[‘HostToIntercept’]

No, as it stands now trailers will not work in its default capacity or as a Plex client while Plexconnect is running and PMS is not on. I’ll leave it to Baa to comment on your code suggestion.

hi, 

i wasnt expecting it to run as a plex client while PMS is not on, i'm just trying to avoid constantly switching my aTV DNS setting, depending on whether my PC/Plex is on or not. since it is likely i'd leave my Raspberry Pi on for various purposes, (and also becuase PlexConnect can presumably also run on a NAS box) i thought this might be a good solution

yes, i'll see what Baa thinks. thanks for the feedback

j

i wasnt expecting it to run as a plex client while PMS is not on, i'm just trying to avoid constantly switching my aTV DNS setting, depending on whether my PC/Plex is on or not.


I am clear about what you want. I was just trying to be precise in my answer.

i was just trying to be clear in my question, for anyone else reading ;)

it's not a big issue as such anyway. i set my PC IP address to 192.168.0.100 to be as close to my DNS server 194.168.4.100 as possible. it's only changing 2 numbers in the settings in the end, it'd just be nice not to have to.

i'm new to python so i might have a go at trying to implement my suggestion anyway. the only thing i dont know how to do is get the PMS_list from the other module (if it even uses PMS_list for non-GDM setup). I'll try putting a public function in PlexAPI.py to getPMSList() or something and see i can access that

thanks

It is an interesting idea but you may run into the issue of the ATV caching the trailers DNS entry, we did try and use this to reenable the trailers app before.

Without being able to remotely flush the ATV DNS cache it may not work or only work intermittently.

Feel free to try though and let us know :)

I am with f00b4r on that one...

i'm with f00/Baa on that one!

to be honest...i had a play, i dont really know python and i couldnt quite get my head around everything that was going on. but you're right I dont think the requests were going through for the DNS because they were cached.

it was good to see plexconnect worked straight off on my Pi though. I'm just trying to work out if there's a benefit to running it there rather than on my PC media server.

thanks

j

oh because when the PMS PC is off, everything will still work apart from trailers right, because the rest of the DNS is being forwarded by PlexConnect on the Pi?

ah yes that would be a benefit.