Skip to content
forked from sklose/WeMoWsdl

WSDL definitions to control a Belkin WeMo device

Notifications You must be signed in to change notification settings

cephdon/WeMoWsdl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

WeMoWsdl

This project provides WSDL definitions that can be used to generate client-side code for controlling Belin WeMo devices.

Example usage with C#

Add a Service Reference to 'https://raw.github.com/sklose/WeMoWsdl/master/BasicService.wsdl'. Afterwards you can run the following example code (adjust, IP address and namespaces accordingly)

string ip = "192.168.1.101";
int port = 49153;

var client = new ServiceReference1.BasicServicePortTypeClient();
client.Endpoint.Address = new EndpointAddress(string.Format("http://{0}:{1}/upnp/control/basicevent1", ip, port));

var state = client.GetBinaryState(new ServiceReference1.GetBinaryState());
Console.WriteLine("Switch is current set to: {0}", state.BinaryState);

Console.WriteLine("Turning Switch On");
var msg = new ServiceReference1.SetBinaryState { BinaryState = "1" };
client.SetBinaryState(msg);

About

WSDL definitions to control a Belkin WeMo device

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published