-
Notifications
You must be signed in to change notification settings - Fork 488
Temperature threshold
Defines how fast the fan runs at different temperatures.
Example:
<TemperatureThreshold>
<FanSpeed>7.5</FanSpeed>
<UpThreshold>63</UpThreshold>
<DownThreshold>48</DownThreshold>
</TemperatureThreshold>
The fan speed in percent.
Must be a floating point number between 0 and 100.
NBFC will select a TemperatureThreshold as soon as the temperature exceeds its UpThreshold.
Must be an integer (unit: degree Celsius).
NBFC will select the next lower threshold as soon as the temperature falls below the DownThreshold.
Must be an integer (unit: degree Celsius).
Let's say you want to achieve the following behavior:
- the fan is off as long as the temperature is below 60°C
- at 60°C the fan starts with a speed of 10%
- at 65°C the fan speeds up to 50%
- at 70°C the fan spins with full speed
You would create the following thresholds:
This is how you would define the thresholds in XML:
<TemperatureThresholds>
<TemperatureThreshold>
<FanSpeed>0</FanSpeed>
<UpThreshold>0</UpThreshold>
<DownThreshold>0</DownThreshold>
</TemperatureThreshold>
<TemperatureThreshold>
<FanSpeed>10</FanSpeed>
<UpThreshold>60</UpThreshold>
<DownThreshold>50</DownThreshold>
</TemperatureThreshold>
<TemperatureThreshold>
<FanSpeed>50</FanSpeed>
<UpThreshold>65</UpThreshold>
<DownThreshold>56</DownThreshold>
</TemperatureThreshold>
<TemperatureThreshold>
<FanSpeed>100</FanSpeed>
<UpThreshold>70</UpThreshold>
<DownThreshold>62</DownThreshold>
</TemperatureThreshold>
</TemperatureThresholds>
The order doesn't matter, because NBFC will ensure that the TemperatureThresholds are sorted by their UpThreshold in ascending order before it applies them.
The FanSpeed-values, as well as the UpThreshold-values except the first one need no further explanation.
The answer is simple: They define the temperature at which NBFC steps down to the previous TemperatureThreshold. By setting an appropriate DownThreshold, you can prevent the fan control logic from permanently switching back and forth between two TemperatureThresholds, which would be quite annoying.
It is recommended to set the DownThreshold to a value below the previous TemperatureThreshold's UpThreshold.
Now that you know how DownThresholds work, it should be easy to understand why the first TemperatureThreshold's DownThreshold is 0: Since there is no previous TemperatureThreshold which could be selected the DownThreshold is useless and will be ignored (0 is just a default value). Also, the UpThreshold is insignificant because NBFC will always select the threshold with the lowest UpThreshold if there is no better TemperatureThreshold to be found.
If you want to create custom TemperatureThresholds, it's easier to modify the default thresholds, than to start from scratch.