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