A tray app used to track battery levels of wireless Logitech mouse.
Does not support mice that uses "Unified Battery Reporting" (newer than 2020), I currently do not have access to the hardware and hence will not be able to implement it. If needed I have an alternative program at https://github.com/andyvorld/LGSTrayBattery_GHUB, which requires G HUB running in the background (more specifically lghub_agent.exe
).
Battery percentage and voltage (if supported) in a tray tooltip with notification icon.
Double click for rescan/refresh.
Right-click for more options.
By default the running of the http server is disabled, to enable modify HttpConfig.ini
and change serverEnable = false
to serverEnable = true
. The IP address and port used for bindings are under tcpAddr
and tcpPort
respectively with the defaults being localhost
and 12321
.
tcpAddr
accepts either a hostname (DESKTOP-1234
) or an IP address (127.0.0.1
) to bind to, if you are not sure use localhost
or if you have admin permission 0.0.0.0
to allow for external access to the devices. If an invalid hostname is provided, the server will fall back to binding on 127.0.0.1
.
Send a GET/HTTP request to {tcpAddr}:{tcpPort}/devices
, for the list of devices currently detected by the program and the corresponding deviceID
.
With the deviceID
, a GET/HTTP request to {tcpAddr}:{tcpPort}/device/{deviceID}
, will result in an xml document of the name and battery status of the device. Devices that do not support battery_voltage
will report 0.00.
-
Logitech gaming mouses do not natively have a way of reporting battery level, but rather voltage levels. A voltage to percentage lookup table is available for some mouses from Logitech Gaming Software and are included in
PowerModel
. However newer mice have their files embedded within Logitech G Hub and it is not possible to retrieve them without owning said mice. It is possible to dump an.xml
file withinPowerModel
for support. Refer to this issue in libratbag.-
Without the
.xml
file, the tray will display?
with the tooltip givingNaN%
with a valid voltage. -
Using this automated tool for automated extraction of
.xml
files. (Working as of 24/02/2021)
-
-
Does not support mice that uses HID++ 1.0 protocols. (Older than 2012?)
-
Does not work on mice that uses "Unified Battery Reporting". (Newer than late 2020?)
-
No working refresh/rescan code for connected/disconnect devices. Current work around is to restart the program.Rescan device is done manually within the right-click context menu. -
Currently there are some weird interactions with mouses that can be wired or wireless (e.g. G403) when running in wired mode.
-
For unifying receiver devices, currently the program only polls the first device.
- G403 Wireless
- MX Anywhere 2S
- G604 Lightspeed Wireless
- MX Vertical
- G703 Lightspeed Wireless
This project began as a task with me messing around with my mouse for battery tracking.
- Solaar, for the source code to base the HID++ paramters and reverse engineering of the protocol.
- XB1ControllerBatteryIndicator, for the idea and base of the icons