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 10 made on Friday May 9, 2014 at 02:42
Stealth
Long Time Member
Joined:
Posts:
December 2003
72
Hi Lyndel,

Thank you for your reply, Its much appreciated. I was beginning to think there was no help on this for me.


I have this code in Advanced of Activity Properties -

// Define variables
var Target_PC = CF.widget("Remote_PC_IP_Address", "PARAMETERS").label
var Target_Port = CF.widget("Remote_PC_PORT", "PARAMETERS").label
var return_data = "";
var Remote_PC_Socket = new TCPSocket(false);

// Write log if failure
Remote_PC_Socket.onIOError = function(e)
{
Diagnostics.log("Remote_PC_Socket failure: " + e);
};


// Capture return data
Remote_PC_Socket.onData = function()
{
return_data += read();
};


// Initialize Socket
function Initialize()
{
Remote_PC_Socket.onConnect = function()
{
};

// Connect to socket
Remote_PC_Socket.connect(Target_PC,Target_Port,3000);
}

function TCPCommand(command)
{
Remote_PC_Socket.write(command + "\r\n");
}

The IP address and port is collected from two labels I have on a Parameters page.

The Http request command I need to run is -

[Link: 192.168.0.151]

This should switch my Z-Wave light on through my Vera Controller.

Thanks

Steve


Hosting Services by ipHouse