From 9066627610e57e2a0bf5f7af5d46d7e6b02b27d8 Mon Sep 17 00:00:00 2001
From: terratec <989319+terratec@users.noreply.github.com>
Date: Sat, 3 May 2025 13:23:51 +0200
Subject: [PATCH 1/6] Show max temperatures since system boot
---
.../src/app/components/home/home.component.html | 16 ++++++++++++++--
.../src/app/components/home/home.component.ts | 1 +
.../axe-os/src/app/services/system.service.ts | 2 ++
.../http_server/axe-os/src/models/ISystemInfo.ts | 2 ++
main/http_server/http_server.c | 2 ++
main/http_server/openapi.yaml | 8 ++++++++
main/tasks/power_management_task.c | 11 ++++++++++-
main/tasks/power_management_task.h | 2 ++
8 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.html b/main/http_server/axe-os/src/app/components/home/home.component.html
index 6d3a147b4..c433c4f50 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.html
+++ b/main/http_server/axe-os/src/app/components/home/home.component.html
@@ -293,8 +293,20 @@
Pool ({{ activePoolLabel }})
-
Uptime
- {{info.uptimeSeconds | dateAgo}}
+
Uptime Information
+
+
+ | {{info.uptimeSeconds | dateAgo}} |
+
+
+ | Maximum ASIC Temperature: |
+ {{info.tempMax}}°C |
+
+
+ | Maximum VR Temperature: |
+ {{info.vrTempMax}}°C |
+
+
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.ts b/main/http_server/axe-os/src/app/components/home/home.component.ts
index eacfca2e1..63b4d98ed 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.ts
+++ b/main/http_server/axe-os/src/app/components/home/home.component.ts
@@ -279,6 +279,7 @@ export class HomeComponent {
info.coreVoltageActual = parseFloat((info.coreVoltageActual / 1000).toFixed(2));
info.coreVoltage = parseFloat((info.coreVoltage / 1000).toFixed(2));
info.temp = parseFloat(info.temp.toFixed(1));
+ info.tempMax = parseFloat(info.tempMax.toFixed(1));
return info;
}),
diff --git a/main/http_server/axe-os/src/app/services/system.service.ts b/main/http_server/axe-os/src/app/services/system.service.ts
index ca8fb8521..9e0c90f48 100644
--- a/main/http_server/axe-os/src/app/services/system.service.ts
+++ b/main/http_server/axe-os/src/app/services/system.service.ts
@@ -28,7 +28,9 @@ export class SystemService {
voltage: 5208.75,
current: 2237.5,
temp: 60,
+ tempMax: 63,
vrTemp: 45,
+ vrTempMax: 48,
maxPower: 25,
nominalVoltage: 5,
hashRate: 475,
diff --git a/main/http_server/axe-os/src/models/ISystemInfo.ts b/main/http_server/axe-os/src/models/ISystemInfo.ts
index 65f780209..b43f71fa2 100644
--- a/main/http_server/axe-os/src/models/ISystemInfo.ts
+++ b/main/http_server/axe-os/src/models/ISystemInfo.ts
@@ -12,7 +12,9 @@ export interface ISystemInfo {
voltage: number,
current: number,
temp: number,
+ tempMax: number,
vrTemp: number,
+ vrTempMax: number,
maxPower: number,
nominalVoltage: number,
hashRate: number,
diff --git a/main/http_server/http_server.c b/main/http_server/http_server.c
index fe10b1935..0eefbbf0c 100644
--- a/main/http_server/http_server.c
+++ b/main/http_server/http_server.c
@@ -631,7 +631,9 @@ static esp_err_t GET_system_info(httpd_req_t * req)
cJSON_AddNumberToObject(root, "voltage", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.voltage);
cJSON_AddNumberToObject(root, "current", Power_get_current(GLOBAL_STATE));
cJSON_AddNumberToObject(root, "temp", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.chip_temp_avg);
+ cJSON_AddNumberToObject(root, "tempMax", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.chip_temp_max);
cJSON_AddNumberToObject(root, "vrTemp", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.vr_temp);
+ cJSON_AddNumberToObject(root, "vrTempMax", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.vr_temp_max);
cJSON_AddNumberToObject(root, "maxPower", GLOBAL_STATE->DEVICE_CONFIG.family.max_power);
cJSON_AddNumberToObject(root, "nominalVoltage", GLOBAL_STATE->DEVICE_CONFIG.family.nominal_voltage);
cJSON_AddNumberToObject(root, "hashRate", GLOBAL_STATE->SYSTEM_MODULE.current_hashrate);
diff --git a/main/http_server/openapi.yaml b/main/http_server/openapi.yaml
index 97c766ca9..f870b85f7 100644
--- a/main/http_server/openapi.yaml
+++ b/main/http_server/openapi.yaml
@@ -135,11 +135,13 @@ components:
- stratumURL
- stratumUser
- temp
+ - tempMax
- uptimeSeconds
- version
- axeOSVersion
- voltage
- vrTemp
+ - vrTempMax
- wifiStatus
- wifiRSSI
- displayTimeout
@@ -288,6 +290,9 @@ components:
temp:
type: number
description: Average chip temperature
+ tempMax:
+ type: number
+ description: Maximum average chip temperature
uptimeSeconds:
type: number
description: System uptime in seconds
@@ -303,6 +308,9 @@ components:
vrTemp:
type: number
description: Voltage regulator temperature
+ vrTempMax:
+ type: number
+ description: Maximum voltage regulator temperature
wifiStatus:
type: string
description: WiFi connection status
diff --git a/main/tasks/power_management_task.c b/main/tasks/power_management_task.c
index 092bdc21b..4dfb53f1e 100644
--- a/main/tasks/power_management_task.c
+++ b/main/tasks/power_management_task.c
@@ -72,7 +72,10 @@ void POWER_MANAGEMENT_task(void * pvParameters)
power_management->frequency_value = nvs_config_get_u16(NVS_CONFIG_ASIC_FREQ, CONFIG_ASIC_FREQUENCY);
ESP_LOGI(TAG, "ASIC Frequency: %.2fMHz", (float)power_management->frequency_value);
uint16_t last_asic_frequency = power_management->frequency_value;
-
+
+ power_management->chip_temp_max = 0.0;
+ power_management->vr_temp_max = 0.0;
+
while (1) {
// Refresh PID setpoint from NVS in case it was changed via API
@@ -83,8 +86,14 @@ void POWER_MANAGEMENT_task(void * pvParameters)
power_management->fan_rpm = Thermal_get_fan_speed(&GLOBAL_STATE->DEVICE_CONFIG);
power_management->chip_temp_avg = Thermal_get_chip_temp(GLOBAL_STATE);
+ if (power_management->chip_temp_avg > power_management->chip_temp_max) {
+ power_management->chip_temp_max = power_management->chip_temp_avg;
+ }
power_management->vr_temp = Power_get_vreg_temp(GLOBAL_STATE);
+ if (power_management->vr_temp > power_management->vr_temp_max) {
+ power_management->vr_temp_max = power_management->vr_temp;
+ }
// ASIC Thermal Diode will give bad readings if the ASIC is turned off
// if(power_management->voltage < tps546_config.TPS546_INIT_VOUT_MIN){
diff --git a/main/tasks/power_management_task.h b/main/tasks/power_management_task.h
index 580b0264c..bc4dc05d5 100644
--- a/main/tasks/power_management_task.h
+++ b/main/tasks/power_management_task.h
@@ -7,7 +7,9 @@ typedef struct
uint16_t fan_rpm;
float chip_temp[6];
float chip_temp_avg;
+ float chip_temp_max;
float vr_temp;
+ float vr_temp_max;
float voltage;
float frequency_value;
float power;
From 28a7f519f9d7ccc7f4bbd597c573c982baeac8de Mon Sep 17 00:00:00 2001
From: terratec <989319+terratec@users.noreply.github.com>
Date: Sun, 25 May 2025 15:29:53 +0200
Subject: [PATCH 2/6] Check whether temperature values are available
---
.../src/app/components/home/home.component.html | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.html b/main/http_server/axe-os/src/app/components/home/home.component.html
index c433c4f50..34a4b4358 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.html
+++ b/main/http_server/axe-os/src/app/components/home/home.component.html
@@ -1,3 +1,4 @@
+--
Heat
ASIC Temperature
- --
0; else noTemp">
{{info.temp}} °C
@@ -300,11 +300,15 @@ Uptime Information
| Maximum ASIC Temperature: |
- {{info.tempMax}}°C |
+ 0; else noTemp">
+ {{info.tempMax}}°C |
+
- | Maximum VR Temperature: |
- {{info.vrTempMax}}°C |
+ 0">
+ Maximum VR Temperature: |
+ {{info.vrTempMax}}°C |
+
From 553bc7fdc5c2b4b6ffef251c8dd8eb3dfd806311 Mon Sep 17 00:00:00 2001
From: terratec <989319+terratec@users.noreply.github.com>
Date: Sun, 25 May 2025 19:15:32 +0200
Subject: [PATCH 3/6] Fix width for uptime value
---
.../axe-os/src/app/components/home/home.component.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.html b/main/http_server/axe-os/src/app/components/home/home.component.html
index 34a4b4358..7fe8ec152 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.html
+++ b/main/http_server/axe-os/src/app/components/home/home.component.html
@@ -296,7 +296,7 @@ Pool ({{ activePoolLabel }})
Uptime Information
- | {{info.uptimeSeconds | dateAgo}} |
+ {{info.uptimeSeconds | dateAgo}} |
| Maximum ASIC Temperature: |
From e8ee75285e4bfbedc0595434292272f7a688a58e Mon Sep 17 00:00:00 2001
From: duckAxe <>
Date: Thu, 19 Jun 2025 09:09:21 +0200
Subject: [PATCH 4/6] Fixed uptime card table
---
.../app/components/home/home.component.html | 20 ++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.html b/main/http_server/axe-os/src/app/components/home/home.component.html
index 7fe8ec152..890e2aca9 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.html
+++ b/main/http_server/axe-os/src/app/components/home/home.component.html
@@ -298,17 +298,23 @@ Uptime Information
| {{info.uptimeSeconds | dateAgo}} |
+
+
| Maximum ASIC Temperature: |
- 0; else noTemp">
- {{info.tempMax}}°C |
-
+
+ 0; else noTemp">
+ {{info.tempMax}}°C
+
+ |
- 0">
- | Maximum VR Temperature: |
- {{info.vrTempMax}}°C |
-
+ Maximum VR Temperature: |
+
+ 0; else noTemp">
+ {{info.vrTempMax}}°C
+
+ |
From 82fded74555dd30e4da6d816fcb50a17efafc3e7 Mon Sep 17 00:00:00 2001
From: terratec <989319+terratec@users.noreply.github.com>
Date: Thu, 26 Jun 2025 18:52:39 +0200
Subject: [PATCH 5/6] Fix regression for optional VR temperature
---
.../src/app/components/home/home.component.html | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.html b/main/http_server/axe-os/src/app/components/home/home.component.html
index 890e2aca9..300563323 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.html
+++ b/main/http_server/axe-os/src/app/components/home/home.component.html
@@ -308,14 +308,14 @@ Uptime Information
-
- | Maximum VR Temperature: |
-
- 0; else noTemp">
+ 0">
+
+ | Maximum VR Temperature: |
+
{{info.vrTempMax}}°C
-
- |
-
+ |
+
+
From baeabdef3f508336411d3225e561b51459124340 Mon Sep 17 00:00:00 2001
From: terratec <989319+terratec@users.noreply.github.com>
Date: Thu, 26 Jun 2025 22:40:20 +0200
Subject: [PATCH 6/6] Apply patch for adjusted uptime card
---
.../axe-os/src/app/components/home/home.component.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.html b/main/http_server/axe-os/src/app/components/home/home.component.html
index 300563323..7403fe6c3 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.html
+++ b/main/http_server/axe-os/src/app/components/home/home.component.html
@@ -301,7 +301,7 @@ Uptime Information
- | Maximum ASIC Temperature: |
+ Maximum ASIC Temperature |
0; else noTemp">
{{info.tempMax}}°C
@@ -310,7 +310,7 @@ Uptime Information
|
0">
- | Maximum VR Temperature: |
+ Maximum VR Temperature |
{{info.vrTempMax}}°C
|