Giter Club home page Giter Club logo

msi-mystic-light-controller's Introduction

MSI Mystic Light Controller

Library written in C# used to easily change the lights of your MSI PC programmatically. This library is built on top of the Mystic Light SDK by MSI

How to use

First download the MSI Mystic Light SDK from the MSI website and put it somewhere on your PC.

Create a LightController object and pass in the location to the Mystic Light SDK dll.

LightController controller = new LightController("C:\\Path\\To\\SDK.dll");

Note: the path to pass in is optional. If none is given, the default windows procedure of locating a DLL is used.

Use the interface of the controller class to change the state of your lights. This includes:

  • changing the color
  • changing the style (for example: rainbow)
  • changing speed
  • changing brightness

Most of the functions of the LightController class require you to pass in a device. The available devices are stored in the Devices property.

Minimal working example

LightController controller = new LightController("C:\\MSI\\SDK_FOLDER\\");
string device = controller.Devices[0];
Color color = new Color(150,217,40);
LED led = controller.GetDeviceLED(device, 0);
Console.WriteLine(led.ToString());
led.CurrentStyle = "rainbow";   // Update the style of a single LED
controller.SetAllLedColors(device, color);   // Update the colors of all LED's of a certain device

msi-mystic-light-controller's People

Contributors

altoidbox avatar freekds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

msi-mystic-light-controller's Issues

can't change the color of leds

Hello,

I wan't to change the color of my leds via webrequests.

I'm not that familiar with programming and tested a bit around and wasn't able to change the color of my leds.
At first I thought: "Maybe I did something wrong", but then I also tried to change the Style, Brightness ans Speed - no problem at all!

Could this be a problem of my Mainboard? (doesn't makes sense to me too tbh)
I've got an MSI MPG x570 gaming plus.

My simple code looks like this:

LightController controller = new LightController("D:\\MSI\\SDK\\");
string device = controller.Devices[0];
Color color = new Color(0,0,255);

controller.SetAllLedColors(device, color);
controller.SetAllLedBrightness(device, 5);
controller.SetAllLedStyles(device, "Steady"); //Rainbow, Breathing etc. is working
controller.SetAllLedSpeed(device, 3);

LED led = controller.GetDeviceLED(device, 0);
Console.WriteLine(led.ToString());

Consoleoutput from led:

LED 0 (device: MSI_MB):
    Current color: (0, 0, 255)
    Current style : Steady
    Current speed: 3 (Max: 3)
    Current brightness: 5 (max: 5)
    Possible Styles: Off, Rainbow, Meteor etc ...

Same for the other leds (I've got 5 on my mb)

Do you have any Ideas why I can't change the color?

Regards,
Daniel

System.DllNotFoundException

Hi Freek,

I keep running into this exception:
Exception thrown: 'System.DllNotFoundException' in MysticLightController.dll
An unhandled exception of type 'System.DllNotFoundException' occurred in MysticLightController.dll
Unable to load DLL 'MysticLight_SDK.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)

Any idea what could cause this? I have the latest MSI Dragon software with Mystic Lights installed.
When I try to import the MysticLight_SDK.dll into my Visual Studio project I get an error that it is not a type or version this project can use. The SDK documentation mentions nothing about any dependencies other than "MSI Mystic Light related applications must be installed before using the SDK function".

I've tried all I could think of, even dependency walker for the MysticLight_SDK.dll, but something seems to be missing and it doesn't tell what.

Grtz,
Hans

Changing color

Hi! Does it support multiple colors? For example, three colors changing one after another? How it works?
I try to find something like aura sync software from asus (my prevuious motherboard was asus rog), but current device and its software (Mystic Light) dont support multiple colors, so it makes me sad ahah

Example
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.