From 7f8380c53d7b475c7dc5ef0c948e3beeb55b777f Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Sun, 22 Nov 2026 22:29:16 +0000 Subject: [PATCH 1/8] Show selected fans' speed and PWM in the Unraid footer Dynamix System Temperature shows fan speeds in the status bar at the bottom of every page and takes their PWM percentage from Dynamix Auto Fan, which should not run alongside FanCtrlPlus. A per-fan Footer switch under Syslog & Alerts now shows that fan's RPM and PWM there instead, so Auto Fan can be removed without losing the footer (#45). The switch is off by default. Pages load the footer script only while at least one fan has it on. --- README.md | 1 + .../fanctrlplus2/Fanctrl2Dashboard.php | 3 +- .../fanctrlplus2/FanctrlPlus2Footer.page | 32 +++++++++++++++++++ .../plugins/fanctrlplus2/css/fcp.base.css | 2 +- .../plugins/fanctrlplus2/fanctrlplus2.page | 15 +++++---- .../fanctrlplus2/include/ConfigBackup.php | 2 +- .../fanctrlplus2/include/FanctrlLogic.php | 6 ++-- .../include/update.fanctrlplus2.php | 4 ++- tests/curve_config_test.php | 4 +++ 9 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2Footer.page diff --git a/README.md b/README.md index c17ed31..cf0466e 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ Configuration is done through a user-friendly interface, with custom thresholds, - Lays the fan configurations out side by side, wrapping to the next row, so a wide screen shows several at once and a phone shows one - Dashboard tile and system integration - Optional FCP Airflow Dashboard tile, similar to Unraid’s built-in Airflow tile but enhanced with support for custom fan labels +- Optionally shows each fan's speed and PWM percentage in the status bar at the bottom of every Unraid page, like the Dynamix System Temperature plugin did with Dynamix Auto Fan. Turn it on per fan under Syslog & Alerts - Reorder fan configurations with a button per direction, on a desktop or a phone. The new order is saved and reflected in both the UI and Dashboard. --- diff --git a/src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php b/src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php index 20e8c42..ccbd113 100644 --- a/src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php +++ b/src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php @@ -64,7 +64,8 @@ 'temp_origin' => $temp_origin, 'rpm_val' => $rpm_val, 'percent' => $pct_val, - 'status' => $status + 'status' => $status, + 'footer' => ($cfg['footer'] ?? '0') === '1' ]; } diff --git a/src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2Footer.page b/src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2Footer.page new file mode 100644 index 0000000..91aef17 --- /dev/null +++ b/src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2Footer.page @@ -0,0 +1,32 @@ +Menu="Buttons" +Link="nav-user" +--- + + + + diff --git a/src/usr/local/emhttp/plugins/fanctrlplus2/css/fcp.base.css b/src/usr/local/emhttp/plugins/fanctrlplus2/css/fcp.base.css index 3af7fa1..a92eb10 100644 --- a/src/usr/local/emhttp/plugins/fanctrlplus2/css/fcp.base.css +++ b/src/usr/local/emhttp/plugins/fanctrlplus2/css/fcp.base.css @@ -568,7 +568,7 @@ dt.containerSettingsDt { .fcp-airflow-switch{ display: none; } .fcp-history-switch{ display: none; } -.syslog-switch, .notify-switch{ display: none; } +.syslog-switch, .notify-switch, .footer-switch{ display: none; } .switch-button-label{ font-size: 12px; } .switch-button-label.on{ display: none; } .switch-button-background.checked ~ .switch-button-label.on{ display: inline; } diff --git a/src/usr/local/emhttp/plugins/fanctrlplus2/fanctrlplus2.page b/src/usr/local/emhttp/plugins/fanctrlplus2/fanctrlplus2.page index 9d6b0f3..5a30498 100644 --- a/src/usr/local/emhttp/plugins/fanctrlplus2/fanctrlplus2.page +++ b/src/usr/local/emhttp/plugins/fanctrlplus2/fanctrlplus2.page @@ -1282,8 +1282,9 @@ $(function() { $area.find('.switch-button-button').css('left', checked ? '12px' : '-1px'); // Persist the relevant switch. - if ($input.hasClass('syslog-switch') || $input.hasClass('notify-switch')) { - saveFanSwitchState($input.hasClass('syslog-switch') ? 'setsyslog' : 'setnotify', $input.data('cfg'), checked); + var fanKey = ['syslog', 'notify', 'footer'].find(function(k) { return $input.hasClass(k + '-switch'); }); + if (fanKey) { + saveFanSwitchState('set' + fanKey, $input.data('cfg'), checked); } else if ($input.hasClass('fcp-airflow-switch')) { saveAirflowSwitchState(checked); } else if ($input.hasClass('fcp-history-switch')) { @@ -1292,7 +1293,7 @@ $(function() { }); // Shared change handler for the per-fan and FCP Airflow/History switches. - $(document).on('change', '.syslog-switch, .notify-switch, .fcp-airflow-switch, .fcp-history-switch', function() { + $(document).on('change', '.syslog-switch, .notify-switch, .footer-switch, .fcp-airflow-switch, .fcp-history-switch', function() { var checked = $(this).prop('checked'); var $area = $(this).closest('.switch-area'); @@ -1841,7 +1842,7 @@ $(function() {

Identify PWM Controller: Use this tool to help locate which physical fan is linked to each PWM controller. After identification, adding a custom label makes it easier to recognize and configure later.

-

Syslog & Alerts: Enable or disable syslog logging for each fan individually. When enabled, changes in temperature and fan speed will be recorded in the system log. If a fan setup is already stable or updates too frequently, you can turn off its logging to reduce clutter. Problem alerts send Unraid notifications when a fan has a problem; turn them off for a fan whose controller raises false alarms.

+

Syslog & Alerts: Enable or disable syslog logging for each fan individually. When enabled, changes in temperature and fan speed will be recorded in the system log. If a fan setup is already stable or updates too frequently, you can turn off its logging to reduce clutter. Problem alerts send Unraid notifications when a fan has a problem; turn them off for a fan whose controller raises false alarms. Footer shows the fan's speed and PWM percentage in the status bar at the bottom of every page; it is off by default.

Notes: