This is a fork of the original project made with the intention to add support for newer devices.
Everything is controlled via HTTP requests. Endpoints:
GET 127.0.0.1:21371/set/{mode}/{r}/{g}/{b}
- Sets color for mode
GET 127.0.0.1:21371/get/{mode}
- Gets color for mode
in {r}:{g}:{b}\n
format
With mode
being:
charging
, meaning device charging and below 90% battery capacitylow_bat
, meaning device having battery capacity between 0 and 20%full
, meaning device having battery capacity of at least 90%normal
, covering all other cases
And r
, g
and b
being RGB values between 0 and 255.
Keep in mind that all mode values are for a case with 100% brightness, when the brightness of main display is lowered, the brightness values get scaled accordingly.
curl 127.0.0.1:21371/set/normal/200/0/200
sets "normal" color to purplecurl 127.0.0.1:21371/set/charging/255/0/0
sets "charging" color to redcurl 127.0.0.1:21371/get/charging
gets "charging" color
400 Bad Request
- Invalid mode was chosen404 Not Found
- Either invalid endpoint or value out of range