Skip to content

Breina/OpenRGB.jar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java client to connect to an OpenRGB server.

Special thanks to the C# implementation, which made this project a walk in the park.

Maven coordinates

<dependency>
    <groupId>be.breina</groupId>
    <artifactId>OpenRGB.jar</artifactId>
    <version>0.2.0</version>
</dependency>
import be.breina.openrgb.OpenRgbClientImpl;
import be.breina.openrgb.model.Device;

import java.awt.Color;

public class Example {

    public static void main(String[] args) {
        var client = new OpenRgbClientImpl();

        // Get the total devices
        int deviceCount = client.getDeviceCount();

        // Get all devices
        Device[] devices = client.getGetAllDeviceData();

        // Get device of index 2
        Device device = client.getDeviceData(2);

        // Device data
        device.getName();
        device.getDescription();
        device.getLocation();
        // ...

        // Set first 3 LEDs of this device
        device.setColors(Color.RED, Color.GREEN, new Color(0, 0, 255));
        // Set first 3 LEDs of device of index 2
        client.updateLeds(2, Color.RED, Color.GREEN, new Color(0, 0, 255));

        // Set single LED of this device at index 3
        device.getLeds()[3].setColor(Color.PINK);
        // or
        client.updateLed(2, 3, Color.PINK);

        // Set the name which will show up in OpenRGB
        client.setName("Custom client name");

        // Get OpenRGBs protocol version.
        client.getServerProtocolVersion();
    }
}

RGBController

  • Get device count
  • Get device data
  • Get protocol version
  • Set client name
  • Update LEDs
  • Update single LED
  • Resize zone
  • Update zone LEDs
  • Set custom mode
  • Update mode

About

Obsoleted by a better version

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published