Introduce a daemon component for linux

Related: #23 (closed)

I want to port the ability to regularly update LED colors, as provided by the official Windows software, to linux. This initial code adds a daemon application that can be controlled through a UNIX socket. It has one working effect, which mimics the "Smart" effect by setting the colors according to a hwmon sensor input and a chosen color gradient.

The communication protocol is currently simple and has 3 commands:

  • 0: stop sending commands to the controller(s);
  • 1 devname port [devname port]...: register aura controller(s) with the service, replacing any previously managed ones. The port number must be a decimal value, e.g. 1 i2c-11 78 to register the controller at 0x4e on /dev/i2c-11;
  • 2 path feature r1 g1 b1 v1 r2 g2 b2 v2: start the "Smart" mode using from the sensor feature specified by path (to a hwmon directory) and feature (e.g. temp1). The input value is converted to a color between the two "color points" specified by integer RGB channels and a double sensor value. E.g. 2 /sys/class/hwmon/hwmon0 temp1 0 255 0 20 255 0 0 60 will pick a color between pure green at 20 degrees or lower and pure red at 60 degrees or higher.

Operation can currently be tested by starting the daemon and using netcat: echo <command> | nc -U /tmp/aura.sock.

I've marked this as WIP as I'll probably make some more changes, such as renaming the AuraService and integrating it with the GUI.

Edited by Steven Franzen

Merge request reports

Loading