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 38 made on Tuesday October 30, 2018 at 22:07
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
Change your write line to this.... Notice how I simply injected 2 HTTP Request Headers that I pasted above.

socket.write('PUT /api/lVfthQzyz9ZbNsUyndnZT9WBBOQ852HY3fEcPUVg/groups/1/action HTTP/1.1\r\nHost: 10.0.0.2\r\nUser-Agent: ProntoTSU9600\r\nContent-Length: '+commands.length+'\r\n\r\n'+commands);

And finally, when you do send this command, are you getting any data back? I see you are not logging anything in your onData

Change...
socket.onData = function()
{

};

to...

socket.onData = function()
{
var data = this.read();
// to show in ProntoScript console provided you use System.setDebugMask(9);
System.print(data.substr(80));
};

Finally, this is what I was referring to regarding Google Chrome.
1) [Link: developers.google.com]
2) [Link: developers.google.com]

All you have to do is turn on developer tools from Chrome menu and you can see the HTTP Request Headers that are being sent from your Web Browser when this works.

Last edited by Lyndel McGee on October 30, 2018 22:17.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse