Hi,
I buy a WeMo Switch (
http://www.belkin.com/us/p/P-F7C027/) and after the configuration i can control in command line with the following script :
http://moderntoil.com/?p=839So i think to add the control in homegenie by using the command line describe here :
http://www.homegenie.it/forum/index.php?PHPSESSID=ggcdvb4i6ddoa72uush64hssq0&topic=352.msg2000#newBut if i want to add a real equipment in HG, i have some questions :
1/ HG uPNP doesn't detect The Wemo
1.1/ Limitation on range ports ? (WeMo listen on port 49153 and 49152)
1.2/ WeMo is not recognize because it can be control ? (not a multimedia device)
2/ Is it possible to add the good xml request to command this device ?
3/ Is it possible to transpose the following request in the NetHelper and call url ?
curl -0 -A ? -X POST -H ?Accept: ? -H ?Content-type: text/xml; charset=?utf-8″? -H ?SOAPACTION: ?urn:Belkin:service:basicevent:1#GetBinaryState?" ?data ?<?xml version=?1.0″ encoding=?utf-8″?><s:Envelope xmlns:s=?http://schemas.xmlsoap.org/soap/envelope/? s:encodingStyle=?http://schemas.xmlsoap.org/soap/encoding/?><s:Body><u:GetBinaryState xmlns:u=?urn:Belkin:service:basicevent:1″><BinaryState>1</BinaryState></u:GetBinaryState></s:Body></s:Envelope>? -s http://$IP:$PORT/upnp/control/basicevent1 |
grep ?<BinaryState? | cut -d?>? -f2 | cut -d ?<? -f1 | sed ?s/0/OFF/g? | sed ?s/1/ON/g?
I try with the following one :
var result = Net.WebService("http://10.0.0.102:49153/upnp/control/basicevent1").AddHeader("Accept", "").AddHeader("Content-type", "text/xml; charset="utf-8"").AddHeader("SOAPACTION", ""urn:Belkin:service:basicevent:1#GetBinaryState"").GetData("<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:GetBinaryState></s:Body></s:Envelope>");
Program.Notify("result = ", result);
But it doesn't work.
Someone can help about this ?
Bye