Webinterface plugin (1 Viewer)

Jean-Max

Portal Pro
October 20, 2004
99
0
FRANCE
Re: Sam's & Maschine's webinterface for Media Portal

Maschine said:
With this new version you also have the possibility to control MP over the web. For this release mainly the basic controls (pause, stop, next song etc.) are included. But the future plans are to develop a full webremote.
Congratulations for your very useful work :)
I have a question :
I didn't found in your 2 threads, the exact characteristics of the remote "PC" which can control MP over the web (or over local Intranet, I suppose)
Why my question ?
-> Because I dream about an remote control of M-P from My Philips Ipronto IR-WiFi remote which can access by its webrowser in WiFi mode, to any html page (by IP), on the Intranet / Internet
Example : http://montaleigne.free.fr/IPRONTO/WEB_Serveur/Img_2887_500.jpg

BUT the Ipronto has not at this time PHP or UPnP

So.. what is your opinion about my ...dream ?

Best regards from France ; Merry Christmas to every M-P lover (and all others!)
 

Maschine

Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    Re: Sam's & Maschine's webinterface for Media Portal

    Jean-Max said:
    I didn't found in your 2 threads, the exact characteristics of the remote "PC" which can control MP over the web (or over local Intranet, I suppose)

    Hi Jean-Max,

    php is a server-side language. You don't need anything for it on your remote-PC. You only need a simple webbrowser. Just give it a try ;-)

    If you have further questions then, feel free to ask anytime :)

    Maschine
     

    Jean-Max

    Portal Pro
    October 20, 2004
    99
    0
    FRANCE
    Re: Sam's & Maschine's webinterface for Media Portal

    Maschine said:
    php is a server-side language. You don't need anything for it on your remote-PC. You only need a simple webbrowser. Just give it a try ;-)

    OK thanks :)
    Iwill try after Xmas holidays.
     

    Frodo

    Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,518
    121
    52
    The Netherlands
    Home Country
    Netherlands Netherlands
    I just discovered that this webcontrol uses some web-services to
    control MP
    You can see these webservices by browsing to
    http://localhost/MPExtControlWS/MPWS.asmx

    Now what would be nice if we had a few extra webservice methods like:

    Code:
    //function to retrieve the number of tv capture cards
    int GetNumberOfTVCards()
    
    //function to retrieve the friendly name of a capture card
    string GetFriendlyNameForTVCard(int card)
    
    //function to get the names of all tv channels
    string[] GetTVChannels()
    
    //function to get the tvguide for a tv channel
    TVProgram GetTVGuideForChannel(string tvChannel)
    
    
    //function to see if a card is watching tv
    bool IsCardWatchingTV(int card)
    
    //function to see if a card is recording tv
    bool IsCardRecording(int card)
    
    //function to get the tv channel name a specific card is tuned on
    bool GetTvChannelForCard(int card)
    
    //function to record a tv program
    void RecordProgram(string tvchannel, int startHour, int startMinute, int endHour, int endMinute)
    
    //function to record now
    void RecordNow(string tvchannel)
    
    //function see whats being recorded
    TVProgram GetCurrentRecording(int card)

    This way external apps like your PDA or XBMC or...
    could control MP

    If you share the sources of the webcontrol plugin
    I can try to add those and maybe more webmethods myself


    frodo
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    usbrit said:
    Tried to install and get a message that the files are currupt. Is there another source?
    usbrit

    Did you just download it, like within the last hour? Because that was when I was uploading the new version. What a coincidence....

    download it again - I'm sure the effort is worth it ;-)

    Sam
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    frodo said:
    I just discovered that this webcontrol uses some web-services to
    control MP
    You can see these webservices by browsing to
    http://localhost/MPExtControlWS/MPWS.asmx

    Now what would be nice if we had a few extra webservice methods like:

    Code:
    //function to retrieve the number of tv capture cards
    int GetNumberOfTVCards()
    
    //function to retrieve the friendly name of a capture card
    string GetFriendlyNameForTVCard(int card)
    
    //function to get the names of all tv channels
    string[] GetTVChannels()
    
    //function to get the tvguide for a tv channel
    TVProgram GetTVGuideForChannel(string tvChannel)
    
    
    //function to see if a card is watching tv
    bool IsCardWatchingTV(int card)
    
    //function to see if a card is recording tv
    bool IsCardRecording(int card)
    
    //function to get the tv channel name a specific card is tuned on
    bool GetTvChannelForCard(int card)
    
    //function to record a tv program
    void RecordProgram(string tvchannel, int startHour, int startMinute, int endHour, int endMinute)
    
    //function to record now
    void RecordNow(string tvchannel)
    
    //function see whats being recorded
    TVProgram GetCurrentRecording(int card)

    This way external apps like your PDA or XBMC or...
    could control MP

    If you share the sources of the webcontrol plugin
    I can try to add those and maybe more webmethods myself


    frodo

    Aaah... you've been looking at the code, huh?

    Ok, I think its time for me to spill the beans on how the whole thing works (some people may have worked it out already as most of the source code was included)...

    The web interface works by talking to a web service, which in turn talks to the plugin which then passes the message onto MP.

    Now, some may ask why there are so many steps just to pass a message along. The answer is because the web interface was written in PHP, while the plugin was written in VB.NET. In order to bridge the .NET and PHP gap, the web service has to be there as web services are standardised. It also makes it much easier for others to use the plugin over the network, but that wasn't the primary reason.

    PHP couldn't talk to the plugin directly because the plugin uses .NET remoting for communication - a .NET only technology. The web service converts standard web service talk to a .NET remoting message for the plugin. Therefore, if you are writing a .NET app, if performance is vital, talking directly to the plugin is much better (in technical terms, there are less serialisation/deserialisation processes).

    The code to talk to the plugin was included in the setup (look in the MPWebControl\htdocs\MPExtControlWS folder).

    I would be happy to share the code for the plugin itself, but there are two things:
    1. I wrote it in VB.NET and not C#. VS.NET will cope with this without a problem (provided you've installed VB.NET) however other compilers will complain. Maybe include it seperately from the main code (e.g. outside the mediaportal folder in CVS).
    2. It would be great if this was in the CVS and I had access to it because I'm planning on making a PPC remote app (not web page) and that would require the addition of a few more functions. I'll have to wait until I get my PPC though...

    If its no problem, PM me or post back here and I'll give you the code.

    BTW, in the new build of the web interface, I have limited access to the web service to ONLY internal network devices for security purposes, i.e. the web service is not accessible from the internet.

    Sam
     

    smokeman

    Portal Member
    December 1, 2004
    33
    0
    wow!

    Awesome!
    What you may have done here un-intentionally, is allowed for an interface we can code into xbmc for full control over mediaportal! I have long dreamed of a hometheatre pc, with dvb cards in it, and thin clients throughout my house that could fully control recordings, and play recorded media.

    I'll get the xbmc code loaded on my pc, and see if we can make this happen.
    I may have some questions for ya :)
     

    Users who are viewing this thread

    Top Bottom