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

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/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


- nad - 2006-08-23

dbrood,

XBMCControl is my app. A few days ago I uplaoded a new version to SourceForge which doesn't have any major new functions over the previous version but should be slightly more robust.

As far as username/password can't you just add the details to the ini.txt file using the same format as the xbmc configuration file?

e.g.
Code:
smb://DOMAIN;username:pwd@MyWindowsServer/movies/

Nad


- dbrood - 2006-08-23

hi nad,
thx for getting back to me,

first off great work on your app,

secondly i think i didnt word my question correctly, i access my xbox webserver externally, so it is password protected, in vers. 1.23 i can add username= and pasword= into the ini.txt file and it works fine, (unfortunatley this doesnt seem to work in vers 1.5, ive even tried copying the working config from 1.23 install to the 1.5 but still no joy) my question was when the ip wizard is run (when ran manually or when config isnt detected, i wouldve liked a user prompt for the login details for the webserver as my xbox will not reply back, with timeout errors as it sits there waiting for authentication, putting the username credentials into the ini file works fine.

ive had a look at the source code and ran through it step by step using vb.net express (all i could get my hands on) and it seems to not even touch the thesettings.username.

sorry if none of this makes sense, prog. int my forte, but this app has inspired me lol

love the fact you can click on the screen shot in the display tab only for xbmc to respond lol didnt expect that.

once i put the user credentials for the xbox webserver in i can then rerun the setup, which then syncs up my bookmarks, after that all is fine.


- nad - 2006-08-24

That's a very clear explanation. I have probably done something silly in recent versions; I don't use the passsword feature and wouldn't have notice if I had. I'll have a look and upload a fix. If it doesn't happen tomorrow then it won't happen for a week since I am going away for a week.


- dbrood - 2006-08-27

thanks again nad for the reply, sorry i didnt get back to you been in hospital with kidney stones, they had to screw a pipe from my kidney to my bladder, which as you can guess is pretty painfull, especially when it feels like im giving birth to a bowling ball!!! Shocked Shocked

i look forward to your next release Smile

glad to see its sill worked on!


- nad - 2006-09-04

dbrood: That sounds awful, hope you are feeling better!

I have uploaded v1.6 to SourceForge which should fix the password problem.

If you are using the PocketPC version then you will need to also update xbmc to the latest cvs - there was a small problem with xbmc which only the PPC version failed against.


- dbrood - 2006-09-05

nad - thankyou very very much Smile

ill test this tonight, how was the week break?

would you mind if i reported back here if i find any more quirks/suggestions?

at the moment it feels like im trying to pass a bowling ball
now got every sympathy for women who have given birth!!!

EDIT:-

ok on initial testing it still times out, this is from the debug logfile :-

05/09/2006 22:00:00 -- Regular timeout:http://192.168.1.112/xbmcCmds/xbmcHttp?command=getcurrentplaylist :3000
-------------
05/09/2006 22:00:00 -- getPageResult:Err:Time out


the ":3000" at the end of the above url isnt a port address i take it? is it some form of numeric logging you can refer too? (after re-reading it it def. cannot be a port address lol the medication im on makes things a bit fuzzy)

this is my current config :-

XBoxIP=192.168.1.112
Username=xbox
Password=*******
BypassCache=False
WipeImageReview=False
WipeFolders=False
SaveToFolder_jpg=False
AutoStartPlayList=True
AutoCheckClipboard=False
CheckPeriod=10
StreamProtocol=mms:|http:|shout:|ftp:|rtsp:|rtp:|udp:|
StreamExt=.asf|.wmv|
ImageExt=.jpg|.bmp|.gif|.tif|.jpeg|.png|
MSNMessenger=False
UseXBMCExtensions=True
AutoGetPictureThumbs=False
Debug=True


its cutdown for a reason, in vers 1.23 (the only version where authentication worked) it would moan because of the default directory config, so i used to have too delete all the folder mappings and invalid smb shares from the config, input my xbox ip and the user credentials, i would then (when it connected to the xbox) re run the 1st time setup which then re-pulled off all my bookmarks.

Unfortunatley (im going to re-look into this) looks like its still not working, im going to go through the sourcecode again if thats ok step by step to see if the settings are being passed.

ps i can login via web with same user credentials fine.


Thanks again for this gem of an app. You must of spent some man hours in coding it, but also designing it, some thought has gone into this lol i should know ive tried but never got it to be as feature filled as yours !! Smile

EDIT 2:- ok for testing reasons i took a copy of the above config for version 1.6 and pasted it into my config for your 1.23 version, and it connected straight away, copied that config back over to the 1.6 and it still times out.


- dbrood - 2006-09-07

Update:-
Ok after a bit of looking at the source code so far i can tell the settings are being parsed and in your method procSetting, i can see the correct username and password being stored -

Case "username"
theSettings.username = vals(1) <---------- i can see my username(xbox)
Case "password"
theSettings.password = vals(1) <---------- i can see my password
Case "timeoutlong"
XBMC.timeoutLong = CInt(vals(1))
Case "timeoutshort"
XBMC.timeoutShort = CInt(vals(1))
Case Else
Return False



So far the settings are being read, im still continuing looking...


- nad - 2006-09-07

dbrood: just sent you a Private Message. Let's continue this discussion through that medium and then I'll report back here when it is resolved.


- nad - 2006-09-09

For anyone interested: it turns out that Dbrood's problem was down to a configuration problem caused by moving between different versions of XBMCControl. Deleting the old folder and starting afresh fixed things.


- TREX6662k5 - 2006-11-23

Slight ressurection of thread, but do you have any plans on improving getsysteminfo? I mean, compared to the amount of data xbmc can display, the httpapi is missing certian bits and pieces.


- nad - 2006-11-26

Are you sure what you are after is not available through getsysteminfo? Can you give an example of what you are after?


- TREX6662k5 - 2006-11-27

Mostly weather related. Only location,temperature, condition can be retrieved and its only for the first location. What would be helpful if is someone could retrieve the extra locations, weather.com status number (for the picture) ,other information (wind etc) and the 5 day forcast.

Sounds like a hell of a list, but thats what I would like to retreve.


- TREX6662k5 - 2006-11-27

Other things that I might point out that are missing from the httpapi (im just pointing these out)

mplayer build
kernel version
uptime\total time
Information under XBOX, video, network (Apart from IP), dvd-rom, hard disk

Bugs
1 returns "rror:No information retrieved for"
To
23 returns "trieved for"
Depending on the parameter, those above will subtract characters from the left depending on parameter
Same occurs from
25 - 31
33 - 34

124 returns "# Invalid path in xbmcTakeScreenShot - saving to Z:"
until 130 (with the string subtract problem as above)
136, 139, 147, 145, 148
150 (which i expect to retrieve HDD temp) returns 0

200 - 263 some dont return an error or the error is messed up due to string subtraction
300

304 - 320 returns image/jpg;base64, (include string subtraction, 304 will make firefox attempt to display an image)

350 - 356 returns the name of the current weather picture displayed (i think because i got hot.jpg) (include string subtraction)

390 will return "# port this" title=" untill 403 (include string subtraction)

500 will return " ssing parameter"
599 will return "der" untill 601 (include string subtraction)

29998 and 29999 work the rest will return something or crash the http server

Upon starting XBMC the first request over HTTP will be returned in plaintext
2nd will return html formatted

Well I hope that is of some use.
build date 12 november 2006
firefox browser


- TREX6662k5 - 2006-11-27

Forgot to point out numbers are parameters for getsysteminfo


- Drongo - 2006-11-27

Nad, if you do decide to add all this extra info for weather, can you create a new tag such as getweatherinfo and not change the getsysteminfo response. Also if you do decide to do it can you also return the thumb name & path for the weather image displayed in XBMC.

Drongo