isu-kim / PyRGBDev

A Python Library for Controlling RGB Devices
MIT License
12 stars 2 forks source link

GUI Demo Not Listing individual Devices And Headset Not Responding When Used Individually #2

Closed KantoKairyu closed 2 years ago

KantoKairyu commented 2 years ago

Firstly, this is amazing and this is only a minor issue, but I notice that when using the GUI demo my actual devices (Razer Huntsmann Elite, Razer Mamba Elite, Razer Kraken Kitty Edition) are not listed among the devices, but rather only 'Razer SDK' is shown. I restarted my PC as per the documentations request but this did not fix it.

Also at the moment I can control my mouse and my keyboard without issue and I can control all my devices at once with no issue by using the 'ALL' key, but the one for 'Headset' does not work

However using

self.sdk_object.set_rgb({"ALL": (self.r, self.g, self.b)}) #Works
self.sdk_object.set_rgb({"Mouse": (self.r, self.g, self.b)}) #Works
self.sdk_object.set_rgb({"Keyboard": (self.r, self.g, self.b)}) #Works
self.sdk_object.set_rgb({"Headset": (self.r, self.g, self.b)}) #Doesn't work
#All Of these devices are recognised as valid device types, but the headset does not respond

chromaguisnap_gui

Overall this is fantastic and these are just minor issues I wanted to report to help development, thanks for making this!

isu-kim commented 2 years ago

Before I start off with this issue, I would like to thank you for your interest in this project.

Devices not popping up

Demo script uses method .get_all_device_information(). And there are several problems with Razer Chroma SDK,

There are lots of problems with Razer Chroma SDK. Among those problems, one of the problem is that there are devices that are NOT registered in Razer Synapse API system. The file RzChromaSDKDefines.h (which can be located here) is provided by Razer official. This header file defines all Razer Device's GUID into device's name system.

Let's see an code snippet inside the header file.

static const GUID DEATHADDER_CHROMA =
           { 0xaec50d91, 0xb1f1, 0x452f, { 0x8e, 0x16, 0x7b, 0x73, 0xf3, 0x76, 0xfd, 0xf3 } };

For example, if the system could find GUID 0xaec50d91, 0xb1f1, 0x452f, { 0x8e, 0x16, 0x7b, 0x73, 0xf3, 0x76, 0xfd, 0xf3, this will be recognized as DEATHADDER_CHROMA.

However the main problem is The Header file is too much outdated an there are lots of devices that are missing. This means that when pyrgbdev was looking for the devices, since the program did not know which device the UUID matches into, it cannot return a valid device name.

For example my Razer Deathadder V2 is also not recognized as well. 😢 I was trying to fix this issue by using external ways of recognizing connected USB devices, however there were too many exceptions and the performance was too slow that I had to remove that feature.

I will try to fix that issues as soon as possible with some other alternative ways. Thank you for letting me know.