NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 14 15 16 17 18 … 93 Next »
Web control framework

 
  • 0 Vote(s) - 0 Average
Web control framework
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,850
Threads: 954
Joined: May 2006
#1
2011-05-23, 02:59 PM
Now that I have MB4 out there I want to build Android control of the multiple players in my house. Does anyone have an ideas on what might be the best way to achieve this?

Ideally I'd like to use the NPVR web server as the access point and proxy to control my plugins through a different "page" but I don't know if this is feasible.

Martin
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#2
2011-05-23, 08:15 PM
I've thought about doing this but haven't got around to it. A couple of points that I thought about:

  1. We would need a plugin for NextPVR to act as the remote receiver that would accept basically a keyboard command from the "remote". Using the NPVR web server wouldn't work because I don't think it directly controls the running instance of NextPVR.
  2. We would need a way to distinguish MVP/NMT clients since it's basically multiple instances running on the server. (sub may have already implemented something in GetClientId, I haven't checked.) PC clients would not really matter because they can be determined by IP address.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,850
Threads: 954
Joined: May 2006
#3
2011-05-23, 08:34 PM
Hi whurlston,

Without a doubt a "server" and some form of simple messaging protocol is required, but I think the web server front end to this server is possible and provides the most security with the flexibility that that web server can stream media. My vision is that this would be similar to the way that the web server and NextPVR clients communicate "together" via NRecord's server, maybe a new service called NRemote.

All the MVP/NMT clients have a unique name, but I think they could register with NRemote with a user chosen friendly name, like "Living Room", Master Bedroom etc.

Martin
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#4
2011-05-23, 10:16 PM
I've thought about this in the past. Rather than rolling your own, would it not be easier to implement the slimserver protocol (and use slimserver for your database).

I originally thought of using the slimserver DB after getting performance issues on the ML3 update service. Thinking that I may as well let slimserver do all the hard work, and just implement the GUI.

Slimserver also has a remote playback aspect that sounds very similar to what you are trying to achieve.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,850
Threads: 954
Joined: May 2006
#5
2011-05-24, 12:02 AM
psycik, my purpose for this thread was to come up with ideas for a generic solution for all NPVR plugins to use. I could do something proprietary, but I think this an "NRemote" service is something that more plugins will want to use.

Noting that many people like Squeezeserver, I am not fond of having to add SQL Server into the mix. I have used and developed for SlimServer and SqueezeServer in the past and there is no speed advantage over SQLite. Also the Squeeze CLI is not going the way I like. If I was going to a adopt a new db format, I think the best solution would be to support an XBMC database, but I think that is direction for NPVR in general and not just MB4.

Martin
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#6
2011-07-02, 03:15 AM
mvallevand Wrote:...control of the multiple players in my house.
What do you mean by 'players'? Do you mean NMTs etc? This sounds like 'push' technology to me.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,850
Threads: 954
Joined: May 2006
#7
2011-07-02, 03:29 AM
bgowland Wrote:What do you mean by 'players'? Do you mean NMTs etc? This sounds like 'push' technology to me.

My vision is from my Android tablet I want to be able to control media playing on the host PC, client pc or any NMT in the house through selection of a zone. The remote plugin would register with the host web server and the web server would establish the URL that remote uses to get information back from the instance of plugin.

Code:
http://192.168.1.1:8866/remote?zone=Kitchen&getInfo
http://192.168.1.1:8866/remote?zone=Kitchen&command=Escape
http://192.168.1.1:8866/remote?zone=Kitchen&PluginHelperFactoryGetPlayListFiles
http://192.168.1.1:8866/remote?zone=Kitchen&MusicBox4GetArt
Martin
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#8
2011-07-02, 04:50 AM (This post was last modified: 2011-07-02, 05:02 AM by whurlston.)
Since we would want to control a NextPVR instance, we would probably need to use a different port for each instance.

PC instance (on server or client): Port 8868
NMT instance1 on same machine: Port 8869
NMT instance2 on same machine: Port 8870

Port 8866 would be sending the request to the recording service.

We could have an "announce" from each instance so that the remote control device would send a discover command and all instances would reply with the IP address and port number. Similar to how it's done by the HDHomeRun devices. You then select the instance you want to control. That instance could send "pings" with the current displayed screen/plugin, a detail information object (schedule listings, music selection list, etc) and an list of available commands for the current screen.

Edit: It could also just send that information as a webpage.
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#9
2011-07-05, 11:44 PM
It seems to me that at a basic level sub would need to provide an HttpListener (or similar) as a core part of NextPVR itself and to route anything that it receives to 'HandleCommand' (for example) in any active plugin.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,850
Threads: 954
Joined: May 2006
#10
2011-07-06, 12:30 AM
Yes the HttpListener was what I wanted most from sub too http://forums.nextpvr.com/showthread.php...post413170

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Remote control example code? drmargarit 4 3,753 2018-04-21, 11:24 PM
Last Post: drmargarit
  API help - remote control greg in kansas 0 2,643 2016-07-04, 03:54 PM
Last Post: greg in kansas
  ios app to control npvr ui idea jnbooker15 4 3,573 2015-09-21, 10:19 PM
Last Post: sub
  ios app to control npvr ui idea jnbooker15 0 2,457 2015-09-21, 06:39 PM
Last Post: jnbooker15
  Kinect Voice (Gesture) Control topcat 5 3,533 2014-09-20, 12:03 PM
Last Post: topcat
  Version control / repository software for VS Express bgowland 2 2,387 2014-05-02, 09:57 PM
Last Post: bgowland
  Skin question - how to centre a list UiList control on screen? McBainUK 2 1,827 2011-02-17, 08:46 AM
Last Post: McBainUK
  List control skin elements McBainUK 1 1,723 2010-09-01, 06:17 AM
Last Post: sub
  Control-S mvallevand 2 1,648 2009-08-31, 01:57 AM
Last Post: mvallevand
  What SCM (Source Control Management) system do you use? JavaWiz 3 2,027 2008-08-19, 07:28 PM
Last Post: Manderson

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode