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 2 made on Friday June 5, 2020 at 20:43
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
You don't want IR Codes, but rather you want ProntoScript.

You can do it with a raw socket or if you can locate the Philips ProntoScript Library for http, that will make it much simpler.

Here's an example using a raw socket.


[Link: remotecentral.com]


change the socket.onConnect function to this:

socket.onConnect = function()
{
socket.write("GET /relay/0?turn=toggle HTTP/1.0\r\n");
socket.write("Accept: */*\r\n");
socket.write("Host: 10.0.0.13\r\n");
socket.write("Connection: close\r\n");
socket.write("\r\n");
};


If you are not interested in any of the data coming back, you can safely ignore the onData assignment

socket.onData = function(data) {
// blah blah
}


and on the last section, ensure that instead of the IP address '192.168.1.99' that you use "10.0.0.13" and port 80.

if(socket.connected == false)
{
socket.connect('10.0.0.13', 80, 3000);
};


Note that I found this thread using a search for HTTP GET

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse