]> ###&version; - First release. - iCUE-style dashboard for Corsair HXi / RMi digital power supplies. - Live sensor tiles (per-rail volts/amps/watts, temps, fan, efficiency, input/output power) read from the kernel corsair-psu hwmon driver, so polling costs no USB traffic and cannot collide with anything else. - Fan control: default (PSU firmware), fixed duty, or a custom curve with a draggable editor, plus Quiet / Balanced / Performance / Max presets. - +12V OCP single/multi rail toggle. - Model is auto-detected; 12 supported PSUs, each with its own efficiency coefficients. - Self-contained: bundles every python module it needs. No pip, no internet access required at install or boot. &source; &md5; mkdir -p &plugdir; chmod 755 /usr/local/emhttp/plugins/&name;/fand.sh 2>/dev/null # Warn (do not fail) if the kernel driver has not bound a supported PSU. if ! grep -qs corsairpsu /sys/class/hwmon/hwmon*/name; then echo "" echo " NOTE: no Corsair digital PSU detected yet." echo " This plugin needs a HXi/RMi series unit connected via its USB cable," echo " handled by the kernel 'corsair-psu' driver. Check the cable, then" echo " reload the page." echo "" fi # If a fan curve was active before a reboot, bring the service back up. CFG=&plugdir;/settings.cfg if [ -f "$CFG" ] && grep -q 'mode="curve"' "$CFG"; then setsid /usr/local/emhttp/plugins/&name;/fand.sh >/dev/null 2>&1 < /dev/null & fi echo "" echo "-----------------------------------------------------------" echo " Corsair PSU Center &version; installed" echo " Open the 'CorsairPSUCenter' tab in the top menu." echo "-----------------------------------------------------------" echo "" # stop the fan curve service and hand the fan back to the PSU firmware if [ -f /var/run/corsairpsucenter-fand.pid ]; then kill "$(cat /var/run/corsairpsucenter-fand.pid)" 2>/dev/null rm -f /var/run/corsairpsucenter-fand.pid fi HW="" for h in /sys/class/hwmon/hwmon*; do [ "$(cat $h/name 2>/dev/null)" = "corsairpsu" ] && HW=$h done if [ -n "$HW" ]; then HID=$(grep -o 'HID_ID=[0-9A-Fa-f]*:[0-9A-Fa-f]*:[0-9A-Fa-f]*' "$HW/device/uevent" 2>/dev/null) VID=$(echo "$HID" | cut -d: -f2); PID=$(echo "$HID" | cut -d: -f3) if [ -n "$VID" ]; then python3 -m liquidctl --vendor 0x$(printf '%04x' $((16#$VID))) \ --product 0x$(printf '%04x' $((16#$PID))) initialize --direct-access >/dev/null 2>&1 fi fi # removepkg needs the full versioned package name as it appears in # /var/lib/pkgtools/packages - the bare plugin name does NOT match and fails # with "No such package", silently orphaning the installed files. # Glob so this still works after a version bump. for pkg in /var/lib/pkgtools/packages/&name;-*; do [ -e "$pkg" ] && removepkg "$(basename "$pkg")" >/dev/null 2>&1 done rm -rf "/usr/local/emhttp/plugins/&name;" rm -rf "&plugdir;" rm -f "/boot/config/plugins/&name;.plg" rm -f /var/run/corsairpsucenter-fand.pid echo "Corsair PSU Center removed."