Repository: pwr-Solaar/Solaar

Issue:
New Device ID for Logitech G733 Headset
- Solaar version: solaar 1.1.9
- Distribution: Manjaro 
- Kernel version (ex. `uname -srmo`): Linux 6.4.0-1-MANJARO x86_64 GNU/Linux
- Output of `solaar show` for the target device (if applicable):

<details>

```
solaar version 1.1.9

Lightspeed Receiver
  Device path  : /dev/hidraw4
  USB id       : 046d:C547
  Serial       : FFC581A8
    Firmware   : 04.02.B0009
    Bootloader : 02.09
    Other      : 47.63
  Has 1 paired device(s) out of a maximum of 2.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 1=37

  1: G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
     Device path  : None
     WPID         : 407C
     Codename     : G915 KEYBOARD
     Kind         : keyboard
     Protocol     : HID++ 4.2
     Polling rate : 1 ms (1000Hz)
     Serial number: 25E14C24
     Model ID:      B354407CC33E
     Unit ID:       25E14C24
        Bootloader: BOT 77.03.B0041
             Other: 
          Firmware: MPK 09.03.B0041
             Other: 
             Other: 
     The power switch is located on the top left corner.
     Supports 38 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V4     
            Firmware: Bootloader BOT 77.03.B0041 00003791543D
            Firmware: Other   
            Firmware: Firmware MPK 09.03.B0041 407C3791543D
            Firmware: Other   
            Firmware: Other   
            Unit ID: 25E14C24  Model ID: B354407CC33E  Transport IDs: {'btleid': 'B354', 'wpid': '407C', 'usbid': 'C33E'}
         3: DEVICE NAME            {0005} V0     
            Name: G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: DEVICE FRIENDLY NAME   {0007} V0     
            Friendly Name: G915 KEYBOARD
         7: BATTERY VOLTAGE        {1001} V3     
            Battery: 70% 3939mV , discharging.
         8: CHANGE HOST            {1814} V1     
            Change Host        : 1:dan-desktop
         9: HOSTS INFO             {1815} V1     
            Host 0 (paired): dan-desktop
            Host 1 (unpaired): 
        10: RGB EFFECTS            {8071} V0     
        11: PER KEY LIGHTING V2    {8081} V2     
        12: REPROG CONTROLS V4     {1B04} V4     
            Key/Button Diversion (saved): {Host Switch Channel 1:Regular, Host Switch Channel 2:Regular}
            Key/Button Diversion        : {Host Switch Channel 1:Regular, Host Switch Channel 2:Regular}
        13: REPORT HID USAGE       {1BC0} V1     
        14: ENCRYPTION             {4100} V0     
        15: KEYBOARD DISABLE BY USAGE {4522} V0     
        16: KEYBOARD LAYOUT 2      {4540} V0     
        17: GKEY                   {8010} V0     
            Divert G Keys (saved): False
            Divert G Keys        : False
        18: MKEYS                  {8020} V0     
            M-Key LEDs (saved): {M1:False, M2:False, M3:False}
            M-Key LEDs        : {M1:False, M2:False, M3:False}
        19: MR                     {8030} V0     
            MR-Key LED (saved): False
            MR-Key LED        : False
        20: BRIGHTNESS CONTROL     {8040} V0     
        21: ONBOARD PROFILES       {8100} V0     
            Device Mode: On-Board
            Onboard Profiles (saved): Enable
            Onboard Profiles        : Enable
        22: REPORT RATE            {8060} V0     
            Polling Rate (ms): 1
            Polling Rate (ms) (saved): 1
            Polling Rate (ms)        : 1
        23: DFUCONTROL SIGNED      {00C2} V0     
        24: DFU                    {00D0} V3     
        25: DEVICE RESET           {1802} V0    internal, hidden 
        26: unknown:1803           {1803} V0    internal, hidden 
        27: CONFIG DEVICE PROPS    {1806} V8    internal, hidden 
        28: unknown:1813           {1813} V0    internal, hidden 
        29: OOBSTATE               {1805} V0    internal, hidden 
        30: unknown:1830           {1830} V0    internal, hidden 
        31: unknown:1890           {1890} V5    internal, hidden 
        32: unknown:1891           {1891} V5    internal, hidden 
        33: unknown:18A1           {18A1} V0    internal, hidden 
        34: unknown:1E00           {1E00} V0    hidden 
        35: unknown:1EB0           {1EB0} V0    internal, hidden 
        36: unknown:1861           {1861} V0    internal, hidden 
        37: unknown:18B0           {18B0} V0    internal, hidden 
     Has 2 reprogrammable keys:
         0: Host Switch Channel 1     , default: HostSwitch Channel 1        => HostSwitch Channel 1      
             divertable, persistently divertable, pos:1, group:0, group mask:empty
             reporting: default
         1: Host Switch Channel 2     , default: HostSwitch Channel 2        => HostSwitch Channel 2      
             divertable, persistently divertable, pos:2, group:0, group mask:empty
             reporting: default
     Battery: 70% 3939mV , discharging.

Lightspeed Receiver
  Device path  : /dev/hidraw7
  USB id       : 046d:C53A
  Serial       : 95C3944A
    Firmware   : 40.03.B0014
    Bootloader : 02.09
    Other      : AA.CA
  Has 2 paired device(s) out of a maximum of 1.
  Notifications: wireless, software present (0x000900)
  Device activity counters: (empty)

  1: G502 Gaming Mouse
     Device path  : /dev/hidraw8
     WPID         : 407F
     Codename     : G502
     Kind         : mouse
     Protocol     : HID++ 4.2
     Polling rate : 1 ms (1000Hz)
     Serial number: 70525D9B
     Model ID:      407FC08D0000
     Unit ID:       70525D9B
        Bootloader: BOT 92.00.B0008
          Firmware: MPM 17.00.B0008
             Other: 
     The power switch is located on the base.
     Supports 30 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BOT 92.00.B0008 AAEF21F1FA5F
            Firmware: Firmware MPM 17.00.B0008 407F21F1FA5F
            Firmware: Other   
            Unit ID: 70525D9B  Model ID: 407FC08D0000  Transport IDs: {'wpid': '407F', 'usbid': 'C08D'}
         3: DEVICE NAME            {0005} V0     
            Name: G502 LIGHTSPEED Wireless Gaming Mouse
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY VOLTAGE        {1001} V2     
            Battery: 80% 4046mV , discharging.
         7: COLOR LED EFFECTS      {8070} V4     
         8: LED CONTROL            {1300} V0     
         9: ONBOARD PROFILES       {8100} V0     
            Device Mode: On-Board
            Onboard Profiles (saved): Enable
            Onboard Profiles        : Enable
        10: MOUSE BUTTON SPY       {8110} V0     
        11: REPORT RATE            {8060} V0     
            Polling Rate (ms): 1
            Polling Rate (ms) (saved): 1
            Polling Rate (ms)        : 1
        12: ADJUSTABLE DPI         {2201} V1     
            Sensitivity (DPI) (saved): 3200
            Sensitivity (DPI)        : 3200
        13: DEVICE RESET           {1802} V0    internal, hidden 
        14: unknown:1803           {1803} V0    internal, hidden 
        15: OOBSTATE               {1805} V0    internal, hidden 
        16: CONFIG DEVICE PROPS    {1806} V4    internal, hidden 
        17: unknown:1811           {1811} V0    internal, hidden 
        18: unknown:1830           {1830} V0    internal, hidden 
        19: unknown:1890           {1890} V4    internal, hidden 
        20: unknown:1891           {1891} V4    internal, hidden 
        21: unknown:18A1           {18A1} V0    internal, hidden 
        22: unknown:1801           {1801} V0    internal, hidden 
        23: unknown:18B1           {18B1} V0    internal, hidden 
        24: unknown:1DF3           {1DF3} V0    internal, hidden 
        25: unknown:1E00           {1E00} V0    hidden 
        26: unknown:1EB0           {1EB0} V0    internal, hidden 
        27: unknown:1863           {1863} V0    internal, hidden 
        28: unknown:1E22           {1E22} V0    internal, hidden 
        29: HIRES WHEEL            {2121} V0     
            Multiplier: 8
            Has invert: Normal wheel motion
            Has ratchet switch: Normal wheel mode
            High resolution mode
            HID notification
            Scroll Wheel Direction (saved): False
            Scroll Wheel Direction        : False
            Scroll Wheel Resolution (saved): True
            Scroll Wheel Resolution        : True
            Scroll Wheel Diversion (saved): False
            Scroll Wheel Diversion        : False
     Battery: 80% 4046mV , discharging.

  7: Candy companion chip
     Device path  : /dev/hidraw9
     Codename     : Candy
     Kind         : touchpad
     Protocol     : HID++ 4.2
     Serial number: 95C3944A
     Model ID:      405F00000000
     Unit ID:       32314718
          Firmware: CC  07.00.B0010
        Bootloader: BOT 32.00.B0010
     Supports 12 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Firmware CC  07.00.B0010 405F
            Firmware: Bootloader BOT 32.00.B0010 405F
            Unit ID: 32314718  Model ID: 405F00000000  Transport IDs: {'wpid': '405F'}
         3: DEVICE NAME            {0005} V0     
            Name: Candy companion chip
            Kind: touchpad
         4: unknown:18A1           {18A1} V0    internal, hidden 
         5: unknown:1E00           {1E00} V0    hidden 
         6: unknown:1EB0           {1EB0} V0    internal, hidden 
         7: DFUCONTROL SIGNED      {00C2} V0     
         8: unknown:1801           {1801} V0    internal, hidden 
         9: DEVICE RESET           {1802} V0    internal, hidden 
        10: unknown:1803           {1803} V0    internal, hidden 
        11: COLOR LED EFFECTS      {8070} V4     
     Battery status unavailable.
```
</details>

**Is your feature request related to a problem? Please describe.**
It looks like Logitech have an additional device ID for the G733 headset. 

**Describe the solution you'd like**
Add the new device ID to descriptors.py as per a similar issue with Headsetcontrol, new device ID (from lsusb:
Bus 003 Device 028: ID 046d:0afe Logitech, Inc. G733 Gaming Headset



Discussion:
I've changed my local descriptors file but it complains about duplicate "code names", so I am now sure how best to handle this, for now I just stuck a "2" on the end of the codename:

![image](https://github.com/pwr-Solaar/Solaar/assets/84709493/8fddf6e6-0942-4612-ab39-74f87f1a7695)

I would create a pull request but I have very little experience with git and don't want to break something 
Please post output of `solaar show` showing the headset.

Logitech has changed the USB id of devices before.  Sometimes this is due to firmware changes.
I'm not 100% sure that the battery feedback is working as expected, but everything else seems to.

Here is the output from show:

solaar version 1.1.9
<details>

```
Lightspeed Receiver
  Device path  : /dev/hidraw5
  USB id       : 046d:C547
  Serial       : FFC581A8
    Firmware   : 04.02.B0009
    Bootloader : 02.09
    Other      : 47.63
  Has 1 paired device(s) out of a maximum of 2.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 1=28

  1: G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
     Device path  : None
     WPID         : 407C
     Codename     : G915 KEYBOARD
     Kind         : keyboard
     Protocol     : HID++ 4.2
     Polling rate : 1 ms (1000Hz)
     Serial number: 25E14C24
     Model ID:      B354407CC33E
     Unit ID:       25E14C24
        Bootloader: BOT 77.03.B0041
             Other: 
          Firmware: MPK 09.03.B0041
             Other: 
             Other: 
     The power switch is located on the top left corner.
     Supports 38 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V4     
            Firmware: Bootloader BOT 77.03.B0041 00003791543D
            Firmware: Other   
            Firmware: Firmware MPK 09.03.B0041 407C3791543D
            Firmware: Other   
            Firmware: Other   
            Unit ID: 25E14C24  Model ID: B354407CC33E  Transport IDs: {'btleid': 'B354', 'wpid': '407C', 'usbid': 'C33E'}
         3: DEVICE NAME            {0005} V0     
            Name: G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: DEVICE FRIENDLY NAME   {0007} V0     
            Friendly Name: G915 KEYBOARD
         7: BATTERY VOLTAGE        {1001} V3     
            Battery: 60% 3862mV , discharging.
         8: CHANGE HOST            {1814} V1     
            Change Host        : 1:dan-desktop
         9: HOSTS INFO             {1815} V1     
            Host 0 (paired): dan-desktop
            Host 1 (unpaired): 
        10: RGB EFFECTS            {8071} V0     
        11: PER KEY LIGHTING V2    {8081} V2     
        12: REPROG CONTROLS V4     {1B04} V4     
            Key/Button Diversion (saved): {Host Switch Channel 1:Regular, Host Switch Channel 2:Regular}
            Key/Button Diversion        : {Host Switch Channel 1:Regular, Host Switch Channel 2:Regular}
        13: REPORT HID USAGE       {1BC0} V1     
        14: ENCRYPTION             {4100} V0     
        15: KEYBOARD DISABLE BY USAGE {4522} V0     
        16: KEYBOARD LAYOUT 2      {4540} V0     
        17: GKEY                   {8010} V0     
            Divert G Keys (saved): False
            Divert G Keys        : False
        18: MKEYS                  {8020} V0     
            M-Key LEDs (saved): {M1:False, M2:False, M3:False}
            M-Key LEDs        : {M1:False, M2:False, M3:False}
        19: MR                     {8030} V0     
            MR-Key LED (saved): False
            MR-Key LED        : False
        20: BRIGHTNESS CONTROL     {8040} V0     
        21: ONBOARD PROFILES       {8100} V0     
            Device Mode: On-Board
            Onboard Profiles (saved): Enable
            Onboard Profiles        : Enable
        22: REPORT RATE            {8060} V0     
            Polling Rate (ms): 1
            Polling Rate (ms) (saved): 1
            Polling Rate (ms)        : 1
        23: DFUCONTROL SIGNED      {00C2} V0     
        24: DFU                    {00D0} V3     
        25: DEVICE RESET           {1802} V0    internal, hidden 
        26: unknown:1803           {1803} V0    internal, hidden 
        27: CONFIG DEVICE PROPS    {1806} V8    internal, hidden 
        28: unknown:1813           {1813} V0    internal, hidden 
        29: OOBSTATE               {1805} V0    internal, hidden 
        30: unknown:1830           {1830} V0    internal, hidden 
        31: unknown:1890           {1890} V5    internal, hidden 
        32: unknown:1891           {1891} V5    internal, hidden 
        33: unknown:18A1           {18A1} V0    internal, hidden 
        34: unknown:1E00           {1E00} V0    hidden 
        35: unknown:1EB0           {1EB0} V0    internal, hidden 
        36: unknown:1861           {1861} V0    internal, hidden 
        37: unknown:18B0           {18B0} V0    internal, hidden 
     Has 2 reprogrammable keys:
         0: Host Switch Channel 1     , default: HostSwitch Channel 1        => HostSwitch Channel 1      
             divertable, persistently divertable, pos:1, group:0, group mask:empty
             reporting: default
         1: Host Switch Channel 2     , default: HostSwitch Channel 2        => HostSwitch Channel 2      
             divertable, persistently divertable, pos:2, group:0, group mask:empty
             reporting: default
     Battery: 60% 3862mV , discharging.

USB and Bluetooth Devices

  1: G733 Gaming Headset
     Device path  : /dev/hidraw19
     USB id       : 046d:0AFE
     Codename     : G733 Headset2
     Kind         : headset
     Protocol     : HID++ 4.2
     Serial number: 
     Model ID:      0AFE00000000
     Unit ID:       FFFFFFFF
          Firmware: U2  00.06
     Supports 9 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Firmware U2  00.06 0AFE
            Unit ID: FFFFFFFF  Model ID: 0AFE00000000  Transport IDs: {'usbid': '0AFE'}
         3: DEVICE NAME            {0005} V0     
            Name: G733 Gaming Headset
            Kind: None
         4: COLOR LED EFFECTS      {8070} V0     
         5: GKEY                   {8010} V0     
            Divert G Keys (saved): False
            Divert G Keys        : False
         6: EQUALIZER              {8310} V1     
            Equalizer (saved): {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0}
            Equalizer        : {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0}
         7: SIDETONE               {8300} V0     
            Sidetone (saved): 100
            Sidetone        : 100
         8: ADC MEASUREMENT        {1F20} V4     
            Battery: 60% 3898mV , recharging.
            Power Management (saved): 15
            Power Management        : 15
     Battery: 60% 3898mV , recharging.
Lightspeed Receiver
  Device path  : /dev/hidraw10
  USB id       : 046d:C53A
  Serial       : 95C3944A
    Firmware   : 40.03.B0014
    Bootloader : 02.09
    Other      : AA.CA
  Has 2 paired device(s) out of a maximum of 1.
  Notifications: wireless, software present (0x000900)
  Device activity counters: (empty)

  1: G502 Gaming Mouse
     Device path  : /dev/hidraw11
     WPID         : 407F
     Codename     : G502
     Kind         : mouse
     Protocol     : HID++ 4.2
     Polling rate : 1 ms (1000Hz)
     Serial number: 70525D9B
     Model ID:      407FC08D0000
     Unit ID:       70525D9B
        Bootloader: BOT 92.00.B0008
          Firmware: MPM 17.00.B0008
             Other: 
     The power switch is located on the base.
     Supports 30 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BOT 92.00.B0008 AAEF21F1FA5F
            Firmware: Firmware MPM 17.00.B0008 407F21F1FA5F
            Firmware: Other   
            Unit ID: 70525D9B  Model ID: 407FC08D0000  Transport IDs: {'wpid': '407F', 'usbid': 'C08D'}
         3: DEVICE NAME            {0005} V0     
            Name: G502 LIGHTSPEED Wireless Gaming Mouse
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY VOLTAGE        {1001} V2     
            Battery: 80% 4065mV , discharging.
         7: COLOR LED EFFECTS      {8070} V4     
         8: LED CONTROL            {1300} V0     
         9: ONBOARD PROFILES       {8100} V0     
            Device Mode: On-Board
            Onboard Profiles (saved): Enable
            Onboard Profiles        : Enable
        10: MOUSE BUTTON SPY       {8110} V0     
        11: REPORT RATE            {8060} V0     
            Polling Rate (ms): 1
            Polling Rate (ms) (saved): 1
            Polling Rate (ms)        : 1
        12: ADJUSTABLE DPI         {2201} V1     
            Sensitivity (DPI) (saved): 3200
            Sensitivity (DPI)        : 3200
        13: DEVICE RESET           {1802} V0    internal, hidden 
        14: unknown:1803           {1803} V0    internal, hidden 
        15: OOBSTATE               {1805} V0    internal, hidden 
        16: CONFIG DEVICE PROPS    {1806} V4    internal, hidden 
        17: unknown:1811           {1811} V0    internal, hidden 
        18: unknown:1830           {1830} V0    internal, hidden 
        19: unknown:1890           {1890} V4    internal, hidden 
        20: unknown:1891           {1891} V4    internal, hidden 
        21: unknown:18A1           {18A1} V0    internal, hidden 
        22: unknown:1801           {1801} V0    internal, hidden 
        23: unknown:18B1           {18B1} V0    internal, hidden 
        24: unknown:1DF3           {1DF3} V0    internal, hidden 
        25: unknown:1E00           {1E00} V0    hidden 
        26: unknown:1EB0           {1EB0} V0    internal, hidden 
        27: unknown:1863           {1863} V0    internal, hidden 
        28: unknown:1E22           {1E22} V0    internal, hidden 
        29: HIRES WHEEL            {2121} V0     
            Multiplier: 8
            Has invert: Normal wheel motion
            Has ratchet switch: Normal wheel mode
            High resolution mode
            HID notification
            Scroll Wheel Direction (saved): False
            Scroll Wheel Direction        : False
            Scroll Wheel Resolution (saved): True
            Scroll Wheel Resolution        : True
            Scroll Wheel Diversion (saved): False
            Scroll Wheel Diversion        : False
     Battery: 80% 4065mV , discharging.

  7: Candy companion chip
     Device path  : /dev/hidraw13
     Codename     : Candy
     Kind         : touchpad
     Protocol     : HID++ 4.2
     Serial number: 95C3944A
     Model ID:      405F00000000
     Unit ID:       32314718
          Firmware: CC  07.00.B0010
        Bootloader: BOT 32.00.B0010
     Supports 12 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Firmware CC  07.00.B0010 405F
            Firmware: Bootloader BOT 32.00.B0010 405F
            Unit ID: 32314718  Model ID: 405F00000000  Transport IDs: {'wpid': '405F'}
         3: DEVICE NAME            {0005} V0     
            Name: Candy companion chip
            Kind: touchpad
         4: unknown:18A1           {18A1} V0    internal, hidden 
         5: unknown:1E00           {1E00} V0    hidden 
         6: unknown:1EB0           {1EB0} V0    internal, hidden 
         7: DFUCONTROL SIGNED      {00C2} V0     
         8: unknown:1801           {1801} V0    internal, hidden 
         9: DEVICE RESET           {1802} V0    internal, hidden 
        10: unknown:1803           {1803} V0    internal, hidden 
        11: COLOR LED EFFECTS      {8070} V4     
     Battery status unavailable.
```
</details>

Resolving patch:
diff --git a/lib/logitech_receiver/descriptors.py b/lib/logitech_receiver/descriptors.py
--- a/lib/logitech_receiver/descriptors.py
+++ b/lib/logitech_receiver/descriptors.py
@@ -321,4 +321,5 @@ class _PerformanceMXDpi(_ST.RegisterDpi):
 _D('G535 Gaming Headset', codename='G535 Headset', protocol=2.0, interface=3, kind=_DK.headset, usbid=0x0ac4)
 _D('G935 Gaming Headset', codename='G935 Headset', protocol=2.0, interface=3, kind=_DK.headset, usbid=0x0a87)
 _D('G733 Gaming Headset', codename='G733 Headset', protocol=2.0, interface=3, kind=_DK.headset, usbid=0x0ab5)
+_D('G733 Gaming Headset', codename='G733 Headset New', protocol=2.0, interface=3, kind=_DK.headset, usbid=0x0afe)
 _D('PRO X Wireless Gaming Headset', codename='PRO Headset', protocol=2.0, interface=3, kind=_DK.headset, usbid=0x0aba)


Test patch: