Controller Creation

Creating a custom controller will allow you to add new devices to InControl.  

  1. First, create a new Visual Studio project.  Reference MLS.Common.dll and MLS.HA.DeviceController.Common.dll from your InControl install folder.
  2. Create a new class. Have it inherit from HaController and implement IHaController and optionally IHAControllerV2.
  3. If you are using Visual Studio, you can have it automatically implement all the methods for you from the interface (see sample code for methods)

Some things to remember:

  1. You should create an array or a list of type HaDevice to store all your controller's known devices
  2. You should only populated this list inside the trackDevice method.
  3. If you want InControl to add a device, call raiseDiscoveredDevice(MLS.HA.DeviceController.Common.DeviceProviderTypes.PluginDevice, CONTROLLER_NAME, MLS.HA.DeviceController.Common.DeviceType.DimmerSwitch, "Unique Id", "device name")