Skip to content

Plugins

Rem0o edited this page Mar 13, 2021 · 8 revisions

Fan Control supports plugins to inject sensors and controls into the software from external sources.

Example: https://github.com/Rem0o/FanControl.DellPlugin

Requirements:

IPlugin

You must implement the interface with the following members:

  1. Name ( string )
  2. Initialize()
  3. Load( container )
  4. Close()

The life-cycle of the plugin is as follow:

Initialize => Load => Close.

These methods should be able to be called in this order any number of times without any side-effect or undisposed resources. The load method gets passed a "container" object which contains different lists for your sensors to be added.

IPluginSensor

A sensor has the following members

  1. Name
  2. Value
  3. Update()

The Update method is called internally by the FanControl backend every update cycle, which right now is 1 Hz. Update the value of your sensor in that method from whatever source you are using.

IPluginControlSensor (inherits IPluginSensor)

A control sensor controls sets a value to a fan ( or whatever else ) from a fan curve. That value is between 0 and 100.

A sensor has the following methods

  1. Set( val )
  2. Reset()

The Set( val ) method should activate your control and apply the value to it. The Reset() method is called when the control is disabled and should return back to its default state.

Clone this wiki locally