Help getting addon working on Plex PVR Build

Access your ARGUS TV system from your sofa using Kodi or XBMC (http://kodi.tv/)
Post Reply
meep
Posts: 9
Joined: Sat Feb 09, 2013 3:26 pm

Help getting addon working on Plex PVR Build

Post by meep » Sat Feb 09, 2013 3:36 pm

I've got argusTV up and running on my server and can access it from XBMC LiveTV instlled on that server, on a client mac and on a client PC. Works great!

Plex is an alternative media player and manager, based a lot on XBMC. It has recently been updated to incorporate Frodo updates but, alas, LiveTV was omitted.

There is a community effort in place to build a version that includes LiveTV (see http://forums.plexapp.com/index.php/top ... e-theater/).

I've installed/built this version on both my Mac & PC clients (that XBMC work great on).

However, when enabling the ArgusTV addon in this version, the following errors are thrown to the log and the addon fails to start;

Code: Select all

19:52:40 T:2965176320   ERROR: AddOnLog: ARGUS TV client: can not open http://192.168.1.100:49943/ArgusTV/Core/Ping/52 for write 
19:52:40 T:2965176320   ERROR: AddOnLog: ARGUS TV client: Ping failed... No connection to Argus TV. 
19:52:41 T:2965176320   ERROR: ADDON: Dll ARGUS TV client - Client returned bad status (6) from Create and is not usable 
19:52:41 T:2965176320 WARNING: UpdateAndInitialiseClients - failed to create add-on ARGUS TV client, status = 6 
19:52:41 T:2965250048  NOTICE: Thread CAddonStatusHandler:pvr.argustv start, auto delete: true 
19:52:41 T:2965176320 WARNING: UpdateAndInitialiseClients - failed to load the dll for add-on ARGUS TV client, disabling it
I'm hoping someone here might know where in the XBMC code one could look to address this message?

Thanks in advance

Peter

Red_F
Posts: 533
Joined: Wed May 19, 2010 10:31 pm
Location: The Netherlands

Re: Help getting addon working on Plex PVR Build

Post by Red_F » Sun Feb 10, 2013 2:14 pm

The addon uses the XBMC generic IFILE interface to execute a HTTP POST with a body filled with data.

I don't think this is supported by the XBMC-over-Plex layer at all?

To see how this is implemented you should take a look at the 'filesystem' folder of the XBMC main repository (off the top of my head "/xbmc/xbmc/filesystem").

But wouldn't it be nicer/easier/better/more compatible/more robust if we created a native Plex addon for Argus?

Cheers,
Fred
Growing old is inevitable. Growing up is optional!

meep
Posts: 9
Joined: Sat Feb 09, 2013 3:26 pm

Re: Help getting addon working on Plex PVR Build

Post by meep » Sun Feb 10, 2013 7:09 pm

Many thanks for that.

A native PLEX add on to access ArgusTV would be amazing. Happy to help test etc!

meep
Posts: 9
Joined: Sat Feb 09, 2013 3:26 pm

Re: Help getting addon working on Plex PVR Build

Post by meep » Fri Feb 15, 2013 1:28 pm

Thanks for that insight.

I checked with the Plex Devs and they indicated that many unused protocols had been commented out in xbmc/filesystem/FileFActory.cpp

In fact, looking at that file, the following were the only protocols supported;

zip, file, special, filereader, cdda, iso9660, udf, http, https, shout, pipe & upnp

I re-enabled all the prototcols and rebuilt but still no joy - same error, cannot open /ping/52 for write

It should have worked in any case as its an http request and that protocol was always enabled.

Any further thoughts on where else I might look to find if any other required component is disabled in the Plex build?

All help appreciated.

Peter
Last edited by meep on Fri Feb 15, 2013 5:00 pm, edited 1 time in total.

jonaskp
Posts: 187
Joined: Tue Sep 16, 2008 11:39 pm

Re: Help getting addon working on Plex PVR Build

Post by jonaskp » Fri Feb 15, 2013 2:55 pm

Red_F wrote: But wouldn't it be nicer/easier/better/more compatible/more robust if we created a native Plex addon for Argus?

Fred
That would be awesome, but who is willing/able to do that?

I have no coding experience but am very much willing to help test it.

To me Plex is a great piece of software and are doing a lot of things right with their backend/frontend solution to HTPC software, but I am missing LiveTV and recordings badly for it to become my only HTPC software.

meep
Posts: 9
Joined: Sat Feb 09, 2013 3:26 pm

Re: Help getting addon working on Plex PVR Build

Post by meep » Fri Feb 15, 2013 4:09 pm

jonaskp

Check out that thread I referenced in my op. We're building XBMC live TV support into Plex and it really does work as well as in XBMC itself. For me, it's the perfect solution.

If only I could get it talking to ArgusTV back end.....

Red_F
Posts: 533
Joined: Wed May 19, 2010 10:31 pm
Location: The Netherlands

Re: Help getting addon working on Plex PVR Build

Post by Red_F » Fri Feb 15, 2013 9:23 pm

Peter,

apparently the call

Code: Select all

void* hFile = XBMC->OpenFileForWrite(url.c_str(), 0);
is failing.

Normally, if all goes well, the FileFactory should return an instance of CHTTPFile (https://github.com/xbmc/xbmc/blob/maste ... TPFile.cpp).

So make very, very sure that the line

Code: Select all

...
 else if (strProtocol == "http" ||  strProtocol == "https") return new CHTTPFile();
...
gets compiled in FileFactory.cpp.

CHTTPFile is a subclass of CCurlFile. And the XBMC->OpenFileForWrite ultimately results in bool CHTTPFile::OpenForWrite being called. This function can not fail:

Code: Select all

bool CHTTPFile::OpenForWrite(const CURL& url, bool bOverWrite)
{
  // real Open is delayed until we receive the POST data
  m_urlforwrite = url;
  m_openedforwrite = true;
  return true;
}
therefore if the open fails, CHTTPFile was not reached. Notice that the FileFactory contains an if statement, a few lines above the check for http:

Code: Select all

if( g_application.getNetwork().IsAvailable() )
It at runtime this test fails, opening a http based url/file via the IFile interface will always fail.

Cheers,
Fred
Growing old is inevitable. Growing up is optional!

Red_F
Posts: 533
Joined: Wed May 19, 2010 10:31 pm
Location: The Netherlands

Re: Help getting addon working on Plex PVR Build

Post by Red_F » Fri Feb 15, 2013 9:36 pm

@jonaskp: well, once XBMC is working and behaving itself we need new challenges don't we?

But to be honest, I have slowly started working on a Windows 8 App (what we used to call using the Metro UI) for ARGUS TV. At this moment I'm just setting up some basic ARGUS TV support libraries that will compile on NETFX_CORE, but when time permits I would like to extend it to a full working client.

(And given the fact that I'm using Mono for Android [what used to be called MonoDroid] and MonoTouch to port other W8 Apps to Android resp. iOS who knows what follow?).

I guess what I'm saying is: these things are a hobby/fun kind of project. And there will always be people around that will pick them up at some point in time. We can't force it, we can't predict it, but I'm sure it will happen when probability, energy and entropy are just right!

Cheers,
Fred
Growing old is inevitable. Growing up is optional!

meep
Posts: 9
Joined: Sat Feb 09, 2013 3:26 pm

Re: Help getting addon working on Plex PVR Build

Post by meep » Sat Feb 16, 2013 1:13 pm

@Red_F

Many thanks for the time taken on that very detailed post.

Everything you mention is enabled and compiled into my Plex build but I still have the problem.

I'll chase up with plex devs on their forums to see if they can shed any further light.

Peter

Red_F
Posts: 533
Joined: Wed May 19, 2010 10:31 pm
Location: The Netherlands

Re: Help getting addon working on Plex PVR Build

Post by Red_F » Sat Feb 16, 2013 2:58 pm

Peter, you can sprinkle the FileFactory with a couple of Log statements showing you the values of several conditions at run-time and progress through the factory, that may help perhaps?
Growing old is inevitable. Growing up is optional!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests