Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 16 made on Wednesday September 1, 2010 at 11:40
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
I open up a TCPIP socket to the unraid system and send an HTTP Get command which is handled by the unRaid web server (port=80). The basic commands are
Raid.SpinDown = "GET /update.htm?startState=STARTED&cmdSpinDownAll=Spin+Down HTTP/1.1\r\n" + a;
Raid.SpinUp = "GET /update.htm?startState=STARTED&cmdSpinUpAll=Spin+Up HTTP/1.1\r\n"+ a;

The header information is built as follows:

var a = "";
a = a + "Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, ";
a = a + "image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*\r\n";
a = a + "Refer:http://" + Raid.IP + "/main.htm\r\n";
a = a + "Accept-Language: en-US\r\n";
a = a + "User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; ";
a = a + ".NET CLR 2.0.50727; .NET CLR 3.0.30729; Media Center PC 6.0)\r\n";
a = a + "Accept-Encoding: gzip, deflate\r\n";
a = a + "Host: " + Raid.IP + "\r\n";
a = a + "Connection: Keep-Alive\r\n\r\n" ;

where "a" is the HTTP header information. I need to see how much of the header info is required and will do that soon.

unRaid will return a standard HTTP/1.1 OK 200 + additional stuff to the command which I use as an indication the command has been accepted rejected or some other issue.

Obviously there are many unraid commands that can be sent, but these were the only two I researched for what I needed.

I did experiment with opening a telnet port to the server and that also works, but I dropped it as I did not need it for what I am doing.

I just did some investigations on the header. The entire header "a" can be removed and replaced with a crlf ("\r\n") so that the basic command ends in a double CRLF sequence. It does not appear to have any effect on performance.

Last edited by Barry Gordon on September 1, 2010 18:51.


Hosting Services by ipHouse