oops well actually i have the real wemo and tryin to emulate the software
Although I followed some of your links and found the command string i was looking for to send down the pipe.
this is the one that turns things on!:
private void button2_Click(object sender, EventArgs e)
{
int port = 49153;
String ip = "192.168.100.204";
int switchState = 1; // 1 turns switch on, 0 turns switch off
AsynchronousSocketTCPClient.AsynchronousSocketTCPClient2 httpss = new AsynchronousSocketTCPClient.AsynchronousSocketTCPClient2();
httpss.StartClient(setupHTTPpackage(switchState), ip, port);
}
private string setupHTTPpackage(int switchState)
{
String data = "";
String data1 = "";
data1 += "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"
https://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"
https://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:SetBinaryState xmlns:u=\"urn:Belkin:service:basicevent:1\"><BinaryState>"
data1 += "" + switchState;
data1 += "</BinaryState></u:SetBinaryState></s:Body></s:Envelope>" + "\r\n"; // Use HTML encoding for comma's
data += "POST /upnp/control/basicevent1 HTTP/1.1" + "\r\n";
data += "Content-Type: text/xml; charset=utf-8" + "\r\n";
data += "SOAPACTION: \"urn:Belkin:service:basicevent:1#SetBinaryState\"" + "\r\n";
data += "Connection: keep-alive" + "\r\n";
data += "Content-Length: ";
data += data1.Length + "\r\n";
data += "\r\n";
data += data1 + "\r\n";
data += "\r\n";
return data;
}
so thanks!!