Project

General

Profile

ANOUNCEMENT: New web mobile interface for Tvheadend

Added by Miguel Ángel Gabriel over 12 years ago

Hi everyone!!

I've put together a Tvheadend web interface for mobile devices (https://github.com/magabriel/tvheadendv). It started as a pet project to teach myself JQuery Mobile but I think it has grown mature enough to be useful to others.

More or less detailed installation instructions are included. Download and enjoy!! Pull requests are welcome.

Regards.


Replies (18)

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Tom K over 12 years ago

Is there anything to configure?

I always get An error has been detected during connection. You may need to check your configuration.

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Andreas Smas over 12 years ago

Miguel Ángel Gabriel wrote:

Hi everyone!!

I've put together a Tvheadend web interface for mobile devices (https://github.com/magabriel/tvheadendv). It started as a pet project to teach myself JQuery Mobile but I think it has grown mature enough to be useful to others.

More or less detailed installation instructions are included. Download and enjoy!! Pull requests are welcome.

Regards.

Cool stuff, Why not merge this into Tvheadend itself instead?

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Miguel Ángel Gabriel over 12 years ago

@Tom K: The message about connection errors means it cannot find the Tvheadend server. It will only happen (given a successful installation) if the computer where you have installed it is different from the Tvheadend server. You need to click the "Configure" button and write the IP address of the Tvheadend server.

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Miguel Ángel Gabriel over 12 years ago

andreas öman: Thanks for the compliment. If enough people find it useful I will think about it.

The main problem is that it is written in JQuery mobile + a little PHP so it will be adding another layer of complexity to the main project (the PHP part could be easily removed if TVheadend provided a JSONP interface, though, or even better, using JSON if it is served from the same server and port thant TVheadend itself).

I am open to suggestions on how to better integrate it into TVheadend (if it is even possible).

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Andreas Smas over 12 years ago

Miguel Ángel Gabriel wrote:

andreas öman: Thanks for the compliment. If enough people find it useful I will think about it.

The main problem is that it is written in JQuery mobile + a little PHP so it will be adding another layer of complexity to the main project (the PHP part could be easily removed if TVheadend provided a JSONP interface, though, or even better, using JSON if it is served from the same server and port thant TVheadend itself).

Well, the PHP part needs to go

The JQuery is completely client side right? So that should make no difference. That would work just like how the current ExtJS based UI is served.

I am open to suggestions on how to better integrate it into TVheadend (if it is even possible).

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Miguel Ángel Gabriel over 12 years ago

OK, I will find the time to write a feature request with the changes in TVheadend to make it work without the PHP part and integrating it. I will need some guidance, though, because I'm not familiar with the TVHeadend internals.

Anyway, I will feel more comfortable when more people have tested it.

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Tom K over 12 years ago

I changed the IP-Adress according to the TVHeadend Server. But it still doesn't connect :-(

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Miguel Ángel Gabriel over 12 years ago

@Tom K: Did you installed as directed? It must be installed on a computer with PHP available because it uses a small PHP program acting as proxy to TVheadend. So it will not work if you simply copy the files to a directory, you also have to configure the webserver (Apache, in the installation instructions example) in order to get a working installation. If you are installing in the same computer than TVheadend resides, the IP configuration part will not be needed (because the program will try first the IP of the computer where it is installed, and it will be the same).

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Tom K over 12 years ago

@Miguel: Apacheserver = TVHeadendserver ... And i put the files to /var/www/tvv (Ubuntu 12.04LTS)
But it still says, that there is no connection.

Can i check logfiles etc for errors?

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Miguel Ángel Gabriel over 12 years ago

@Tom: Assuming your tvheadend is reachable at "http://<TVHEADENDSERVER>:9981" and tvheadendv is at "http://<TVHEADENDSERVER>/tvv", please try this:

  • Open url in browser: "http://<TVHEADENDSERVER>/tvv/jsonp-proxy.php" and you should see an error message: "ERROR: Missing jsoncallback parameter ". If you don't it means a problem with the PHP proxy.
  • Open url "http://<TVHEADENDSERVER>/tvv/jsonp-proxy.php?callback=test&url=http%3A%2F%2F<TVHEADENDSERVER>%3A9981&api=channeltags&op=listTags" and you should see a JSONP response with all the channeltags. Be careful replacing BOTH <TVHEADEND SERVER> ocurrrences in the URL with your server IP or hostname (the second one is URLencoded, just replace with the server IP or name).
  • You can also look at the Firebug logs to see what is returned from the AJAX calls.
  • Look at the apache logs on the tvheadend server for any related errors.

Thank you for taking the time to test this stuff.

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Tom K over 12 years ago

@Miguel:

This is the reply from the server:

Call: http://192.168.178.24//tvv/jsonp-proxy.php?callback=test&url=http%3A%2F%2F192.168.178.24%3A9981&api=channeltags&op=listTags

Website shows:
ERROR: The server did not return a JSON response
Array
(
[HTTP/1.0 401 Unauthorized] =>
[Server] => HTS/tvheadend
[Cache-Control] => no-cache
[WWW-Authenticate] => Basic realm="tvheadend"
[Connection] => Close
[Content-Type] => text/html
[Content-Length] => 157
)
test()

apache2 error.log:
[Thu May 31 17:34:01 2012] [error] [client 192.168.178.20] PHP Warning: file_get_contents(http://192.168.178.24:9981/channeltags?op=listTags): failed to open stream: HTTP request failed! HTTP/1.0 401 Unauthorized\r\n in /var/www/tvv/jsonp-proxy.php on line 139

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Miguel Ángel Gabriel over 12 years ago

@Tom: OK, it seems clear that it is a permissions issue. I think you have Access Control enabled in your Tvheadend server. Try disabling it and report if it does work, so I can fix this issue in the future.

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Markus Bonet over 12 years ago

I can't get it to work.
I tried the backend with this URL:
http://192.168.1.40:50080/tvheadendv/jsonp-proxy.php?callback=test&url=http%3A%2F%2F192.168.1.40%3A9981&api=channeltags&op=listTags

It returns this, which looks good:
test({ "acceptLanguage":"de-de,de;q=0.8,en-us;q=0.5,en;q=0.3","entries": [{"identifier": 62,"name": ...

I see no message in error_log.

Any idea what else to check?

Markus

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Miguel Ángel Gabriel over 12 years ago

Markus S: Well, the proxy server is working (it connects with TVHeadend and returns results to its caller), but I can see that you have configured your web server with port 50080. The problem is that TVheadendv cannot (at least, as of now) call the proxy on a port other than 80. So, just for testing, please configure port 80 in the web server and try again (please report the results or, better, create a bug report in GitHub).

Anyway, the proxy server will be removed in a future release when (if) TVHeadend implements a JSONP interface API.

Thx.

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Tom K over 12 years ago

@Miguel: After deactivating access control it works :)

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Miguel Ángel Gabriel over 12 years ago

@Tom: Thanks for the report. I will take it into account for next version.

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Markus Bonet over 12 years ago

Miguel Ángel Gabriel wrote:

Markus S: Well, the proxy server is working (it connects with TVHeadend and returns results to its caller), but I can see that you have configured your web server with port 50080. The problem is that TVheadendv cannot (at least, as of now) call the proxy on a port other than 80. So, just for testing, please configure port 80 in the web server and try again (please report the results or, better, create a bug report in GitHub).

Anyway, the proxy server will be removed in a future release when (if) TVHeadend implements a JSONP interface API.

Works with Apache on port 80.

RE: ANOUNCEMENT: New web mobile interface for Tvheadend - Added by Peter Vágner about 12 years ago

Hello,
I am not sure I do correctly understand the matter but in order to avoid cross site requests thus get rid of the php proxy script can we just put html and js files into the src/webui/static folder so they will be served by the tvheadent built-in webserver?

    (1-18/18)