Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

RGB Control Web Interface

A real-time RGB lighting controller for PCs, built OpenRGB. It dynamically adjusts your motherboard and USB device lighting based on CPU temperature, with support for breathing effects, custom gradient mapping, and visual notifications.

RGB Control Panel Dashboard

Python FastAPI OpenRGB

Features

  • Temperature-Driven Colors: Map CPU thermals to a custom multi-point RGB gradient.
  • Breathing Effects: Smooth transitions between idle and active colors using different wave tables.
  • Visual Notifications: Trigger notification animations via UI or external webhooks.
  • Granular Zone Control: Adjust brightness, toggle individual LEDs, and sync profiles across multiple motherboard headers.
  • Play/Pause & Smart Stop: Halt lighting effects with conditional auto-resume.
  • Live Web UI: Built-in dark-mode dashboard with drag-and-drop gradient editing and live status updates.
  • Minimal CPU/RAM footprint: 66Kb RAM, < 1% CPU core usage. Adjustable FPS and sensor updates.

Prerequisites

  1. Python 3.10+
  2. OpenRGB:
    • Install OpenRGB.
    • Open it, go to Settings > SDK Server, and ensure it is running.

Installation

  1. Clone this repository:

    git clone https://github.com/phlaster/RGBZones
    cd RGBZones/
  2. Install the required Python dependencies:

    pip install -r requirements.txt

Usage

Run the application using Python. Ensure OpenRGB is running in the background so the controller can communicate with your hardware.

python main.py

Command Line Arguments

Argument Description Default
-p, --port Port to run the web server on. 2476
-f, --config-file Path to a JSON config file to load on startup. None

Example:

python main.py --port 8080 --config-file my_rgb_profile.json

Once running, open your browser and navigate to: http://127.0.0.1:2476

Configuration

Configuration is primarily handled through the Web UI, where you can adjust gradients, breathing thresholds, and LED states.

  • Saving/Loading: Use the "Save Config" button in the UI to download your profile as a JSON file. You can load it back via the UI or by passing it to the --config-file argument on startup.
  • Stop Conditions: Click the Stop (⏹) button in the UI to turn off all LEDs and define a resume condition (e.g., "Resume when CPU hits 70°C" or "Resume in 30 minutes").

External Integration

You can trigger notifications on all configured devices simultaneously by making a GET request to the /notify endpoint. This is useful for tying lighting alerts to external scripts, automations, or system events.

curl http://127.0.0.1:2476/notify

Known limitations

  • Currently tested on a single setup
  • On my keyboard attempts to animate keyboard RGB colors lead to flickering and extremely low FPS, so only static color is currently supported (contributions are welcome).

About

CPU temperature-based RGB control panel

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages