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!

PlexConnect on aTV2/jailbroken -> launchctl

baabaa Members, Plex Pass, Forum Moderator Posts: 3,954 Forum Mod

In reference to... https://forums.plexapp.com/index.php/topic/72129-new-hack-running-the-plexconnect-python-script-on-your-jailbroken-atv2/?hl=%2Bnew+%2Bhack

 

Here is the thing:

With the support for the native client seemingly ceased and our improvements in running PlexConnect all over the world (OSX, Win, Linux,... directly or as daemon...) I took another look into "installing" PlexConnect on my aTV2.

Reusing most of the OSX launchctl stuff I was finally able to make it - it stays there, even after a reboot. No ssh and stuff required. :-D

 

There still are some rough edges that need work...

a.) Still hijacking Trailers. Though we should be able to add a nice new icon.

     -> ExtraInternetCategories.plist, bag.plist,... wahlman, jdilinger?

 

b.) With the OSX plist, launchctl dies at startup, when spawning the WebServer secondary processes

     -> sys.stdout.flush() doesn't work as stdout is - aeh - nothing?

Is this a limitation of iOS (5.2.x)? Or python 2.7.3 - nothing newer available?

Any iOS developers around with background information?

 

Currently I got it fixed with adding

 

<key>StandardOutPath</key>
<string>./PlexConnect_stdout.log</string>
<key>StandardErrorPath</key>
<string>./PlexConnect_stderr.log</string>
to the plist... but then it creates those two files... :-(
 
c.) there must have been a third issue, but I forgot...
 
Installation...
source files attached, unzip and add to latest PlexConnect/support/iOS (aTV jailbreak)
 
- SFTP into aTV and copy the complete directory to /Application/PlexConnect. Or somewhere else, whatever you prefer
- SFTP PlexConnect/support/iOS*/Settings.cfg to PlexConnect/Settings.cfg, overwriting the later if already there. We need some settings changed, like disabling the DNSServer.
- add PlexConnect/support/iOS*/hosts_addon_PlexConnect to /etc/hosts
- option: add PlexConnect/support/iOS*/hosts_addon_preventATVUpdate as well
- SSH into aTV, "cd /Application/PlexConnect", run "./support/iOS*/install.bash"
- check with "ps -ef". You should find 3 Phyton/PlexConnect related processes
- check with "launchctl list | grep .plexconnect.". You should get "<PID>  -  com.plex.plexconnect.bach.plist"
 
Usage...
Just hit the Trailers app!

Plex @ aTV - think different: PlexConnect

-> the missing link between Plex Media Server and your AppleTV - 2 or 3, jailbroken or not.

plex forums: [PlexConnect] -- github: [latest Sources], [Wiki] -- donations (paypal): [US-$][EUR]

«13456720

Comments

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013
    If we could host a bag.plist pointed at our pms on the atv2 that would be ideal. Then we could host the images as well and have a seperate app for plexconnect :). Fire up addsite point it at http://127.0.0.1/bag.plist or whatever. Let me try this and see what I can come up with. Then we could close ports 80 & 53 & our webserver port since its all on the atv :) only the pms port would need to be open with allow with auth wanip(s) if you take your atv from place to place since the atv hosts plexconnect.

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • f00b4rf00b4r Members, Plex Pass Posts: 2,914 Plex Pass
    wahlman.j wrote on December 7 2013, 9:46 PM: »

    If we could host a bag.plist pointed at our pms on the atv2 that would be ideal. Then we could host the images as well and have a seperate app for plexconnect :). Fire up addsite point it at http://127.0.0.1/bag.plist or whatever. Let me try this and see what I can come up with. Then we could close ports 80 & 53 & our webserver port since its all on the atv :) only the pms port would need to be open with allow with auth wanip(s) if you take your atv from place to place since the atv hosts plexconnect.

    Why do you need the PMS to allow the WAN IP, MYPlex takes care of this automatically.

    Plex @ aTV - think different: PlexConnect

    -> the missing link between Plex Media Server and your AppleTV - 2 or 3, jailbroken or not.

    Wiki: click here

    How to report an issue: click here

    Github (download the app): click here

    Donations (Paypal): [US-$], [EUR]

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    Only if you want configured channels, otherwise myplex would work as well minus configured channels. This is just my preference as the images show on this post:

    https://forums.plexapp.com/index.php/topic/86031-plexconnect-on-the-go-atv23-no-jailbreak/

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • f00b4rf00b4r Members, Plex Pass Posts: 2,914 Plex Pass
    wahlman.j wrote on December 7 2013, 10:08 PM: »

    Only if you want configured channels, otherwise myplex would work as well minus configured channels. This is just my preference as the images show on this post:

    https://forums.plexapp.com/index.php/topic/86031-plexconnect-on-the-go-atv23-no-jailbreak/

    No channel access for owned servers is not a limitation of MyPlex, it is merely because it has not been implemented.

    Plex @ aTV - think different: PlexConnect

    -> the missing link between Plex Media Server and your AppleTV - 2 or 3, jailbroken or not.

    Wiki: click here

    How to report an issue: click here

    Github (download the app): click here

    Donations (Paypal): [US-$], [EUR]

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    Heck if that was implemented on myplex that would be great :) No more needing to allow without auth on pms sounds good to me, is it also possible to put our library in the library tab when running myplex? You can call it myplexgo lol, just kidding obviously.

    Ok back to trying to get this to work with addsite. Also if we could get a a web server running on the atv, that would be great.

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    - SSH into aTV, "cd /Application/PlexConnect", run "./support/iOS*/install.bash"

    I got stuck there permission denied. Then I edited the com.plex.plexconnect.bash.plist to match the ATV directory structure then copied the file over via sftp then changed directory and fixed it up like this:

    cd /Library/LaunchDaemons

    chown root:wheel com.plex.plexconnect.bash.plist

    chmod 644 com.plex.plexconnect.bash.plist

    launchctl load com.plex.plexconnect.bash.plist

    When I ran the command:

    launchctl list | grep.plexconnect

    it says command not found any ideas?

    When I try to re-run lauchctl load com.plex.plexconnect.bash.plist it says already loaded. Here are some other errors that I can't figure out as well.

    atv-:/Applications/PlexConnect root# ./PlexConnect.py

    -sh: ./PlexConnect.py: Permission denied

    atv-:/Applications/PlexConnect root# ./PlexConnect_daemon.bash start

    -sh: ./PlexConnect_daemon.bash: Permission denied

     

    Do I need to change the password from alpine first? Didn't help using passwd to try to change it.

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • StoffezStoffez Members, Plex Pass Posts: 515 Plex Pass
    edited December 2013

    trying ur thing here Baa.. but am having trouble with the python thing.. i did get it to start and show up once.. but after reebot its gone again when i type the ssh commands to look for it.. any ideas? when i try to do the bash install again it says its already installed so..

    wahlman.. i had no problem installing it with the standard alpine psw

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    nevermind, I read your post incorrectly.

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • f00b4rf00b4r Members, Plex Pass Posts: 2,914 Plex Pass
    wahlman.j wrote on December 7 2013, 10:17 PM: »

    Ok back to trying to get this to work with addsite. Also if we could get a a web server running on the atv, that would be great.


    Um one of the main components of PlexConnect is a webserver, this is how you can load the cert profile just using PlexConnect and the ATV remote and how PlexConnect serves up the code to the ATV.

    Plex @ aTV - think different: PlexConnect

    -> the missing link between Plex Media Server and your AppleTV - 2 or 3, jailbroken or not.

    Wiki: click here

    How to report an issue: click here

    Github (download the app): click here

    Donations (Paypal): [US-$], [EUR]

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    I guess what I'm trying to say there is can I add a bag.plist like I do via addsite like this 127.0.0.1/bag.plist. On my mac I host 192.168.1.101:1234/bag.plist using a webserver when I add the bag.plist via addsite on the ATV2. Can plexconnect's webserver do that on the ATV2?

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • f00b4rf00b4r Members, Plex Pass Posts: 2,914 Plex Pass
    Maybe........

    Plex @ aTV - think different: PlexConnect

    -> the missing link between Plex Media Server and your AppleTV - 2 or 3, jailbroken or not.

    Wiki: click here

    How to report an issue: click here

    Github (download the app): click here

    Donations (Paypal): [US-$], [EUR]

  • StoffezStoffez Members, Plex Pass Posts: 515 Plex Pass

    wohaa got it working.. the problem was the certs (rookie mistake)

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    That would be great, then we could move away from this and just use addsite since this is a atv2 only solution anyways. Maybe it will make things a little easier, I don't know for sure. Im sure we can make a stupid easy bash script to automate the process.

    @stoffez can you pm me your plexconnect folder in a zip so I can look at it as well as any other edited files you used? :) I don't know where I'm dropping the ball here.

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • StoffezStoffez Members, Plex Pass Posts: 515 Plex Pass

    muhhaaa got the addsite working aswell... now when it points to 127.0.0.1 you can juts put this in your hosted bag file

    <string>http://127.0.0.1/Applications/PlexConnect/assets/js/application.js</string>

    then u get away from that thing where u havto change the ip everytime the ATV ip changes.. now if i could just free up the trailers app then we are good to go

    dont solve the (must have a webbserver issue to use addsite) but its a step in the right direction :D

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    It should be easy to implement a different app using addsite with a custom bag.plist. So I'm confused you can point at a bag.plist on the ATV2 or no? What iOS are you running by the way.

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • StoffezStoffez Members, Plex Pass Posts: 515 Plex Pass

    i just did.. i have the plex connect app right now.. just trying to fix so i can use trailers app as usuall to :D

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    Just set dns to auto, you must send me your folder in a zip, please o please, or host it on your web server so I can look at it. ;)

    How the heck did you get past that step I'm stuck on. If you can get me to where your at I can write up a easy how to and add addsite bash scripts to automate this. More progress on the ATV2 side, to bad for atv3 owners, I'm trying to fix adsite but I cannot host a bag.plist via https:

    https://forums.plexapp.com/index.php/topic/81972-installing-a-new-app-on-appletv-without-hijacking-trailers/page-21

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

  • StoffezStoffez Members, Plex Pass Posts: 515 Plex Pass

    i have it on auto.. in digging into the host file..think thats where the prob is :)

  • StoffezStoffez Members, Plex Pass Posts: 515 Plex Pass

    yup that was it :D the on the go now works :DDD

  • wahlman.jwahlman.j Members, Plex Pass Posts: 2,560 Plex Pass
    edited December 2013

    Get out, NICE! You must put up a full how to on how you did this! So if I'm following you correctly, you have plexconnect running on the ATV2 and a bag.plist hosting your plexconnect app with the dns set to auto? SCREENSHOT! Man does addsite need to be cracked open on the atv3! All apps work as they should?

    OSX apps : OpenPlex // UAS installer OpenPlex by Wahlman.j (Source Code), CyberGhost84 (GUI) & Flipman6 (Obj-C)

    iOS Firmware links: Firmware // Firmware Limits OpenPlex app or assistance. Donations appreciated US-$ // EUR

    Click my username and message me if you need Teamviewergif <----Install this for assistance.

    (1) Locally owned PMS Mac 10.9.5 i7-4770k haswell 32gb 1866 ddr3 with e-sata rocket raid 2302 Raid-5 set of (4) 5TB HD (15TB usable) in a 10-bay DAGE1040BL (2) Jailbroken aTV2's on iOS 5.3 (6.1.4) (portable PlexConnect host's) (9) aTV3's on mixed iOS (1) iPad 3, (1) iPad mini 2 retina, (4) iPhone 4s, all jailbroken on 8.1.1 all running latest official Plex for iOS & PlexConnect for iOS. Airbubble.apk (265 initial buffer frames) for android devices or airfloat for iOS devices to airplay aTV audio to Sol Republic Tracks HD V10.

«13456720
Sign In or Register to comment.