r/coolgithubprojects • • 11d ago

[Rust] BatteryHub – monitor wireless device battery levels directly on the Windows taskbar

https://github.com/ferloom/Wireless-Device-Battery-Monitor

I wanted a simple way to see the battery levels of my wireless peripherals without having to open Logitech G HUB, SteelSeries GG or other manufacturer software.

So I made BatteryHub, a Windows taskbar application written in Rust.

It displays the battery percentages of your wireless mouse, headset, keyboard and controller right next to the Windows clock.

Some supported devices and brands:

  • Logitech (LIGHTSPEED, Bolt, Unifying, Bluetooth)
  • SteelSeries (Arctis, Arctis Nova, Aerox, Rival)
  • Razer mice and keyboards
  • Sony DualSense, DualSense Edge and DualShock 4
  • Apple AirPods and Beats
  • Xbox controllers
  • Generic Bluetooth and HID devices

I also focused on keeping it lightweight.

I benchmarked the Rust version against the original C++ implementation on the same PC:

MetricRustC++
Executable size368 KB1,958 KB
Idle RAM2.4 MB29.4 MB
Peak RAM17.8 MB29.8 MB
CPU time/min~0.02 s~0.64 s

A few things worth mentioning:

  • Automatic battery refresh
  • Optional Windows startup
  • Install, update and uninstall functionality
  • No administrator privileges required

Transparency: This is my Rust rewrite/fork of the original C++ BatteryHub by krisgfx9. The original project deserves credit for the concept, taskbar design and device protocols. My version currently supports fewer devices than the original.

I developed it with help from Claude AI.

GitHub: https://github.com/ferloom/Wireless-Device-Battery-Monitor

I'd love to hear what you think! Especially if you have a wireless peripheral that you could test it with.

7 Upvotes

26 comments sorted by

1

u/brklynbanana 10d ago

I recently had Claude set me up with a python script for my roccat headset. I'd rather use this. I've sent a PR to have my Roccat Syn Max Air included in working models

1

u/NoPiccolo736 10d ago

Thanks, and thanks for the PR! It's merged and already out in v1.2: https://github.com/ferloom/Wireless-Device-Battery-Monitor/releases/tag/v1.2

If you already have BatteryHub installed, right-click the widget → Check for updates..., or run the new setup and pick [2] Update. Just make sure ROCCAT Swarm isn't running at the same time, since it holds the receiver.

Let me know how it works with your Syn Max Air (battery level, charging on the dock, switching it off and on). If anything's off, drop a comment on the PR or open an issue. Your voltage curve came from one headset, so feedback from real use helps a lot.

1

u/loaferzz 10d ago

Gonna give this a try.

Kris's version messes up my ICUE coolant temp sensor.

Would it be possible to add the option to move it around on the taskbar? Prefer to have this monitor showing on the taskbar of my 2nd monitor instead of the main.

1

u/NoPiccolo736 10d ago

Done, it's in v1.2.1: https://github.com/ferloom/Wireless-Device-Battery-Monitor/releases/tag/v1.2.1

Right-click the widget and you'll find:

  • Show widget on → Display 2 only (or whichever monitor you want). It remembers that monitor, and if it's unplugged the widget goes back to the main taskbar until it's connected again.
  • Position on the taskbar → move it 40–200 px away from the clock, so it doesn't sit on top of your iCUE coolant temp sensor.
  • Background behind taskbar text, in case you use a transparent taskbar.

Since you haven't installed it yet, grab BatteryHub-Taskbar-Setup-v1.2.1.exe from the link and choose [1] Install. Later updates are one click via Check for updates... in the same menu.

If iCUE still clashes with it, let me know what you see and I'll take a look.

1

u/loaferzz 10d ago

1.2.1 seems to be playing nice with icue so far. Coolant temp is updating, and I can control fan curve within icue as well. Will update if this ever changes.

I do not however see the option for "Show widget on".

"Position on taskbar" and "Background behind taskbar text" options are present, just not the option to move it between monitor taskbars.

1

u/NoPiccolo736 10d ago

Good news on iCUE, thanks for checking!

"Show widget on" only shows up when Windows has a taskbar on your second monitor, because the widget attaches to that monitor's taskbar. Could you check Settings → Personalization → Taskbar → Taskbar behaviors → "Show my taskbar on all displays"? Once that's on, right-click the widget again and you should see "Show widget on" → "Display 2 (…) only".

If that's already on and you can see a taskbar on your 2nd monitor but the option still doesn't appear, tell me:

  • Windows 10 or 11 (and the build, e.g. 24H2)
  • whether that taskbar comes from Windows itself or from something like DisplayFusion, ExplorerPatcher or Start11

and I'll get it working.

1

u/loaferzz 10d ago

Ah no wonder. The taskbar on my 2nd monitor comes from DisplayFusion, that's why that option isn't showing up. I'm on Windows 11 (26H2).

1

u/NoPiccolo736 10d ago

Thanks, that explains it. I looked into DisplayFusion support, but DisplayFusion keeps its taskbar in a protected window layer that other apps can't draw inside or on top of, so the widget can't go there. With DisplayFusion running it can even block the widget on the main taskbar. If you want the widget on your 2nd monitor, turn on Windows' own "Show my taskbar on all displays" (Settings → Personalization → Taskbar → Taskbar behaviors), then right-click the widget → Show widget on → Display 2 only.

1

u/loaferzz 10d ago

That's really quick, appreciate it.

I haven't installed 1.2.1 but I did install the version before this. Still clashes with my icue. It stops my coolant temp from updating and i can't change fan curves too.

I'll give 1.2.1 a try in a bit and report back but I doubt anything would be different.

1

u/Hideocaina 10d ago

I had this installed for days, but you weren't the creator—it was under a different name—and I see that their GitHub has disappeared. What happened?

1

u/NoPiccolo736 10d ago

This is actually a complete recode of the original project, rewritten from scratch in Rust instead of C++. I'm a different developer, and I'm not affiliated with the original creator.

1

u/NoPiccolo736 9d ago

The original author's GitHub account (krisgfx9) was suspended by GitHub on Nov 22, which took the original repo down with it. According to the author, no reason was given; they've appealed, so it may come back in a few days. Meanwhile they're sharing downloads on the project's Discord.

My version is a separate Rust recode, not the original, and it's still available and actively updated: https://github.com/ferloom/Wireless-Device-Battery-Monitor

1

u/ThePizza47 8d ago

this is great. how do i add/request my fantech raigor III mouse?

1

u/NoPiccolo736 8d ago

Thanks! Fantech isn't supported yet, but you can request it right from the app:

  1. Plug in the Raigor III's 2.4 GHz receiver (or the cable). The mouse should be switched on.
  2. Right-click the BatteryHub taskbar icon and choose Request support for a device...
  3. Pick the Raigor III from the list (vendor-specific devices are near the top), check the name and type, and add a note if you like (e.g. "2.4 GHz receiver, battery shows in Fantech's software").
  4. Click Send. A new GitHub issue opens in your browser, already filled in with the device IDs. Just submit it (you need a GitHub account).

Nothing is sent from the app itself; you submit the issue yourself. If you know of a project or app that already reads the Raigor III's battery, mention it in the issue. A driver needs a documented protocol, so that speeds things up a lot.

Repo: https://github.com/ferloom/Wireless-Device-Battery-Monitor

1

u/ThePizza47 8d ago

Thank you

1

u/ez0ze 7d ago

Hi liking it so far can I know do you plan to add in the option to make the logo glow too? The original one had that option eg razer green Logitech blue etc. hopefully it can be customized too

1

u/NoPiccolo736 6d ago

Hey! Glad you're enjoying BatteryHub! :)

BatteryHub already supports changing the logo color, but it doesn't currently have a glow effect. If this is something you'd really like to see, feel free to open a feature request on the GitHub repository! I'll definitely consider it.

Thanks for the suggestion!

1

u/prateekularly_fine 7d ago

thank you brother original source one i don't know why but he made it private i was searching for it since yesterday finally i got yours loved it

2

u/NoPiccolo736 6d ago

You're very welcome, brother! ❤️ Really glad you found BatteryHub and that you're enjoying it. I'm actively working on improving it, so there's a lot more to come. Thanks for the support, it genuinely means a lot!

1

u/prateekularly_fine 6d ago

sure and one more thing kudos using rust it's really fast, so fast that sometimes it feels like it's windows native feature what shiped with windows

2

u/NoPiccolo736 6d ago

Haha, that's honestly one of the best compliments I could get! 😂 Rust was a deliberate choice because performance and low resource usage are really important to me. I want BatteryHub to feel like a native part of Windows, not just another background app. Really appreciate it, brother!

1

u/Born-Bodybuilder7156 6d ago

Does it work with logitech G321 headset? Is it safe? :)

1

u/NoPiccolo736 6d ago

Hey! Yes! The Logitech G321 LIGHTSPEED is already supported by BatteryHub when connected through its 2.4 GHz USB receiver. :)

As for safety, BatteryHub only reads device battery information and doesn't modify your headset's firmware. You can also check out the source code yourself on GitHub.

Thanks for asking!

1

u/Born-Bodybuilder7156 6d ago

Thank you very much! Already installed it and it looks great! Ghub doesn't support my G321 and couldn't see battery level on pc.

1

u/Strong_Parfait_4978 6d ago

Yes, everything is great! Ty