New Python Script for MediaPortal Client
#1
I have managed to create a functional environment for XBMC/MediaPortal integration. I have monitored .NET packets and traced the most important ones so XBMC can now control the server using sockets.
I have not managed to find a functional SQL client solution for XBMC yet so I'm using IIS to query the MP database. The database access is required because (as far as I know) you can not ask the MP server for EPG data, schedules etc.

I have put all the XBMC/MP in a separate Python file that can be imported and used generically.

Here is a list of functionality so far:

MediaPortalGW.getServerStatus() #Format DB-MP, DOWN,READY,RECORDING
MediaPortalGW.getVersion() #Format Major.Minor
MediaPortalGW.getChannel() #List of ticket channels, headings in list[0]
MediaPortalGW.getEPGData(10161) #List of EPG data, headings in list[0]. 10000 channelID offset
MediaPortalGW.getRecording() #List of recordings, headings in list[0]
MediaPortalGW.deleteRecording(30) #Server always returns True
MediaPortalGW.getSchedule() #List of schedules, headings in list[0]
MediaPortalGW.getSetting() #List of settings, headings in list[0]
MediaPortalGW.addSchedule(153,'2007-05-24 20:00','2007-05-24 20:15') #Returns the new schedule numer or -1 (failed)
MediaPortalGW.recordProgram(200) #ProgramID as read from EPG. Returns the new schedule number or -1 (failed)
MediaPortalGW.isScheduleRecording(65) #Returns True/False
MediaPortalGW.stopScheduleRecording(65) #Server always returns True
MediaPortalGW.deleteSchedule(91) #Returns True/False. False indicates that Notify failed
MediaPortalGW.notifyScheduleChange() #Returns True/False

Because the setup is somewhat complex I wonder if there is anybody skilled who would like to try it out before releasing it publically. You need to be able to configure MP-Server, activate IIS with a new virtual directory and configure ODBC.

Some minor things more. Looking at the .NET messages it seams information for DLL calls are included in the message. If this interpretation is right I have some heavy release dependency. I have tried to be smart coding for this so that things can be changed easilly.
XBMC can currently not play the RTSP stream send from MP so the app is not perfect for channel zapping. What you can do is order a recording and then watch that. With a DVB-X tuner you can probably record a few channels simultaneously and the "zap" between these. Picture and sound quality is awesome.

MrZ
Reply
#2
Question 
Great!, are you working or will you work together with thechad? http://forum.team-mediaportal.com/mp_xbm...tml?t=2263

...two minds are better than one(?) Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
New Python Script for MediaPortal Client0