XBMC Community Forum
WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps (/showthread.php?tid=8760)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38


WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps - nad - 2004-11-07 00:32

if anyone is using my xbmc client app on a pc (it is written for the pocketpc but because it is written with .net also works on a pc) and have just upgarded to framework 1.1 sp1 they will find it no longer works. i believe it is because there is a slight flaw in the http headers generated by the xbmc web server (goahead). sp1 detects this flaw as a potential security threat. (http://blogs.msdn.com/gzunino/archive/2004/09/05/225881.aspx)

to get around this problem you can turn off sp1's tight security checking by creating a text file with the file name 'xbmccontrol.exe.config' in the same folder as 'xbmccontrol.exe' and with the following content:


<configuration>
<system.net>
<settings>
<httpwebrequest useunsafeheaderparsing='true' />
</settings>
</system.net>
</configuration>


hope this is of use to someone.

(should this post be in the support section? i am sure it will be moved if it should be.)

nad


- ca001560 - 2004-12-09 18:13

i'm having problems with this app and could use some help please.

i know the xbox is working as http://xbox/xbmccmds/xbmchttp?command=getcurrentlyplaying works fine.

whenever i load the control app though it just hangs. i tried the sp1 fix but still had no luck.

any help you can give with this would be great as the web interface just doesen't do what i want

cheers


- elupus - 2004-12-10 20:12

nad, i looked at your patch and while i like the idea behind it and most of the implementations, i was kinda discuraged to see that it was based on http pages that was returned which then had to be parsed.

do you think you could rewrite it so that it's has a more standardized xml approch to it. i'm not that good at xml myself. but by just making sure all returns confine to xml standards. i bet it would be much easier to parse, plus it would be easier to document.

also, that issue you wrote about at the start of this thread, if you could track that down in goahead it would be awesome.

an extension to that would be to provide xbmc with a soap interface (webservices), which would make it even better. but that is possibly a future addition.

elupus


- nad - 2004-12-12 13:20

ca001560: it sounds as if you have not specified the correct ip address of your xbox in the xbmccontrol.ini.txt file. the ini file that is created when you first run the app is just a dummy place holder ready for you to modify with your own settings. also, are you running it on a pc or a pocketpc? if the latter are you sure the network is working properly? the 1.1 sp1 fix mentioned in this thread wouldn't show up as a hang but rather as an error message on the network status display on the app's exit tab.


elupus: there is very little structure in the information returned by the api it is generally all line based (e.g. entries in a folder; entries in a playlist; curent playing item) so it is already very easy to parse. i would argue that it is easier to parse as it currently is unless you wish to use some xml parsing tool/code. in my client app i provide the code to parse the information.

as far as a web service interface i thought about that myself when i started coding the interface but at that time i just wanted something availabel quickly to expose the information and functionality that i required to control the audio features of xbmc without turningthe tv on! i may return to the idea but not for a while i'm afraid.

bob


HTTP API: PocketPC and Windows clients (HTTPAPI) - nad - 2005-01-03 18:53

i have just uploaded a (slightly) modified version of my xbmc http patch and a new feature complete (until the next time!)version of the demo pocketpc and windows client.


[edit 31 july 2005]
the patch is now part of the cvs so the patch is no longer required and you can get the client here client


the following are some screen shots (kindly hosted by imageshack):

[Image: mainthumbnail7js.jpg]
[Image: maintags9or.jpg]
[Image: mainreview6ap.jpg]
[Image: browser8np.jpg]
[Image: playlist8sf.jpg]

nad


- Nickman - 2005-01-04 01:40

(nad @ jan. 03 2005,17:53 Wrote:i have just uploaded a (slightly) modified version of my xbmc http patch and a new feature complete (until the next time!)version of the demo pocketpc and windows client.

you can get both here:
httpapi

the following are some screen shots (kindly hosted by imageshack):

[Image: mainthumbnail7js.jpg]
[Image: maintags9or.jpg]
[Image: mainreview6ap.jpg]
[Image: browser8np.jpg]
[Image: playlist8sf.jpg]

nad
looks cool :kickass:

i wounder if it will work on my p800 and opera Confused


- Livin - 2005-01-04 06:15

nad,
i (and others i'm sure) appreciate you extending the http functionality.

do you plan to continure extending the api to include more xbmc functions? this would be a great addition and used by many i'd guess.


- nad - 2005-01-04 17:05

nickman: i am pretty sure my client app will not work on your p800 since it requires the .net compact framework to run. however, i just had a look at the p800 web site and there is a reference to visual basic so it would probably be quite simple to port the client app (written in vb.net) to the p800. the http api is so simple that it would be easy to write a client app in any language that provides basic network access. my client app doesn't use a browser interface so the use of opera is not relevant.

affini: thanks for the appreciation. i must admit i have always undertaken this project for my own benefit, i.e. i wanted the functionality that is now offered. it is possible i will extend the api further but i can't promise anything. are there any functions you had in mind?

nad


- Livin - 2005-01-04 22:01

i'd love to see these features...
1) modify xbmc settings
2) have a "mimic" mode. where the web site acts as "remote control". so, a change on the web site (say choosing "my videos" would trigger a change on the tv screen so the screen enters "my videos"... like a big remote!


- nad - 2005-01-08 13:30

affini,

1) i believe this would involve quite a lot of coding especially on the gui side most of which would be a replication of the core xbmc stuff so i doubt if this will come any time soon.

2) i'll have a look into this one. i don't need this myself since i use my ppc as an alternative to the tv interface, obviously when listening to music rather than watching videos!

nad


- Nickman - 2005-01-08 17:26

(nad @ jan. 04 2005,16:05 Wrote:nickman: i am pretty sure my client app will not work on your p800 since it requires the .net compact framework to run. however, i just had a look at the p800 web site and there is a reference to visual basic so it would probably be quite simple to port the client app (written in vb.net) to the p800. the http api is so simple that it would be easy to write a client app in any language that provides basic network access. my client app doesn't use a browser interface so the use of opera is not relevant.

affini: thanks for the appreciation. i must admit i have always undertaken this project for my own benefit, i.e. i wanted the functionality that is now offered. it is possible i will extend the api further but i can't promise anything. are there any functions you had in mind?

nad
ahh.. Blush stupid me i read http api and thought you showed it on ie in your ppc. doh.

now i understand though. :lol:


- nad - 2005-01-08 21:26

affini: i have added the ability to send key/button messages through my api.

i have demo'd this capability in my client by having an image of an xbox controller and then when the user clicks on specifics parts of the image the coresponding message is sent to xbmc, e.g. clicking on the dpad-up will simulate the pressing of the actuall controller's dpad-up button.

i will probably upload this new version tomorrow.

nad


- nad - 2005-01-09 20:48

i have come across a problem so the key message update won't be available for a few days.

nad


- Lennon - 2005-01-15 01:13

hello nad,

first i would like to say this is a very cool little add-on program to xbmc. great job! i've been looking for something to replace vinyl and i think this willl do it.

second, sorry to post in this forum as i'm not a developer and i didn't know how to start a new post in the support forum with a link to this one.

anways a few questions...i'm using shares to access all my mp3s so when a playlist is loaded in xbmc and viewed in the pocket pc program most of the names get cut off on the right. can a scroll bar be added to the bottom for better viewing or can just the tag info be displayed?

i also found a strange bug having to do with album covers. if a playlist is loaded in xbmc all the album cover will display on screen and in the ppc program, but if a playlist is made or if songs are selected and played from the ppc program then no album cover is displayed both on xbmc and on ppc.. (i use folder.jpg for my covers)

again, this looks like it could be great add on to xbmc and i'm looking forward to trying new versions when available...any chance it will be added to the xbmc cvs soon for easer upgrades?

thanks again
lennon


- nad - 2005-01-15 19:53

uploaded v0.8 of the xbmc patch code. this adds a new function setkey which allows a client to send button presses or key strokes to xbmc.

also included v0.93 of the demo client which takes advantage of the new setkey function. as i mentioned a couple of posts up clicking on the image of the contrller in the buttons tab will send the appropriate button messages, but what might not be obvious (it isn't) is that clicking on the ppc keyboard (or regular keyboard if running on a pc) will send those key strokes to xbmc.

lennon: i'll see what i can do to fix your problems. i would guess that the album bug is because i don't currently use folder.jpg for the album covers. (this new version doesn't fix them but you might want to try it out anyway.)

nad