Skip to content

Commit 7c4d3e0

Browse files
bulk:
- support for iCUE H100i RGB PRO XT - support for iCUE H115i RGB PRO XT - support for iCUE H150i RGB PRO XT - support for VENGEANCE RGB PRO - support for VENGEANCE RGB PRO SL - support for VENGEANCE RGB RT - support for VENGEANCE RGB RS - support for DOMINATOR PLATINUM RGB - support for VENGEANCE LPX - support for DOMINATOR PLATINUM - support for iCUE LINK ADAPTER - support for iCUE LINK LS350 Aurora RGB - support for iCUE LINK LS430 Aurora RGB - fixup for iCUE Commander Core fan enumeration and speed profiles - multi LCD support - part 1/2 - support for global RGB mode
1 parent 255ee2c commit 7c4d3e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3168
-387
lines changed

README.md

+89-12
Large diffs are not rendered by default.

api/README.md

+142
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,146 @@ $ curl -X POST http:/127.0.0.1:27003/api/lcd -d '{"deviceId":"5C126A3EB51A39569A
370370
"status": 1,
371371
"message": "LCD mode successfully changed"
372372
}
373+
```
374+
### LCD - Change device LCD mode - Combined Metrics (Liquid, CPU)
375+
```bash
376+
$ curl -X POST http:/127.0.0.1:27003/api/lcd -d '{"deviceId":"5C126A3EB51A39569ABADC4C3A1FCF54", "mode": 5}' --silent | jq
377+
{
378+
"code": 200,
379+
"status": 1,
380+
"message": "LCD mode successfully changed"
381+
}
382+
```
383+
### LCD - Change device LCD mode - Combined Metrics (CPU, GPU Temp)
384+
```bash
385+
$ curl -X POST http:/127.0.0.1:27003/api/lcd -d '{"deviceId":"5C126A3EB51A39569ABADC4C3A1FCF54", "mode": 6}' --silent | jq
386+
{
387+
"code": 200,
388+
"status": 1,
389+
"message": "LCD mode successfully changed"
390+
}
391+
```
392+
### LCD - Change device LCD mode - Combined Metrics (CPU, GPU Load)
393+
```bash
394+
$ curl -X POST http:/127.0.0.1:27003/api/lcd -d '{"deviceId":"5C126A3EB51A39569ABADC4C3A1FCF54", "mode": 7}' --silent | jq
395+
{
396+
"code": 200,
397+
"status": 1,
398+
"message": "LCD mode successfully changed"
399+
}
400+
```
401+
### LCD - Change device LCD mode - Combined Metrics (CPU, GPU Load/Temp)
402+
```bash
403+
$ curl -X POST http:/127.0.0.1:27003/api/lcd -d '{"deviceId":"5C126A3EB51A39569ABADC4C3A1FCF54", "mode": 7}' --silent | jq
404+
{
405+
"code": 200,
406+
"status": 1,
407+
"message": "LCD mode successfully changed"
408+
}
409+
```
410+
### LCD - Change device LCD rotation - Normal
411+
```bash
412+
$ curl -X POST http:/127.0.0.1:27003/api/lcd/rotation -d '{"deviceId":"5C126A3EB51A39569ABADC4C3A1FCF54", "rotation": 0}' --silent | jq
413+
{
414+
"code": 200,
415+
"status": 1,
416+
"message": "LCD mode successfully changed"
417+
}
418+
```
419+
### LCD - Change device LCD rotation - 90 clockwise
420+
```bash
421+
$ curl -X POST http:/127.0.0.1:27003/api/lcd/rotation -d '{"deviceId":"5C126A3EB51A39569ABADC4C3A1FCF54", "rotation": 1}' --silent | jq
422+
{
423+
"code": 200,
424+
"status": 1,
425+
"message": "LCD mode successfully changed"
426+
}
427+
```
428+
### LCD - Change device LCD rotation - 180 clockwise
429+
```bash
430+
$ curl -X POST http:/127.0.0.1:27003/api/lcd/rotation -d '{"deviceId":"5C126A3EB51A39569ABADC4C3A1FCF54", "rotation": 2}' --silent | jq
431+
{
432+
"code": 200,
433+
"status": 1,
434+
"message": "LCD mode successfully changed"
435+
}
436+
```
437+
### LCD - Change device LCD rotation - 270 clockwise
438+
```bash
439+
$ curl -X POST http:/127.0.0.1:27003/api/lcd/rotation -d '{"deviceId":"5C126A3EB51A39569ABADC4C3A1FCF54", "rotation": 3}' --silent | jq
440+
{
441+
"code": 200,
442+
"status": 1,
443+
"message": "LCD mode successfully changed"
444+
}
445+
```
446+
### Temperature - Get CPU temperature - string
447+
```bash
448+
$ curl -X GET http:/127.0.0.1:27003/api/cpuTemp --silent | jq
449+
{
450+
"code": 200,
451+
"status": 1,
452+
"data": "37.8 °C"
453+
}
454+
```
455+
### Temperature - Get CPU temperature - float
456+
```bash
457+
$ curl -X GET http:/127.0.0.1:27003/api/cpuTemp/clean --silent | jq
458+
{
459+
"code": 200,
460+
"status": 1,
461+
"data": 38
462+
}
463+
```
464+
### Temperature - Get GPU temperature - string
465+
```bash
466+
$ curl -X GET http:/127.0.0.1:27003/api/gpuTemp --silent | jq
467+
{
468+
"code": 200,
469+
"status": 1,
470+
"data": "37.8 °C"
471+
}
472+
```
473+
### Temperature - Get GPU temperature - float
474+
```bash
475+
$ curl -X GET http:/127.0.0.1:27003/api/gpuTemp/clean --silent | jq
476+
{
477+
"code": 200,
478+
"status": 1,
479+
"data": 38
480+
}
481+
```
482+
### Temperature - Get Storage temperature
483+
```bash
484+
$ curl -X GET http:/127.0.0.1:27003/api/storageTemp --silent | jq
485+
{
486+
"code": 200,
487+
"status": 1,
488+
"data": [
489+
{
490+
"Key": "hwmon1",
491+
"Model": "KINGSTON SA2000M81000G",
492+
"Temperature": 42,
493+
"TemperatureString": "42.0 °C"
494+
},
495+
{
496+
"Key": "hwmon2",
497+
"Model": "KINGSTON SNVS2000G",
498+
"Temperature": 32,
499+
"TemperatureString": "32.0 °C"
500+
},
501+
{
502+
"Key": "hwmon3",
503+
"Model": "KINGSTON SNVS2000G",
504+
"Temperature": 33,
505+
"TemperatureString": "33.0 °C"
506+
},
507+
{
508+
"Key": "hwmon6",
509+
"Model": "Samsung SSD 860",
510+
"Temperature": 21,
511+
"TemperatureString": "21.0 °C"
512+
}
513+
]
514+
}
373515
```

config.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77
"frontend": true,
88
"refreshOnStart": false,
99
"metrics": false,
10-
"dbusMonitor": false
10+
"dbusMonitor": false,
11+
"memory": false,
12+
"memorySmBus": "i2c-0"
1113
}

database/rgb.json

+17
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,23 @@
8484
"brightness": 0.5
8585
}
8686
},
87+
"storm": {
88+
"speed": 4,
89+
"brightness": 1,
90+
"smoothness": 20,
91+
"start": {
92+
"red": 32,
93+
"green": 62,
94+
"blue": 77,
95+
"brightness": 0.5
96+
},
97+
"end": {
98+
"red": 32,
99+
"green": 62,
100+
"blue": 77,
101+
"brightness": 0.5
102+
}
103+
},
87104
"watercolor": {
88105
"speed": 4,
89106
"brightness": 1

src/config/config.go

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ type Configuration struct {
1515
RefreshOnStart bool `json:"refreshOnStart"`
1616
Metrics bool `json:"metrics"`
1717
DbusMonitor bool `json:"dbusMonitor"`
18+
Memory bool `json:"memory"`
19+
MemorySmBus string `json:"memorySmBus"`
1820
}
1921

2022
var configuration Configuration

src/devices/cc/cc.go

+39-37
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,11 @@ func (d *Device) setDeviceColor() {
842842
r.Wave(wavePosition)
843843
buff = append(buff, r.Output...)
844844
}
845+
case "storm":
846+
{
847+
r.Storm()
848+
buff = append(buff, r.Output...)
849+
}
845850
case "flickering":
846851
{
847852
lock.Lock()
@@ -1031,8 +1036,8 @@ func (d *Device) getDevices() int {
10311036

10321037
device.RGB = rgbProfile
10331038
devices[m] = device
1034-
m++
10351039
}
1040+
m++
10361041
}
10371042

10381043
// Temperature probe
@@ -1066,8 +1071,8 @@ func (d *Device) getDevices() int {
10661071
Label: label,
10671072
}
10681073
devices[m] = device
1069-
m++
10701074
}
1075+
m++
10711076
}
10721077

10731078
d.Devices = devices
@@ -1092,6 +1097,7 @@ func (d *Device) setSpeed(data map[int]byte, mode uint8) {
10921097
buffer[i+2] = data[k]
10931098
i += 4
10941099
}
1100+
10951101
response := d.write(modeSetSpeed, dataTypeSetSpeed, buffer, true)
10961102
if len(response) >= 4 {
10971103
if response[5] != 0x07 {
@@ -1353,12 +1359,12 @@ func (d *Device) getDeviceData() {
13531359
if status == 0x07 {
13541360
if _, ok := d.Devices[m]; ok {
13551361
rpm := int16(binary.LittleEndian.Uint16(currentSensor))
1356-
if rpm > 1 {
1362+
if rpm > 20 {
13571363
d.Devices[m].Rpm = rpm
13581364
}
1359-
m++
13601365
}
13611366
}
1367+
m++
13621368
}
13631369

13641370
// Temperature
@@ -1381,6 +1387,7 @@ func (d *Device) getDeviceData() {
13811387
d.Devices[m].Temperature = float32(int16(binary.LittleEndian.Uint16(currentSensor[1:3]))) / 10.0
13821388
d.Devices[m].TemperatureString = dashboard.GetDashboard().TemperatureToString(temp)
13831389
}
1390+
m++
13841391
}
13851392
}
13861393
}
@@ -1667,33 +1674,38 @@ func (d *Device) UpdateRgbProfile(channelId int, profile string) uint8 {
16671674
return 0
16681675
}
16691676

1670-
valid := false
1671-
if _, ok := d.Devices[channelId]; ok {
1672-
if profile == "liquid-temperature" {
1673-
// Apply only if we have pump
1674-
for _, device := range d.Devices {
1675-
if device.ContainsPump {
1676-
valid = true
1677-
break
1678-
}
1679-
}
1680-
if valid {
1681-
// Update channel with new profile
1682-
d.Devices[channelId].RGB = profile
1683-
} else {
1684-
logger.Log(logger.Fields{"serial": d.Serial, "profile": profile}).Warn("Unable to apply liquid-temperature profile without a pump of AIO")
1685-
return 2
1677+
hasPump := false
1678+
for _, device := range d.Devices {
1679+
if device.ContainsPump {
1680+
hasPump = true
1681+
break
1682+
}
1683+
}
1684+
1685+
if profile == "liquid-temperature" {
1686+
if !hasPump {
1687+
logger.Log(logger.Fields{"serial": d.Serial, "profile": profile}).Warn("Unable to apply liquid-temperature profile without a pump of AIO")
1688+
return 2
1689+
}
1690+
}
1691+
1692+
if channelId < 0 {
1693+
for _, device := range d.Devices {
1694+
if device.LedChannels > 0 {
1695+
d.DeviceProfile.RGBProfiles[device.ChannelId] = profile
1696+
d.Devices[device.ChannelId].RGB = profile
16861697
}
1687-
} else {
1688-
// Update channel with new profile
1689-
d.Devices[channelId].RGB = profile
16901698
}
16911699
} else {
1692-
return 0
1700+
if _, ok := d.Devices[channelId]; ok {
1701+
d.DeviceProfile.RGBProfiles[channelId] = profile // Set profile
1702+
d.Devices[channelId].RGB = profile
1703+
} else {
1704+
return 0
1705+
}
16931706
}
16941707

1695-
d.DeviceProfile.RGBProfiles[channelId] = profile // Set profile
1696-
d.saveDeviceProfile() // Save profile
1708+
d.saveDeviceProfile() // Save profile
16971709
if d.activeRgb != nil {
16981710
d.activeRgb.Exit <- true // Exit current RGB mode
16991711
d.activeRgb = nil
@@ -1702,16 +1714,6 @@ func (d *Device) UpdateRgbProfile(channelId int, profile string) uint8 {
17021714
return 1
17031715
}
17041716

1705-
// GetAIOData will return AIO pump speed and liquid temperature
1706-
func (d *Device) GetAIOData() (int16, float32) {
1707-
for _, device := range d.Devices {
1708-
if device.ContainsPump {
1709-
return device.Rpm, device.Temperature
1710-
}
1711-
}
1712-
return 0, 0
1713-
}
1714-
17151717
// UpdateDeviceMetrics will update device metrics
17161718
func (d *Device) UpdateDeviceMetrics() {
17171719
for _, device := range d.Devices {
@@ -1843,7 +1845,7 @@ func (d *Device) saveDeviceProfile() {
18431845
}
18441846

18451847
// Convert to JSON
1846-
buffer, err := json.Marshal(deviceProfile)
1848+
buffer, err := json.MarshalIndent(deviceProfile, "", " ")
18471849
if err != nil {
18481850
logger.Log(logger.Fields{"error": err}).Error("Unable to convert to json format")
18491851
return

0 commit comments

Comments
 (0)