Bluetooth battery

UUID: bluetooth-battery@zamszowy
Last edited:
4 months ago 2024-07-20, 22:34
Last commit: [55ca8baa] Add Catalan translations (#6225)

Shows battery levels of different devices

README

Close

Bluetooth (and other) devices battery monitor

This applet monitors (through UPowerGlib) battery levels of mice, keyboards, headphones and other connected devices.
It displays icon and text with battery level information, and for mice, keyboards and headphones, battery icon contains also mouse/keyboard/headphones symbol.
Device with lowest battery is displayed in panel. When clicked, it displays list with all monitored devices.

Settings

You can disable monitoring (it also disables blacklist configuration) of keyboards, mice, headphones or all other devices.
You can also choose to display in applet icon only, text only or icon and text.

Notifications

Notifications are enabled by default and the applet will emit notification when battery level of any of the monitored devices will drop below configured level.
Another notification with "critical" urgency will be emitted when battery level will drop even further below another configured level.

You can also rely on notifications alone and disable applet icon and text entirely, but configure it to show only when battery drops below configured warning/critical level.

Blacklist

You can blacklist any device detected by the applet.
All detected devices are automatically added to blacklist (common devices like mice and keyboards are added just as comments, other are disabled right away).

Bluetooth Headphones

Currently (with bluetoothd v5.64) reporting battery percentage for bluetooth headphones can be enabled by starting bluetoothd with experimental features, but bear in mind that enabling it can cause some issues, like mice not connecting automatically (see https://github.com/bluez/bluez/issues/236 for details).
This could be somehow circumvented by enabling only one experimental UUID, but it's still not guaranteed to be bug free - expect issues!

Icons

Icons are based on Papirus icon theme.

Log In To Comment!

11 Comments

rodseb
rodseb-7 months ago
Works on Linux Mint 21.3 Please note, I had to modify the file /etc/bluetooth/main.conf and adding the following line to the [General] section Experimental = true Then, you just need to restart the bluetooth service using systemctl restart bluetooth Reconnect to your device source : https://askubuntu.com/questions/1117563/check-bluetooth-headphones-battery-status-in-linux
D4rkKaizen
D4rkKaizen-9 months ago
doesn't work on Mint 21.3
SeanyMCP
SeanyMCP-1 year ago
Hi, when I add the applet to the panel, it briefly appears a fraction of a second (as a loading circular arrow) and then nothing is on the panel.
Tomasz
Tomasz-1 year ago
The applet would be hidden, if no bluetooth devices that report battery level are connected. It can show only devices for which cinnamon itself displays battery level (you can check them here: cinnamon-settings power -t batteries)
andre2000
andre2000-1 year ago
Hello again, applet works fine if I first start headphones, than login to linux, next manually connect in blueman-applet. Problem persist if I first login and than start headphones, blueman-applet connects automatically but your applet doesn't "react" on this. Maybe some patch based on this?
Tomasz
Tomasz-1 year ago
When starting headphones after login, do you see that the headphones are displayed in the cinnamon settings? You can check that with this command: cinnamon-settings power -t batteries
andre2000
andre2000-11 months ago
hi, after this command Power Management window is open with Screen Brightness tab and Power tab with Power Options (turn off the screen after... and suspend when inactive for) and Extra Options (when the power button is pressed...) and nothing else.
andre2000
andre2000-1 year ago
Hi Tomasz, System: Kernel: 5.15.0-78-generic x86_64 bits: 64 compiler: gcc v: 11.3.0 Desktop: Cinnamon 5.8.4 tk: GTK 3.24.33 wm: muffin dm: LightDM Distro: Linux Mint 21.2 Victoria base: Ubuntu 22.04 jammy Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-7:5 chip-ID: 8087:0a2a Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2 sub-v: 1000 Devices: WH-CH510 & JBL TUNE510BT Experimental mode - activated. Applet discovered devices because in blacklist added: "# WH-CH510 # JBL TUNE510BT" First time showed 40% but for an hours, nothing was changing. Now there is no info at all. In manually option there is the info "(no device available)" although headphones are working. a.
Mike Kachar
Mike Kachar-1 year ago
I've noticed that bluetooth-battery isn't recognizing the correct battery for my Logitech MX Ergo mouse. I may be wrong, but might have to do with which HID++ it supports/reads from? Output from `upower --dump` shows 2 separate devices w/2 completely different power levels (one @ 100%, the other @ 10%). Bluetooth Battery only shows one bluetooth device, and is (of course) the one @ 100%, which I need to be reading the other. I've installed solaar, which does read the correct battery level, however it doesn't show the battery percentage when I hover over the taskbar icon (not sure yet if it even will throw alerts at some point). Is there a possibility to get this in a [hopefully] near-future update; to monitor the correct battery when it comes to Logitech devices? Maybe something like importing the devices & their power levels from `upower` itself? Thanks!
CSoellinger
CSoellinger-1 year ago
Love your extensions :) One feature request would be that i would like to see all used devices in a row, not only the one with the lowest energy. Or in fact, show it only for different device. For example: If you have connected two bluetooth keyboards and one mouse, it would be nice to see an icon for both. But for the keyboards only show the one with the lowest energy. Hope you understand what i wanna say ;) cheers Chris
Tomasz
Tomasz-1 year ago
Hi, cinnamon applet allows only one icon, so this a feature which unfortunately I won't be able to implement. However, there is a workaround that will achieve what you describe; just make a copy of this applet with changed name (this new name needs to be also reflected in metadata.json file), and configure it to show only the devices you want. For example: cp -r ~/.local/share/cinnamon/applets/bluetooth-battery@zamszowy ~/.local/share/cinnamon/applets/bluetooth-battery@zamszowy2 sed -i 's/bluetooth-battery@zamszowy/bluetooth-battery@zamszowy2/' ~/.local/share/cinnamon/applets/bluetooth-battery@zamszowy2/metadata.json