MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2006-08-05, 03:12   #1 (permalink)
Portal Member
 
Bram's Avatar
 
Join Date: Dec 2005
Location: 's-Hertogenbosch
Age: 30
Posts: 850
Thanks: 20
Thanked 2 Times in 2 Posts

Country:

My System

Default Webbased remote control using PHP

I'm a professional PHP 'programmer'. I'd like to give writing a remote contol plugin a serious try. I have very little knowledge of C# and .NET.
I know how to take advantage of HTML, CSS, Javascript and PHP (and MySQL ofcourse) to it's limits. I know there is need for a advanced webbased interface and I'd like to use my knowledge to help developing MP. The missing link is the communication between PHP and MP. Can anyone help me understand what is needed to manipulate MP from PHP and the other way around?
If it's simply database manipulation (MP is using MSSQL I understand. And altough I don't have any experience with MS databases, I can't imagine it will be much more difficult than a MySQL database) I won't need much information....


Thank you in advance.


Just to complete the information....
I'm getting aqainted with ASP and C# a little thrue writing a interface for a MP Playlist Web Front End in development. But because I don't have any experence using ASP or C# I can't realy use my experience to it's max....
http://forum.team-mediaportal.com/vi...=107738#107738



Sorry for my, probebly far from perfect, English. I'm Dutch.


To get an idea of what is possible with webbased applications take a look at this.....
http://www.turboajax.com/turbowidgets/examples/
__________________
Bram is offline   Reply With Quote
Old 2006-08-05, 06:44   #2 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default

It depends on what sort of 'communication' you're talking about I guess. If you just want to edit database records, then I guess you can just edit the databases directly (they're SQLite3 DBs btw).

But if you want to change the behaviour of MP while its running, i.e. send through remote control commands, refresh DB commands etc. you'll need something that gives you access to MP while its running. An example of this is the ECP2 web service that comes with MPW. In fact if you look at the code for that, it is really an .NET web service and a PHP application which should suit your skillset.

Maybe you should contact the programmer of MPW (maschine is his username on these forums). The functions to retrieve info from the music database have not been added yet but will be soon.

Sam
samuel337 is offline   Reply With Quote
Old 2006-08-05, 08:43   #3 (permalink)
Super Moderator
 
FlipGer's Avatar
 
Join Date: Apr 2004
Location: Leipzig, Germany
Age: 33
Posts: 2,238
Thanks: 31
Thanked 53 Times in 39 Posts

Country:

My System

Default

Hi,

http://www.mp-webinterface.com/mambo/

Flip.
FlipGer is offline   Reply With Quote
This User Say Thank You:
Old 2006-08-09, 01:26   #4 (permalink)
Portal Member
 
Bram's Avatar
 
Join Date: Dec 2005
Location: 's-Hertogenbosch
Age: 30
Posts: 850
Thanks: 20
Thanked 2 Times in 2 Posts

Country:

My System

Default

Thak's for the response. I've contacted the author of mp-webinterface. Tomorrow I'll probebly have more information. I'll try to collect the information in this topic so a wiki page can be created later.
__________________
Bram is offline   Reply With Quote
Old 2006-08-09, 12:59   #5 (permalink)
Portal Member
 
Bram's Avatar
 
Join Date: Dec 2005
Location: 's-Hertogenbosch
Age: 30
Posts: 850
Thanks: 20
Thanked 2 Times in 2 Posts

Country:

My System

Default

After reading http://localhost:81/MPExtControlWS/ (comes with MPW) and http://forum.team-mediaportal.com/viewtopic.php?t=14164

I have a better understanding of how to obtain iformation. So I am one stap further. Trieing to figure out how to submit iformation thrue php now.

I'm posting this so other people who are trying to develop from the same perspective I have, will have easier acces to the available information.
__________________
Bram is offline   Reply With Quote
Old 2006-08-09, 16:17   #6 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default

There's actually a later version of that web service, but it hasn't been released as I want to release it with the new version of MPW, which is still under development (I think the dev is currently busy with work).

The new version of the web service gives you more functions so you can manipulate MP data as well, e.g. add recordings, del recording etc. and look at a lot more stuff. The music functions will be coming, when I get time.

If you want to check out the code, goto
www.sf.net/projects/mp-webinterface

Sam
samuel337 is offline   Reply With Quote
Old 2006-08-09, 16:24   #7 (permalink)
Portal Member
 
Bram's Avatar
 
Join Date: Dec 2005
Location: 's-Hertogenbosch
Age: 30
Posts: 850
Thanks: 20
Thanked 2 Times in 2 Posts

Country:

My System

Default

Thank you! I'm going to look into that immediately.

Maybe I've got it wrong....It seems like the older version isn't compatible anymore. When I try to obtain the GetCurrentlyPlayingItemDetails i.a., I get the following response. This is the case with all MyMusic related requests...

Code:
System.MissingMethodException: Method not found: 'PlayListItem MediaPortal.Playlists.PlayListPlayer.GetCurrentItem()'.

Server stack trace: 
   at ECP2Assembly.MPHandler.get_GetCurrentPlaylistItemProperties(String PropName)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at ECP2Assembly.MPHandler.get_GetCurrentPlaylistItemProperties(String PropName)
   at MPECP2WS.ECP2WS.GetCurrentlyPlayingItemDetails()
__________________
Bram is offline   Reply With Quote
Old 2006-08-09, 16:29   #8 (permalink)
Portal Member
 
Bram's Avatar
 
Join Date: Dec 2005
Location: 's-Hertogenbosch
Age: 30
Posts: 850
Thanks: 20
Thanked 2 Times in 2 Posts

Country:

My System

Default

I'm sorry. I don't know how to compile this correctly. I've compiled MP once, but only with help of the guide. It will take me days before I've got a working versio I'm affraid. Could some help me out? Maybe mail me the compiled version, or explain to me what to do?

Sorry if I'm asking to much. I'm willing to learn, but also hoping to start developing the webinterface asap. I have time this week, but have to start working again next thuseday. I'm hoping to do as much as possible this week.
__________________
Bram is offline   Reply With Quote
Old 2006-08-09, 23:09   #9 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Give me until tonight here and I'll have a compiled version posted - yes you do need to update your ECP2Assembly/ECP2Plugin as well as the web service itself, explaining your errors.

Sam
samuel337 is offline   Reply With Quote
Old 2006-08-09, 23:17   #10 (permalink)
Portal Member
 
Bram's Avatar
 
Join Date: Dec 2005
Location: 's-Hertogenbosch
Age: 30
Posts: 850
Thanks: 20
Thanked 2 Times in 2 Posts

Country:

My System

Default

That will be tomorrow for me I guesse ...... keeping in mind you are at the other side of the world.

Thank you very much for your help Sam.
__________________
Bram is offline   Reply With Quote
Reply

Bookmarks

Tags
control, php, remote, webbased

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get your Creative X-Fi Remote to work with MP Olyrous Tips and Tricks 1 2007-10-27 17:11
Help with TVServer and client rick78 Get Support 8 2006-12-12 19:48
Ideq Biostar 300G MCE-I - remote control problem meg General Support 0 2006-11-05 15:53
Map buttons on MCE remote & Control external hardware djmarzel Codecs, External Players 3 2006-11-01 01:40
USB X10 remote control Aleksw101184 General Support 7 2006-01-08 15:19


All times are GMT +1. The time now is 05:59.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden