OBS: Developed with AI assistance
This project is a resilient Go-based controller for Water Cooler LCD displays on Linux. It monitors CPU temperature and updates the HID display in real-time.
Originally written in Python, this Go version offers better stability, zero runtime dependencies (single binary), and lower resource footprint.
- Resilient: Handles system hibernation, USB disconnects, and kernel device resets automatically.
- Low Footprint: Written in Go for minimal CPU and RAM usage.
- Smart Sensing: Automatic detection of AMD (
k10temp) and Intel (coretemp) sensors. - System Integration: Fully integrated with
systemd(user-mode) andudev. - Auto-Reconnect: Retries connection every 2 seconds if the device is missing.
The easiest way to install is using the automated script:
chmod +x install.sh
./install.sh- Requirements: Go 1.21+ and
libhidapi-dev. - Build:
go build -o cpu-cooler main.go. - Permissions: Install UDEV rule in
/etc/udev/rules.d/99-cpu-cooler.rules. - Service: Enable the systemd user service for background execution.
- Language: Go (Golang)
- HID Library:
github.com/karalabe/hid(CGO based) - Metrics Library:
github.com/shirou/gopsutil/v4 - Update Frequency: 1 second
- Logging: Heartbeat logged every 60 seconds to
journalctl.
Check if the service is running and view real-time temperature updates:
# View live logs
journalctl --user -u cpu-cooler -f
# Check service status
systemctl --user status cpu-cooler- Tested Hardware: Redragon CCW-3017.
- VendorID:
0x5131 - ProductID:
0x2007
Developed for Linux stability and performance.