Skip to content

Commit

Permalink
[psu] initial psu support
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanMulawski committed Jun 19, 2023
1 parent 7e38b4d commit 0008000
Show file tree
Hide file tree
Showing 9 changed files with 559 additions and 99 deletions.
99 changes: 58 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,60 @@ The unofficial CorsairLink plugin for [Fan Control](https://github.com/Rem0o/Fan

## Device Support

| Device | PID | Status | Read Fan/Pump RPM | Set Fan/Pump Power | Read Temp Sensor |
| ------------------------------- | ---------- | --------------------------- | ----------------- | ------------------ | ---------------- |
| Commander PRO | `0c10` | Full Support <sup>1</sup> ||||
| Commander PRO (Obsidian 1000D) | `1d00` | Full Support <sup>1</sup> ||||
| Commander CORE XT | `0c2a` | Full Support <sup>1,2</sup> ||||
| Commander CORE (ELITE CAPELLIX) | `0c1c` | Full Support <sup>1,2</sup> ||||
| Commander CORE | `0c32` | Full Support <sup>1,2</sup> ||||
| Commander Mini | `0c04(3d)` | Full Support <sup>1</sup> ||||
| Hydro H60i Elite | `0c34` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H60i Pro XT | `0c29` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H60i Pro XT | `0c30` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Elite | `0c35` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Platinum | `0c18` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Platinum SE | `0c19` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Pro XT | `0c20` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Pro XT | `0c2d` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H115i Elite | `0c36` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H115i Platinum | `0c17` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H115i Pro XT | `0c21` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H115i Pro XT | `0c2e` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H150i Elite | `0c37` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H150i Pro XT | `0c22` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H150i Pro XT | `0c2f` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H80i | `0c04(3b)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Hydro H100i | `0c04(3c)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Hydro H100i GT | `0c04(40)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Hydro H110i | `0c04(42)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Hydro H110i GT | `0c04(41)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Cooling Node | `0c04(38)` | Support Upon Request | | | |
| Hydro H80 | `0c04(37)` | Support Upon Request | | | |
| Hydro H100 | `0c04(3a)` | Support Upon Request | | | |
| Hydro H80i GT | `0c02` | No Support <sup>6</sup> ||||
| Hydro H80i GT V2 | `0c08` | No Support <sup>6</sup> ||||
| Hydro H80i Pro | `0c16` | No Support <sup>6</sup> ||||
| Hydro H100i GT V2 | `0c09` | No Support <sup>6</sup> ||||
| Hydro H100i GTX | `0c03` | No Support <sup>6</sup> ||||
| Hydro H100i Pro | `0c15` | No Support <sup>6</sup> ||||
| Hydro H110i GT V2 | `0c0a` | No Support <sup>6</sup> ||||
| Hydro H110i GTX | `0c07` | No Support <sup>6</sup> ||||
| Hydro H115i Pro | `0c13` | No Support <sup>6</sup> ||||
| Hydro H150i Pro | `0c12` | No Support <sup>6</sup> ||||
| Device | Type | PID | Status | Read Fan/Pump RPM | Set Fan/Pump Power | Read Temp Sensor |
| ------------------------------- | ---------- | ---------- | -------------------------------- | ----------------- | ------------------ | ---------------- |
| Commander PRO | Controller | `0c10` | Full Support <sup>1</sup> ||||
| Commander PRO (Obsidian 1000D) | Controller | `1d00` | Full Support <sup>1</sup> ||||
| Commander CORE XT | Controller | `0c2a` | Full Support <sup>1,2</sup> ||||
| Commander CORE (ELITE CAPELLIX) | Controller | `0c1c` | Full Support <sup>1,2</sup> ||||
| Commander CORE | Controller | `0c32` | Full Support <sup>1,2</sup> ||||
| Commander Mini | Controller | `0c04(3d)` | Full Support <sup>1</sup> ||||
| Hydro H60i Elite | AIO | `0c34` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H60i Pro XT | AIO | `0c29` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H60i Pro XT | AIO | `0c30` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Elite | AIO | `0c35` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Platinum | AIO | `0c18` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Platinum SE | AIO | `0c19` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Pro XT | AIO | `0c20` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H100i Pro XT | AIO | `0c2d` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H115i Elite | AIO | `0c36` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H115i Platinum | AIO | `0c17` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H115i Pro XT | AIO | `0c21` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H115i Pro XT | AIO | `0c2e` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H150i Elite | AIO | `0c37` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H150i Pro XT | AIO | `0c22` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H150i Pro XT | AIO | `0c2f` | Full Support <sup>1</sup> || ✅ <sup>4</sup> | ✅ <sup>5</sup> |
| Hydro H80i | AIO | `0c04(3b)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Hydro H100i | AIO | `0c04(3c)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Hydro H100i GT | AIO | `0c04(40)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Hydro H110i | AIO | `0c04(42)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| Hydro H110i GT | AIO | `0c04(41)` | Full Support <sup>1</sup> ||| ✅ <sup>5</sup> |
| HX550i | PSU | `1c03` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| HX650i | PSU | `1c04` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| HX750i | PSU | `1c05` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| HX850i | PSU | `1c06` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| HX1000i | PSU | `1c07` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| HX1200i | PSU | `1c08` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| HX1000i (2021) | PSU | `1c1e` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| HX1500i (2021) | PSU | `1c1f` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| RM550i | PSU | `1c09` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| RM650i | PSU | `1c0a` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| RM750i | PSU | `1c0b` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| RM850i | PSU | `1c0c` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| RM1000i | PSU | `1c0d` | 1.3.x Pre-release <sup>3,8</sup> || ✅ <sup>7</sup> ||
| Cooling Node | Controller | `0c04(38)` | Support Upon Request | | | |
| Hydro H80 | AIO | `0c04(37)` | Support Upon Request | | | |
| Hydro H100 | AIO | `0c04(3a)` | Support Upon Request | | | |
| Hydro H80i GT | AIO | `0c02` | No Support <sup>6</sup> ||||
| Hydro H80i GT V2 | AIO | `0c08` | No Support <sup>6</sup> ||||
| Hydro H80i Pro | AIO | `0c16` | No Support <sup>6</sup> ||||
| Hydro H100i GT V2 | AIO | `0c09` | No Support <sup>6</sup> ||||
| Hydro H100i GTX | AIO | `0c03` | No Support <sup>6</sup> ||||
| Hydro H100i Pro | AIO | `0c15` | No Support <sup>6</sup> ||||
| Hydro H110i GT V2 | AIO | `0c0a` | No Support <sup>6</sup> ||||
| Hydro H110i GTX | AIO | `0c07` | No Support <sup>6</sup> ||||
| Hydro H115i Pro | AIO | `0c13` | No Support <sup>6</sup> ||||
| Hydro H150i Pro | AIO | `0c12` | No Support <sup>6</sup> ||||

1. Software mode only. Device lighting will be software-based.

Expand All @@ -67,6 +80,10 @@ The unofficial CorsairLink plugin for [Fan Control](https://github.com/Rem0o/Fan

6. The USB device class is not HID and support cannot be added.

7. The minimum fan duty is 30%. When the fan power is set to 0%, control of the fan will be returned to the PSU allowing zero-RPM operation. When the fan power is set to 1% or higher, control of the fan will be returned to Fan Control.

8. The LibreHardwareMonitor "PSU (Corsair)" sensor source must be disabled in Fan Control's Sensor Settings.

## Installation

⚠ This plugin will not function correctly if Corsair iCUE (specifically, the "Corsair Service" service) is running. This service should be stopped before running Fan Control. Running other programs that attempt to communicate with these devices while Fan Control is running is not currently a supported scenario.
Expand Down
3 changes: 3 additions & 0 deletions src/CorsairLink.Abstractions/ILogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
public interface ILogger
{
void Log(string message);
void Normal(string deviceName, string message);
void Error(string deviceName, string message);
void Debug(string deviceName, string message);
}
24 changes: 0 additions & 24 deletions src/CorsairLink.Abstractions/SupportedDeviceCollection.cs

This file was deleted.

25 changes: 25 additions & 0 deletions src/CorsairLink.Abstractions/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,29 @@ public static string ToHexString(this ReadOnlySpan<byte> bytes)
}

public static string ToHexString(this byte[] bytes) => ToHexString(bytes.AsSpan());

public static float FromLinear11(ReadOnlySpan<byte> bytes)
{
int value = bytes[1] << 8 | bytes[0];

int mantissa = value & 0x7FF;
if (mantissa > 1023)
mantissa -= 2048;

int exponent = value >> 11;
if (exponent > 15)
exponent -= 32;

return mantissa * (float)Math.Pow(2, exponent);
}

public static bool GetEnvironmentFlag(string flagName)
{
var variableValue = Environment.GetEnvironmentVariable(flagName);
if (string.IsNullOrEmpty(variableValue))
{
variableValue = Environment.GetEnvironmentVariable(flagName, EnvironmentVariableTarget.Machine);
}
return !string.IsNullOrEmpty(variableValue) && (variableValue.ToLower() == "true" || variableValue == "1");
}
}
Loading

0 comments on commit 0008000

Please sign in to comment.