Giter Club home page Giter Club logo

open-cue-service's Introduction

Open CUE Service latest release Build

HTTP REST API service for Open CUE CLI.

Getting Started

Download and extract the latest release. With iCUE 5 the iCUE profiles in the C:\ProgramData\Corsair\CUE5\GameSdkEffects\profiles directory are used. Create this directory or configure another one, for details on how to setup profiles see Open CUE CLI documentation. Then execute the open-cue-service.exe to start the service. It runs on http://localhost:25555 and can be accessed with any Rest/Http client. By default the API is only available on localhost for security reasons, if you want to expose it in your network please setup a HTTP proxy with authentication such as nginx.

API Documentation

The Rest API exposes an OpenAPI Document at /openapi/v1/openapi.json. The API definition can be viewed in the interactive Swagger UI which is hosted at /openapi. Just start the server and open http://localhost:25555/openapi. You can also open the online version of the API documentation to explore it without running the server.

openapi

Configuration

The profiles directory can be changed, the default is profiles. Change the property "ProfilesDirectoryName": "<your profile directory>" in the appsettings.json.

The Auto Sync for automatic reconnect and detection of crashed iCUE must be enable in the configuration. For the Auto Sync feature an additional profile is required, which must be in the selected profile directory. The profile should be empty and should not have any lighting effect. The profile is used by the service to check if iCUE is running and can be controlled. Change the property "AutoSyncProfileName": "<name of empty profile>" in the appsettings.json. When using the Auto Sync feature, for some effects the opacity value lower than 100% can cause lighting artifacts.

You can also configure the Auto Sync Interval, which is the time in seconds between the checks if iCUE is running. Change the property "AutoSyncInterval": <interval in seconds> in the appsettings.json.

To activate a profile on startup you can set the property "StartProfileName": "<profile name>" to an existing profile you want to be active on start. Default is an empty string, which means no profile will be activated on startup.

Troubleshooting

Sdk Error occurred: InvalidArguments

This error could indicate the missing or wrong profiles directory. Make sure the profiles directory is correctly created according to the Open CUE CLI documentation and the correct name is configured in the appsettings.json (ProfilesDirectoryName property).

Sdk Error occurred: ProfilesConfigurationProblem

When you get this error, make sure you have created the priorities.cfg file with all the entries correctly. Make sure you only use allows character in the name of the profiles. Reexport the profiles which the correct name, do not rename the profiles after you have exported them. Restart iCUE and Open CUE Service after you have changed any file.

License

This project is distributed under Apache License, Version 2.0.

The software iCUE and the file CgSDK.x64_2015.dll are supplied by Corsair Components, Inc. and distributed under different terms. For more information, contact Corsair Components, Inc.

open-cue-service's People

Contributors

dependabot[bot] avatar legion2 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

Watchers

 avatar  avatar  avatar

open-cue-service's Issues

Executable seems to ignore config

The executable seems to ignore the appsettings.json. I have extracted both files in the same directory. As I understood from the documentation that should be all that is necessary, but even when setting ProfilesDirectoryName to a wrong name the executable still uses the default instead of throwing an error.

Please update to support iCue version 5.X

This is just a request, I love the command line software you made, I am really hoping you will be willing to update it to support the latest iCue version 5.x Thank you for your time and consideration.

Make the C# sdk class reusable

The SDK should be reusable for other c# projects. The internal dll wrapper should be hidden and interaction models like OO and Exceptions should be used.

ProfilesConfigurationProblem

Im getting ProfilesConfigurationProblem - problem related to profiles and priorities file

OS: Windows 11
ICUE Version: 4.20.169

My priorities files is:

LightsDay=10
LightsNight=20
LightsNightWeek=25
LightsOff=128
AppVR=800

All the .cueprofile files are in C:\ProgramData\Corsair\CUE4\GameSdkEffects\profiles
image

Here is the profile im trying to load
LightsDay.txt

Make it possible to change port and bind address

As a User I want to change the port and bind address so that I can prevent conflicts with other applications and can access the service over the network.

Note: the service does not provide any security features when it can be accessed over the network

Hide program

I have a suggestion, it is quite annoying to have the console open all the time, the best would be to make an option that would hide the window or that would allow the window to be reduced in the system tray.

Release 0.2.2 does not run

Downloaded and unzipped 0.2.2 and started sevice:

$ open-cue-service.exe
The application to execute does not exist: 'C:\Users\Leon\AppData\Local\Temp\.net\open-cue-service\oj2trrd3.uek\open-cue-service.dll'.

Version 0.2.0 and 0.2.1 releases work.

Does this only affect lighting?

I have managed to configure it properly and it's switching lighting schemes properly, but it doesn't seem to affect cooling, is there anything I could be doing wrong?

Crashes on run

When application is run all CUE lights deactivate and the application crashes. Light come back as normal once application is terminated completely.

Error log

Unhandled` exception. OpenCueService.CgSdk.SdkError: Sdk Error occurred: InvalidArguments - developer supplied invalid arguments to the function (for specifics look at function descriptions) at OpenCueService.CgSdk.CorsairGameSdk.WithErrorHandling(Boolean returnValue) at OpenCueService.CgSdk.CorsairGameSdk..ctor(String game) at OpenCueService.SdkHandler..ctor(IOptions`1 config) at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at OpenCueService.Program.Main(String[] args)

Replace the term "game" with "profile"

The used SDK from corsair is meant to be used in games and therefore some APIs and documentation refer to the term "game". But this makes not much sense in the context of this Open CUE Service, because it is not used in the context of games and the term profiles also describes the concept in more general and is better suited in this documentation.

Possible to change from Exclusive to Shared?

Love this program and thanks!
Is it possible to change so the SDK section in the iCue Settings shows that the access is Shared and not Exclusive?

Seems like my StreamDeck buttons to change iCue profiles will not work if I have your service running.

Shared access instead of exclusive?

Is it possible to add a parameter to start the service with shared access to the iCUE SDK rather than exclusive access? The service works great, but iCUE reports another app has exclusive SDK access. I imagine having this service running would make other iCUE SDK supported games fail to use the iCUE SDK. This isn't really an issue for me right now, but I might want games to have SDK access if I ever got a Corsair keyboard.

Great work BTW! It feels like they purposely hobbled iCUE to sell more Nexus devices, but I need control over the network anyway. The Windows Game Bar Widget appears to use some undocumented part of the SDK to change profiles that are in the UI.

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.