Skip to content

FiercestT/aura-sdk-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asus Aura SDK Wrapper for Java

What is It?

A Java Wrapper for the Asus Aura SDK that allows you to control your lights (GPU, Motherboard, RGB Headers, Asus Device, etc).

Note: This will only work on a 32bit jvm.

Documentation

See the wiki.

Installation

Currently, you can add the jar manually to the classpath from the releases. I will be making a maven repo for it soon. Please note, that a Com4j dll will be created in the directory that the program is executed. This is required to interact with the Aura COM Library.

Does it Actually Work (Unlike others)?

YES!
The provided Aura SDK on the website (version 2.0) does not work. Instead, the Asus Aura SDK was ported to a COM Type Library which this wrapper is interfacing.

Building

The project now uses Lombok, follow this this guide to configure it with your IDE.

Quick Start Example

import ca.fiercest.aurasdk.AuraRGBLight;
import ca.fiercest.aurasdk.AuraSDK;
import ca.fiercest.aurasdk.AuraSDKDevice;
import ca.fiercest.aurasdk.Color;

public class Quickstart
{
    public static void main(String... args) throws Exception
    {
        //Create the Aura SDK Object
        AuraSDK sdk = new AuraSDK();

        //Create a custom Color (using ca.fiercest.aurasdk.Color)
        Color myRedColor = new Color(255, 0, 0);

        //Set all device Colors
        sdk.setAllColors(myRedColor);

        for(AuraSDKDevice device : sdk.getDevices())
        {
            //Get the name of the device.
            String deviceName = device.getName();
            //Get all of the light zones for this device.
            List<AuraRGBLight> deviceLightZones = device.getLightZones();
            //Get the amount of light zones from the list size.
            int lightCount = deviceLightZones.size();
            //Print the device info.
            System.out.println("Found Device Name: " + deviceName + ", Light Zones: " + lightCount);

            //Get the first light zone from this device
            AuraRGBLight deviceFirstLight = deviceLightZones.get(0);
            //Set its color
            deviceFirstLight.setColor(new Color(0, 255, 0)); //Green
            //Print the zone name and its color
            System.out.println("Light Zone Name: " + deviceFirstLight.getName() + ", Zone Color: " + deviceFirstLight.getColor());
        }

        //Wait so we can see the effects.
        Thread.sleep(2500);

        //Manually Release Control of the SDK (recommended, but should automatically invoke on shutdown if not done manually).
        sdk.ReleaseControl();
    }
}