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

Example bind game event not working? #86

Open
hoangphuc05 opened this issue Jun 4, 2020 · 8 comments
Open

Example bind game event not working? #86

hoangphuc05 opened this issue Jun 4, 2020 · 8 comments

Comments

@hoangphuc05
Copy link

Hi,
I'm trying to follow the example to create a handlers in JSON. The example is to read a value between 0 and 100 and display the gradient color according to the percentage
Here is the code:
{ "game": "ABC", "event": "HEALTH", "min_value": 0, "max_value": 100, "icon_id": 1, "handlers": [ { "device-type": "rgb-1-zone", "zone": "one", "color": {"gradient": {"zero": {"red": 255, "green": 0, "blue": 0}, "hundred": {"red": 0, "green": 255, "blue": 0}}}, "mode": "percent" } ] }

When I check game sense, the app register the event as 0 and 1, with 2 color green and red
image

When the value send to the API with the value of 0, the color is green, when value is 1, color is red, anything above 1 is also red.
Did I make any mistake with the JSON for event handling?

@JHunz
Copy link
Contributor

JHunz commented Jun 4, 2020

To display a normal value-based gradient on a single zone, use the mode value of "color". The mode "percent" is used for per-key devices to light a dynamically calculated number of keys the computed color.

@hoangphuc05
Copy link
Author

Thank you JHunz.
As I change the mode to "color", the handler works as intended, but as soon as I open the gamesense UI, the change revert back to original (what I show in the original picture, with the same original problems). I cannot overwrite the handler anymore, unless I create a new event.
When I try to delete the game through the API and create the new handler with the same name, gamesense crashed.
image
(The game I made is ABC)

@JHunz
Copy link
Contributor

JHunz commented Jun 4, 2020

Uninstalling and reinstalling engine will clear out that data as well, but before doing so, can you please find your frontend error log (should be at C:\ProgramData\SteelSeries\SteelSeries Engine 3\Logs\nw-log.txt) and upload it to this issue? I'll take a look at the crash

@hoangphuc05
Copy link
Author

Here is the log file:
nw-log.txt

@hoangphuc05
Copy link
Author

Some follow up:
I have reinstall the engine, create handler through API work just fine, but as soon as I open the UI for the game in the engine, the engine crash again, after that I got response 500 internal error when trying to set a handler with the same name. The problem goes away when I register a handler with a different name.
The only time when I can see the UI show my handler properly is when the UI for my app already opened. When I create a new handler through the API with the UI still open, I can see my configure. If I exit my app UI and reenter it, it goes back to the original problem.

@JHunz
Copy link
Contributor

JHunz commented Jun 5, 2020

I haven't yet been able to reproduce any of the crashes you are reporting. Can you upload errorlog.txt and golisp-log.txt from the same directory that the previous log was in so I can take a look at the stack traces?

On the other hand, I've found the issue that's causing the incorrect data to display in the UI for your handler. A fix will be released in the next version of Engine (likely next week).

@hoangphuc05
Copy link
Author

This is the error log, the golisp-log is empty:
errorlog.txt

@JHunz
Copy link
Contributor

JHunz commented Jun 11, 2020

We've shipped SteelSeries Engine 3.17.9 this afternoon. It should fix at least some of the issues you're having. Please try updating and let me know if you continue to have any issues.

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