Creating a custom controller will allow you to add new devices to InControl.
- First, create a new Visual Studio project. Reference MLS.Common.dll and MLS.HA.DeviceController.Common.dll from your InControl install folder.
- Create a new class. Have it inherit from HaController and implement IHaController and optionally IHAControllerV2.
- 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:
- You should create an array or a list of type HaDevice to store all your controller's known devices
- You should only populated this list inside the trackDevice method.
- 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")