PluginGuiWindow Reference

This class provides access to useful methods used to interact with InControl via a custom UI window.

Namespace: MLS.HA.DeviceController.Common.Gui.PluginGuiWindow
DLL: MLS.HA.DeviceController.Common.DLL

Add Device

Adds a new device to the database to be tracked by InControl. This is useful if you need to gather input from a user and create a new device based on that input. Once the device has been added, the trackDevice method will be called in your controller.

Guid addDevice(DeviceProviderTypes provider, string controllerName, DeviceType deviceType, object providerDeviceId, string deviceName)

Parameters

  • provider: This is the provider type. This will typically be DeviceProviderTypes.PluginDevice. 
  • controllerName: The name of the controller as exposed by your HaController class. 
  • deviceType: The type of device to add. 
  • providerDeviceId: This should be a unique id to identify your device. Can be a string or a number. 
  • deviceName: The name of the device as displayed in InControl. 

 

Get Setting

This retrieves a setting from the database.

string getSetting(string settingId);

Parameters

  • settingId: This is the unique ID of the setting you wish to retrieve from the database.

Save Setting

This saves a setting from the database.

void setSetting(string settingId, string settingValue);

Parameters

  • settingId: This is the unique ID of the setting you wish to save to the database.
  • settingValue: This is the value to save to the setting..

Save Device Metadata

This will save data that's specific for a given device.

void setDeviceMetaData(Guid deviceId, string dataName, string dataValue);

Parameters

  • deviceId: This is the unique GUID of the device you for which you wish to save meta data.
  • dataName: This is the unique name of the metadata.
  • dataValue: This is the value to save to.

Get Device Metadata

This will retrieve data that's specific for a given device.

string getDeviceMetaData(Guid deviceId, string dataName);

Parameters

  • deviceId: This is the unique GUID of the device you for which you wish to save meta data.
  • dataName: This is the unique name of the metadata.

Get Devices

This retrieves a list of all devices in InControl.

List getDevices();