razer-taskbar
razer-taskbar copied to clipboard
wrong battery charging state when using Viper + Dock
Heya,
thanks for your awesome project!
I tried using it with my Viper Ultimate. I am using the mouse wirelessly and I have a Mouse Dock Chroma connected to the PC via USB.
Right from the start razer-taskbar found the mouse correctly and showed the correct battery percentage, but wrongly showed "Charging" while it was not.
I dug into the log and found that my "state" is always 1. Most probably due to the Dock Chroma being connected. In the log the only reliable info I could find was not in the _OnBatteryLevelChanged event but rather in the "Battery Get By Device Handle" event. Here the true Charging state of the mouse is shown in "Battery State:".
As I have no knowledge whether using that event to get charging state would break compatibility with current setups I am asking here...
Thanks!
2024-06-05 09:18:05.4375 INFO 1 Battery Get By Device Handle:
Battery Percentage: 25
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:33:05.5424 INFO 1 Battery Get By Device Handle:
Battery Percentage: 25
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:44:29.0177 INFO 107 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
2024-06-05 09:47:41.6286 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:48:01.7592 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:48:02.8867 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:48:02.9902 INFO 16 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:48:03.6456 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:48:04.7929 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:48:04.8570 INFO 16 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:48:07.5544 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
Id: 0 state: True
2024-06-05 09:54:18.8663 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:54:18.9297 INFO 85 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: Charging
Device on Dock State: WiredCharging
Id: 0 state: False
2024-06-05 09:54:19.4694 INFO 84 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:54:19.6270 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: True
2024-06-05 09:54:19.9398 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:54:19.9872 INFO 107 Battery Get By Device Handle:3836875793 is
Battery Percentage: 24
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:54:53.0046 INFO 101 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 25 state 1
2024-06-05 09:56:17.5818 INFO 39 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 26 state 1
2024-06-05 09:57:25.9721 INFO 87 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 27 state 1
Id: 0 state: False
2024-06-05 09:58:34.3340 INFO 86 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:58:34.3807 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: NotCharging
Device on Dock State: WiredCharging
Id: 0 state: True
2024-06-05 09:58:37.9327 INFO 111 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:58:38.0422 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: NotCharging
Device on Dock State: DockCharging
Id: 0 state: False
2024-06-05 09:58:38.5691 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:58:38.6816 INFO 111 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: True
2024-06-05 09:58:39.0565 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:58:39.1358 INFO 86 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: False
2024-06-05 09:58:39.6006 INFO 86 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:58:39.7606 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: True
2024-06-05 09:58:40.1823 INFO 86 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:58:40.2463 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: False
2024-06-05 09:58:40.8372 INFO 110 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:58:40.9018 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: True
2024-06-05 09:58:41.1626 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:58:41.2103 INFO 86 Battery Get By Device Handle:3836875793 is
Battery Percentage: 27
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:58:45.4942 INFO 22 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 28 state 1
Id: 0 state: False
2024-06-05 09:58:51.9937 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 09:58:52.0731 INFO 51 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: NotCharging
Device on Dock State: WiredCharging
Id: 0 state: True
2024-06-05 09:59:08.2682 INFO 51 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 09:59:08.3164 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: False
2024-06-05 10:00:05.3942 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 10:00:05.4424 INFO 111 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: NotCharging
Device on Dock State: WiredCharging
Id: 0 state: True
2024-06-05 10:00:09.4368 INFO 111 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 10:00:09.5153 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: False
2024-06-05 10:00:09.9973 INFO 3 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 10:00:10.1097 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: Charging
Device on Dock State: DockCharging
Id: 0 state: True
2024-06-05 10:00:10.3408 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 10:00:10.4198 INFO 57 Battery Get By Device Handle:3836875793 is
Battery Percentage: 28
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 10:00:14.0271 INFO 96 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 29 state 1
2024-06-05 10:02:21.7687 INFO 58 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 30 state 1
2024-06-05 10:03:07.9521 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 30
Battery State: Charging
Device on Dock State: DockCharging
2024-06-05 10:04:27.6254 INFO 118 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 31 state 1
2024-06-05 10:06:19.2929 INFO 78 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 32 state 1
2024-06-05 10:08:25.0914 INFO 132 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 33 state 1
2024-06-05 10:10:19.7915 INFO 125 _OnBatteryLevelChanged: device Name: Razer Viper Ultimate
Id: 0 level 34 state 1
Id: 0 state: False
2024-06-05 10:11:25.4423 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 34
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 10:11:25.4908 INFO 83 Battery Get By Device Handle:3836875793 is
Battery Percentage: 34
Battery State: NotCharging
Device on Dock State: WiredCharging
2024-06-05 10:18:08.3978 INFO 1 Battery Get By Device Handle:3836875793 is
Battery Percentage: 34
Battery State: NotCharging
Device on Dock State: WiredCharging
full log attached. log.txt
Currently using Synapse: Version 3.9.516.51517