Project Description
.NET Library for accessing Micasaverde (Vera) Home Automation Controllers (VeraLite, Vera3 and VeraEdge).


VeraDotNet is a .NET library for accessing capabilities of Vera (Mi Casa Verde) home automation controllers.

Vera controllers provide an extensive http interface which provides access to many of it's functionality.

VeraDotNet is provide simpler access to Vera functionality from a .NET capable devices. VeraDotNet encapsulates most of the complexity of interfacing with Vera controller and gives developer ability to make use of Visual Studio's Intellisense functionality.

Simply, you can turn on a light switch by following three lines of code.

var ui5Controllers = new Ui5Controllers();

var myController = ui5Controllers.GetController("12345678");

var miosEngine = new MiosEngine(myController);
var officeLight = new BinaryLight1(miosEngine, 20);

// Executes SetTarget action to turn on the device.
officeLight.SSwitchPower1.SetTarget(true);

Or, you can access the same light switch by name, with a few more lines of code.

var ui5Controllers = new Ui5Controllers();

var myController = ui5Controllers.GetController("12345678");

var miosEngine = new MiosEngine(myController);

var miosData = new UserData(miosEngine);

var officeLight = (BinaryLight1) miosEngine.GetDeviceByName("Office Light");

// Executes SetTarget action to turn off the device.
officeLight.SSwitchPower1.SetTarget(false);

As of now, Vera controllers support two different firmware which require different authentication mechanisms. With VeraDotNet, you can retrieve you can retrieve and access Ui5 controllers as above sample. For Ui7 controllers you need code similar to following:

var ui7Controllers = new Ui7Controllers("vera-us-oem-autha.mios.com", "username", "password", "passwordseed", "1");

var myController = ui7Controllers.GetController("12345678");

The TestApp provides more information in the form of comments.

UI7 functionality is just recently added. So it has room for improvement. But it should be sufficient to make you existing UI5 related code to work on UI7.

Last edited Jan 25, 2015 at 9:30 PM by ErcanT, version 5