Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not synchronize when in auto-started #9

Open
HunterZ opened this issue Feb 2, 2020 · 10 comments
Open

Does not synchronize when in auto-started #9

HunterZ opened this issue Feb 2, 2020 · 10 comments

Comments

@HunterZ
Copy link
Owner

HunterZ commented Feb 2, 2020

OK. I found out that you need the razer sdk.

But now a very important question for me: The synchronization takes only place in two ways for me: When starting the program or when I click on "Synchronize manually", but NOT when Unilight is in autostart.

My scenario: Razer Synapse (SDK) starts and a short time later Unilight also starts (to make sure that the necessary DLLs are actually loaded beforehand from synapse).
The RGB control is now not synchronized, but when I click on "Synchronize manually" it is. Is there a workaround here, i.e. start Unilight with a parameter? The strange thing is that Unilight synchronizes when the program is started manually, but not when Unilight is in autostart. I don't want to click "synchronize manually" everytime when i boot my computer.

Originally posted by @Staubgeborener in #6 (comment)

@HunterZ HunterZ mentioned this issue Feb 2, 2020
@HunterZ
Copy link
Owner Author

HunterZ commented Feb 2, 2020

@Staubgeborener what method are you using to auto-start Unilight?

The easiest way that works is to put a shortcut to it in the Startup folder of the Start Menu.

I'm currently doing it via Task Scheduler, with a task that is set to run when I log on. This is set to run only when I am logged on, and to run as my user account. This is necessary to ensure that it has access to the system tray and to user-level RGB APIs.

@Staubgeborener
Copy link

Different approaches:

  1. Task scheduler, same as your settings, unilight is in system tray but i have to click on "synchronize manually"
  2. Put the unilight shortcut into autostart folder but i have to click on "synchronize manually"
  3. Put a small .vbs-Script into autostart folder, whichs runs unilight but i have to click on "synchronize manually", like this one:
Set WSHShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 20000 
WSHShell.Run "F:\unilight\UniLight.exe"

All in all, i can autostart unilight, it's in system tray, but i always have to "synchronize manually". Is there a way to call the programm with a synchronize-parameter?

@HunterZ
Copy link
Owner Author

HunterZ commented Feb 3, 2020 via email

@Staubgeborener
Copy link

So you're changing the Windows accent color but Unilight is not
automatically updating your RGB devices to match?

yes

And this is with version 1.5?

yes

Is this just with Razer devices?

only got razer to test this out

There currently isn't a way to force synchronization other than clicking. I
believe it also tries to synchronize on start, so if that's not working
either then maybe my Razer integration needs a delay somewhere..

Yeah, when i start the program by my own (so no autostart) its working.

@HunterZ
Copy link
Owner Author

HunterZ commented Feb 4, 2020 via email

@Staubgeborener
Copy link

Well, i already checked this. RzrChrm is always marked with a tick. Always. But however, i have to click on synchronize manually to get it working. There is none "non-working-state", the tick is always there. So~ basically, the synchronization takes only place, when i do it by my own. Kinda weird.

@HunterZ
Copy link
Owner Author

HunterZ commented Feb 5, 2020 via email

@Staubgeborener
Copy link

I have some issues with the Corsair CUE DLL while trying to compile your project. I thought about calling GetAndUpdateColor(); inside Main.cpp as one of the first things, when the program starts. Perhaps in L235 - maybe you could give it a try?

@HunterZ
Copy link
Owner Author

HunterZ commented Feb 14, 2020

You can always comment out Corsair CUE support. I really need to refactor the codebase to make vendor API support more pluggable, so that you don't have to build/load the ones you don't care about.

I haven't been working on this project much because I got a bit overwhelmed while trying to implement Steelseries support. They went with a wacky JSON REST API instead of just providing a DLL like everyone else, which comes with a lot of baggage.

@HunterZ
Copy link
Owner Author

HunterZ commented Feb 14, 2020

Re-reading your original comment, I'm wondering if what's going on is that the Razer Chroma SDK lies and says everything is working fine, but it's actually got a broken back-end state because the Razer software hasn't loaded yet.

Manual synchronization does NOT re-init the DLL - it just sends another color change request to the Razer SDK.

If you auto-launch it (into the bad state) and check the details status without first doing a manual synchronization, does it show anything other than SetRZCColor() success?

If not, then I'll have to either try to find a way to detect the bad state (maybe query every possible device model to ensure that at least one is reportedly connected?), or do something silly like forcing a second initial sync following some fixed delay after the initial one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants