SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-11-2013, 12:51 PM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
Apple TV as Media Extender

I'm going to update this first post with status:

SageConnect: use AppleTV as a SageTV client
https://github.com/SageWizdom/SageConnect

Current Version: Alpha 2: Working but possibly bugging, missing some features.

*Please note: use of this DOES NOT require extender or other licenses. It streams media via the web interface. Aka. You can put in as many of these as your back end hardware can support. I'd feel bad, except there *IS* no way to buy licenses so....

------------------------------------------------------------------------------------------------

Greetings,
I've been working on (alpha but working) code to allow use of the Apple TV as a media extender. This is basically a fork of the PlexConnect code that folks may have seen floating around. I'm having a buddy test out my code before I share the Alpha, but hope to post a link in the next day or so. I have an Apple TV Gen 2 and He has a Gen 3 (the current version). As of right now, I am able to play all recorded shows/movies files and all imported media.

Please note..... this is CRAZY ALPHA, I expect people to find issues the first couple of weeks, and I'll try and fix them as fast as I can. I would also note, its a bit ugly right now. I could have waited, but I figured there were enough folks looking for extenders, that I'd rather share it ugly, than make folks wait until its all cleaned up.

This currently works by streaming media via the SageTV Mobile Web Interface plugin. The SageTV Web Interface plugin and Nielm's SageXML Info plugin are also installed. Lastly, I'm not a Java programmer, but if any of the developers of the above plugins, or others, want to try and code this as a SageTV Plugin, let me know and I can walk you through what I've figured out so far.

Last edited by SageWizdom; 10-18-2013 at 06:37 PM. Reason: Status Update
Reply With Quote
  #2  
Old 10-12-2013, 06:46 AM
tchapin tchapin is offline
Sage Aficionado
 
Join Date: Aug 2007
Posts: 279
Wow, this sounds cool! Thanks for working on this. Does it require jailbreaking the ATV? I've got an ATV3.
Reply With Quote
  #3  
Old 10-12-2013, 09:44 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
If it's a true fork of plexconnect then no no jail break necessary. It basically runs a py script on the server and you point or Apple TV trailers DNS to the server containing the py script. Done and done


Awesome job guys!
Reply With Quote
  #4  
Old 10-12-2013, 11:19 AM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
More Details

My friend didn't get a chance to do his test, so I'm just going to post the link for folks to try and see. Known Possible Issue... All of my testing (imported media) is on a Windows machine. I have no clue what will happen if someone uses this on a linux / mac system (aka, the file slashes I realized are wrong.) If you try this, please grab the console output error (which I would expect) and put it in the forum and I'll try to chase down a fix.

https://github.com/SageWizdom/SageConnect

I'm going to post some pictures to the Git Hub site in a few minutes, for anyone who wants to see it. I also think I may have figured out a way to stream live TV, but it is still a little wonky. Again, if someone is interested in partnering to make a Sage plugin that does this directly (I'm hacking across several plugins) let me know. Direct Sage Database access and someone who knows how to do it, I'm sure, would allow some cool options.

tchapin, PiX64 is correct, you do not need to jailbreak the ATV, but you will need to add a certificate (there are instructions, it takes about ~10-15 minutes and a micro USB cable. It does not void any warranties).

The system basically works by doing a man in the middle attack against the Apple Trailers application. Instead of it talking to the Apple Server, it talks to your server, which feeds it custom directories, files, media, from your sage server.

Please give it a shot, ask questions, share any problems and I'll try to help.
Reply With Quote
  #5  
Old 10-12-2013, 04:41 PM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
Post Speed

Sorry about the slow responses. My posts/responses seem to be taking 6-8 hours to appear. If you post questions, I'll put in a response as soon as I can, but I'm not sure how long they will take to become visible.

If anyone knows what I'm doing wrong, pls let me know. Thank you!
Reply With Quote
  #6  
Old 10-12-2013, 09:03 PM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
Thumbs up Update

So I've updated a couple more issues on my list. The UI should look a bit better. At this point, I am pretty comfortable on my test setup that things are working well. Please try things and let me know what problems you have.

Also, I think I've fixed the Linux /MacOS path issue. If someone tries this who uses Linux or Mac, in the dirList.xml please let me know if your media paths look like the following...

I used test media paths that looks like:
/testDrive/mediaDir/Files1.ts
/testDrive/mediaDir/Files2.ts
/testDrive/mediaDir2/FilesA.ts
/testDrive/mediaDir2/FilesB.ts
/testDrive2/mediaDir1/FilesX.ts
/testDrive2/mediaDir1/FilesY.ts

If yours does not work, please go to the web interface of your server, under "Media Library", select "Search Imported Videos", press the enter key with nothing in the search box. The page that loads will have an xml link at the top (this is what I am parsing currently to build the file import list).

If you go all the way down to the show list (probably 1/3 of the way down the file) look in one of the <segment> tags at the "filePath" attribute. Please share what yours looks like, feel free to change any of the dir names, but please leave in any special characters such as underscores or spaces or other.

Thank you,
Enjoy!
Reply With Quote
  #7  
Old 10-14-2013, 04:27 AM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
Available

Sorry for the delayed responses. Initial version is ready at:

https://github.com/SageWizdom/SageConnect

I've been trying to clean it up over the last few days and I think is should be pretty stable. I test on a windows sage server, so if you have linux and problems, please let me know.
Reply With Quote
  #8  
Old 10-14-2013, 05:02 AM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
UI Look and Feel

Another quick note, if anyone is interested in partnering up, I think we could make it work with / look similar to Diamond. Everything is XML driven, it would probably be possible to detect the client type and simply feed a slightly different XML. If there is interest, let me know and we can see what makes sense.
Reply With Quote
  #9  
Old 10-14-2013, 07:07 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Gotta borrow my buddies at 3 and ill gladly help test, etc.
Reply With Quote
  #10  
Old 10-14-2013, 09:23 PM
Comitizer Comitizer is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Calgary, Alberta, Canada
Posts: 174
Interesting...I'll have to keep an eye on this. Can you get it to display fan art?
Reply With Quote
  #11  
Old 10-15-2013, 12:24 AM
IVB's Avatar
IVB IVB is offline
Sage Icon
 
Join Date: Sep 2003
Location: Oak-town, CA
Posts: 1,083
thank you for doing this, but i'm curious as this is a new forum ID and all your posts are in this thread: Were you a Sage user before attempting this, and did you just create a new id for this purpose?

Again I mean no disrespect, I ask merely for information. Thank you again for doing this.
__________________
------------------------------------
My Home Automation YouTube channel
Reply With Quote
  #12  
Old 10-15-2013, 06:31 AM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
Comitizer:
So far, this is really a proof of concept. Its not very pretty, but I wanted to verify I could actually handle functionality (play, etc). Right now, this is screen scraping the xhtml of several pages and pulling whatever images I can find. I think its stable enough (or could be) that it could run for quite some time but.... Realistically, if the XML were being generated via a plugin with direct access to the STV database, it would/should be able to access all images/info/content that SageTV knows about. It should also be possible to run from the same server (w/port sharing etc) and provide many of the same features currently offered by Sage. I think it could potentially also support the guy doing the Roku channel and I saw something about XBMC (all of which I think use a similar dataset).

The biggest limitation is that Apple does not exactly publish their xml spec, so the limits are still a little unknown. I've not figure out how to do background images, or title images, but menu item images and associated metadata pages with images I've seen (still working to fully get the layout though)


IVB:
Perfectly reasonable question. I tend to be a lurker. I've been running SageTV for about 6 years, but hadn't really the time to get involved. Also not being a Java developer, I didn't really have anything I thought I could contribute. When this came up and I saw I could help, I figured I'd jump in. Like many on here, I really like Sage, don't see a good alternative, and was sad to see it stop being supported openly, especially extenders / remote TV viewing. Not sure if that answered your question, but essentially, yes and yes.

tl;dr: Saw a way I could actually help, set up an account, trying to step a bit out of my comfort zone.
Reply With Quote
  #13  
Old 10-15-2013, 12:32 PM
IVB's Avatar
IVB IVB is offline
Sage Icon
 
Join Date: Sep 2003
Location: Oak-town, CA
Posts: 1,083
cool thanks again for doing this.
__________________
------------------------------------
My Home Automation YouTube channel
Reply With Quote
  #14  
Old 10-15-2013, 12:40 PM
Comitizer Comitizer is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Calgary, Alberta, Canada
Posts: 174
Wouldn't it be possible to do this using the RESTful API for Sage? It should have all the information required to get the metadata.
Reply With Quote
  #15  
Old 10-15-2013, 12:48 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
one could also create a simple custom js file like I did for the Plex work which sits in the sagex directory.

you could then create a set of functions which return everything you want in the format that you want taking all of the "heavy lifting" off of the Client or py scripting.
Reply With Quote
  #16  
Old 10-15-2013, 05:08 PM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
Quote:
Originally Posted by Comitizer View Post
Wouldn't it be possible to do this using the RESTful API for Sage? It should have all the information required to get the metadata.
So, sad to say, I'm not familiar with the Sage RESTful API? If I do a search for just that, will I find? Any recommended search terms or links? Thank you.

**update1** Found it... Link for anyone else interested
http://code.google.com/p/customsagetv/wiki/SageTVapi

**update2** Awesome, I'm going to step back and update all images to use posters right now. Thanks for the pointer!

Last edited by SageWizdom; 10-15-2013 at 05:29 PM.
Reply With Quote
  #17  
Old 10-15-2013, 07:51 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by SageWizdom View Post
So, sad to say, I'm not familiar with the Sage RESTful API? If I do a search for just that, will I find? Any recommended search terms or links? Thank you.

**update1** Found it... Link for anyone else interested
http://code.google.com/p/customsagetv/wiki/SageTVapi

**update2** Awesome, I'm going to step back and update all images to use posters right now. Thanks for the pointer!
If u have sage web server and sagex installed u can hit

Http:// sage server ip : port/ sagex/api

U can find a whole slew of callable stuff there including custom functions that live in /sagex/ directory on sage server.
Reply With Quote
  #18  
Old 10-15-2013, 09:49 PM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
Quote:
Originally Posted by PiX64 View Post
If u have sage web server and sagex installed u can hit

Http:// sage server ip : port/ sagex/api

U can find a whole slew of callable stuff there including custom functions that live in /sagex/ directory on sage server.
I have spent the evening furiously re-writing code (not published yet). Rebuilt several menu displays to look nicer (ex. image tiles vs. names only). I ran across several shows where there is no poster art, and it seems to revert to a show screen capture.... not sure I understand the specific behavior yet. I'll try to update the main screen set (as is) to look nicer. After that, I'd be interested in folks opinions on what they'd like the interface to look like.

For me, I just need an extender. I do most of my show management via the web interface, so that is pretty low on my feature list. Right now I want to be able to play video from anywhere. Possibly stream live TV (I have an idea). Beyond that, what features do folks use on a regular basis (with the assumption that the main tv has a real sage instance on it and this is in the kitchen, etc).
Reply With Quote
  #19  
Old 10-16-2013, 07:33 PM
SageWizdom SageWizdom is offline
Sage Advanced User
 
Join Date: Oct 2013
Location: https://github.com/SageWizdom/SageConnect
Posts: 216
Quote:
Originally Posted by Comitizer View Post
Interesting...I'll have to keep an eye on this. Can you get it to display fan art?
So, with the great tip about the restful api's, I'm chasing fan art now. The biggest problem I run into is when there is no fan art.... what would you want to see?

I've got the basics for my next release (menus, image grids, fan art) but ... no fan art is blank slate. Is it possible for fan art to create an empty poster with just the show name (as a backup)? I'm looking into this now. Otherwise, System is pretty usable (I use it daily).

General update, I was calculating which ports are used by what, and I think I can get it to run side by side with Sage on the same box, no extra server. I need to double check all the ports.... this will probably be the next release in a week or so (after gui clean up)

----- Clarification ------
All media processing and loading is done directly by the AppleTV, so I can not validate the image... it has to *always* work, or I need to know in advance that it wont work, and change the URL on the back end.

Last edited by SageWizdom; 10-16-2013 at 07:43 PM.
Reply With Quote
  #20  
Old 10-16-2013, 08:18 PM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,240
not really understanding the technical side, I wish I knew how so I could help you with this, as it seems like a brilliant idea.
However, can you explain (as if I were in fourth grade lol) the bit about hijacking the Apple Trailer feed...does this mean that the Apple Trailer feature will not work, or is there some kind of rerouting in place after the connection to Sage is made to enable connection to Apples trailer servers?
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300’s networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does the New Sagetv Media extender works with a Wireless extender? lfilomeno SageTV Media Extender 4 01-21-2009 03:13 PM
Media Extender HD Media Center Problems dfizer68 SageTV Media Extender 0 01-15-2009 10:36 PM
Imported Media Folders and Media Extender AtomicPenguin SageTV Media Extender 1 06-15-2008 11:16 AM
Apple Time Capsule as a Media Server? bretm Hardware Support 3 03-04-2008 04:17 PM
HD Media Extender - Exactly When ? daz19 SageTV Media Extender 46 05-23-2007 01:51 AM


All times are GMT -6. The time now is 07:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.