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 33 made on Thursday October 25, 2018 at 13:08
kapsreiter
Long Time Member
Joined:
Posts:
November 2006
48
i used this code for months and since 1 year its not working


var socket = new TCPSocket(false);
var result="";


var JSON_on='{"on":true}';

function getInfos(commands)
{
socket.write('PUT /api/AApi3poAYZyOX8KURN2bY9Rne5NpQmvX4Y5Ko38R/groups/1/action HTTP/1.1\r\nContent-Length: '+commands.length+'\r\n\r\n'+commands);

}

socket.onConnect = function()
{
getInfos(JSON_on);
};

socket.onData = function()
{

};

socket.onClose = function()
{
socket = null
}

socket.onIOerror = function() {
System.print("error");
try {
socket.close()
socket = null
} catch(e) {}
}

socket.connect('10.0.0.2', 80, 3000);


the user id is ok, i am able to switch via the hue web interface from my pc

the pronto is in the network, i can test it with a webcam module

any ideas?

thx
tom


Hosting Services by ipHouse