Author Topic: plex integration  (Read 35420 times)

0 Members and 2 Guests are viewing this topic.

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
plex integration
« on: July 13, 2013, 06:00:53 PM »
Hello everyone been a while since i been on here. i think plex integration would be great with voxcommando. lately i have been working around with this http://forums.plexapp.com/index.php/topic/33696-proof-of-concept-plex-with-kinect/ to play around with gesture control of my media through my htpc. so far im really loving plex and as a long time xbmc user i have to say the user friendliness of it and the fast response time really seems to blow xbmc away. now i know xbmc has been around longer and has some cool plugins and other features but plex now has all sorts of new features that xbmc is lacking in. for starters plex allows you to stream over the web to friends and family by just adding them to your friends list in plex. there is a now playing feature that shows what who is watching at the current time and what has been watched on your media server also.

i found a couple of posts at plex where people are using voice control on there macs to control plex. http://forums.plexapp.com/index.php/topic/23932-control-plex-using-speech-recognition/

would there be any possible future having voxcommando running plex for us?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: plex integration
« Reply #1 on: July 13, 2013, 06:26:50 PM »
You can create your own voice commands for plex using the existing resources of VoxCommando

using the scrape command you can send http commands to plex the same way that Gergeosson (the guy in your link) is doing.

example VC command to pause plex:
Quote
<?xml version="1.0" encoding="utf-16"?>
<command id="199" name="plex pause" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Scrape</cmdType>
    <cmdString>http://localhost:3000/xbmcCmds/xbmcHttp?command=pause</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>plex pause</phrase>
</command>

Here is a reference of some of the commands you can try, although it looks a bit different from what Gergeosson is using:

http://wiki.plexapp.com/index.php/HTTP_API/Control

the api that is available using this method looks to be somewhat limited though, in comparison to XBMC.

Try it and let us know how it goes.

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Re: plex integration
« Reply #2 on: July 25, 2013, 06:50:12 PM »
How would I go about getting genxml to print off something that would be usable with plex. I cant seem to find any information being generated in the plex database which i assume is this file called MyVideos75.db

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: plex integration
« Reply #3 on: July 25, 2013, 06:53:37 PM »
If plex uses a similar database to XBMC then you should be able to use the xsql plugin in VC to scan it and generate XML.

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Re: plex integration
« Reply #4 on: July 25, 2013, 08:45:06 PM »
The problem i'm running into is that it seems that there is one file that controls all media on plex. There is no individual .db for music,movies,tv and so on. It's all in one DB so i'm getting errors when trying to scan it. This is the directory I am scanning C:\Users\NAME\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db seems to be the only DB i can find that contains any media information that i have.

Scan Complete

error opening music database C:\Users\NAME\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db
error opening video database C:\Users\NAME\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db
error opening tv database C:\Users\NAME\AppData\Local\Plex Media Server\Plug-in
Support\Databases\com.plexapp.plugins.library.db


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: plex integration
« Reply #5 on: July 25, 2013, 08:55:35 PM »
If it generates an error just when opening, it probably isn't an sqlite database.

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: plex integration
« Reply #6 on: January 08, 2014, 09:59:06 PM »
https://forums.plex.tv/index.php/topic/31636-howto-query-data-from-plex-on-a-mac/
I've recently rediscovered Plex and like it for companion to XBMC, would love to get integrated with VC as well... mostly just to direct play stuff..vs anything too complicated.

I can open via Sqlite3 on Mac
From portableapps.com
I can open as SQLite db from DatabaseBrowserPortable
But can't open from SQLiteDatabaseBrowserPortable.....weird :/

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: plex integration
« Reply #7 on: January 09, 2014, 07:18:10 PM »
By "companion to XBMC", do you mean via the PleXBMC addon? There was a thread on that last year, but I don't know whether Clayton's suggested approach worked out or not.

http://voxcommando.com/forum/index.php?topic=1081.0



TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: plex integration
« Reply #8 on: January 09, 2014, 07:37:51 PM »
Sorry I'm not a hater, I'll use whatever works for me best. Currently that is XBMC by far in main room.
But I can certainly see the merits of the Plex platform and using both.
Particularly ancillary rooms, vs setting up a bunch of machines you have to micromanage or get a bunch of ugly rasp pis.
Plex on a roku is just crazy easy / cheap.

So I dont think I need an PlexBMC implementation of XBMC with Vox.
Cause I think you could simply add the Plex library via UPNP as an XBMC source and possibly scrape/generate XML that way.
Or regardless I'm completely content w/ my XMBC and its VC setup.

But other less technical folks Plex maybe better platform for them all around
Or Just maybe in a separate room like a bedroom or otherwise w/ Plex and VC.
In a room perhaps w/ smaller TV, harder to read font far away  I'd rather just say play this then spend time trolling menus for it.
The plex http api, allows you to control any player/client connected, so you could in theory, say "Vox, play star trek in my  guest bedroom"
I dont know if it would be good to have xbmc and plex runnning in the same Vox instance but just think getting Vox w/ Plex would be very nice, the Plex interfaces already leave  a lot to be desired vs xbmc.
I think if the xmls are seperated and the commands different you could., the problem with the plex platform for vox is the server client piece so you wouldnt likely have a way to use vox on roku but you could still use voxwav or the amulet remotes or other remote approaches to VC now.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: plex integration
« Reply #9 on: January 09, 2014, 08:17:39 PM »
Can you provide some examples of what is actually possible and working with the plex http api?

I don't understand most of what you are saying in this thread, but I think the first thing to establish is... can VC control Plex?  Because if not, or if you can only do very basic stuff like "up, down, select", then it doesn't really matter whether or not you can scan your library.

If plex is storing data in sqlite files then maybe you can use the xSql plugin in VC to grab xml info.  Have you tried that?

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: plex integration
« Reply #10 on: January 09, 2014, 10:02:15 PM »
I ultimately would like  VC to be able to provide commands to a Plex Client.
The Plex forums/doc are underwhelming IMHO.
They reformatted their site and their http api page hasn't been ported but this forum has some stuff about it still.
https://forums.plex.tv/index.php/topic/84037-plex-http-api/

The HTTP API call does provide methodology of direct playing a file amongst other things. Ultimately being able to do some of the core functions like XBMC / VC integration would be nice.
I have managed to do the up/down/select stuff, I haven't had the opportunity yet to figure out the 'key' of the file identifier and documentation is a bit lacking.
I have accessed the Plex DB.
Via the native sqlite3 command that comes w/ my Mac.
From windows I could with DatabaaseBrowser but was unable to via SQLDatabaseBrowser.
From the latter, it says it supports SQL3 dbases.
I personally run the Plex Media Server (which creates/manages the library/dbase) from Ubuntu, but its available on linux/mac/windows...and I'm sure you could share it out..etc
I know obviously VC is windows only so would need a way via windows to access the db in order to get a good xml generated.
The post on the plex forum and the sql commands even say you can export the dbase to csv.

I tried to use the xSQL plugin on VC but got the error unable to open the DB.
The Plex DB is only 1 db for all of its 'libraries', tv/movies/music...etc are all in one central DB unlike XBMC that has a seperate video and music ....etc.
The queries to generate xml would need to be different cause the schemas and db layout is differnt but I think the tablespace is defined.

I dont know if a plugin would be possible or even if I had to otherwise generate XML, but I would think being able to read teh xml payloads to pass into the Http API to direct play stuff or search would be terrific.
"Find Avatar"
"Search Star Trek"
"play movie superman"

I'm optimistic theres some opportunity here.
Hope this was somewhat clearer.

« Last Edit: January 09, 2014, 10:56:55 PM by vulcanjedi »

macrho

  • $upporter
  • Contributor
  • *****
  • Posts: 75
  • Karma: 0
    • View Profile
Re: plex integration
« Reply #11 on: January 10, 2014, 06:48:49 AM »
Sorry I'm not a hater, I'll use whatever works for me best. Currently that is XBMC by far in main room.

For me, I've found that Plex works beautifully for remotely connecting to my library
At home, I always use XBMC

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: plex integration
« Reply #12 on: January 10, 2014, 08:48:39 AM »
Quote
From windows I could with DatabaaseBrowser but was unable to via SQLDatabaseBrowser.
From the latter, it says it supports SQL3 dbases.

Sqlite3 is not the same as sql3 AFAIK.

If you can export to excel via CSV then you can copy paste from excel into a payload XML but it does you no good until Plex offers a documented method to actually play a file.  If you can figure out how to do this with a scrape action, please let me know.

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: plex integration
« Reply #13 on: January 10, 2014, 10:33:39 AM »
Sqlite3 is not the same as sql3 AFAIK.

If you can export to excel via CSV then you can copy paste from excel into a payload XML but it does you no good until Plex offers a documented method to actually play a file.  If you can figure out how to do this with a scrape action, please let me know.

Sorry that was a typo, that app says it supports sqlite3 dbs.
I recently moved so my setup is in a bit of disarray at the moment, I was able to send http api commands to someones roku.  I hadn't had the time to figure out the 'key' for the command for the file play parts as yes that documentation was a bit lacking for me in my opinion.  But the documentation did clearly seem to support direct playing of media/files via the http api and others in the forums seem to suggest they have done so I believe so maybe I can get some insights there as well...again their forums aren't as productive as Vox.
 Ill continue to work on it hopefully when I get some of my stuff setup that will help.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: plex integration
« Reply #14 on: January 10, 2014, 01:11:05 PM »
If you can show me a working scrape action that will play a media file, then I will see about getting the xml scanning part figured out.  Otherwise it is a waste of time for me.

We messed about with Plex a bit in the last 24h and I am not very impressed.  Especially WRT the api.  We were able to get play/pause and direction keys to work, but even the simple set volume command did not work.  The api also returns no information at all about whether your command was successful, or if an error occurred... it just give me a blank stare no matter what I throw at it.