Skip to content
gui-uxdoccomPublic

About

Unofficial macOS menu bar app that shows a JBL speaker's battery level and warns you before it runs out

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

App icon: a speaker with a battery badge

Low Note

A tiny macOS menu bar app that shows your JBL speaker's battery level, with a ⚡ while it is charging, and sends you a note when it gets low. Formerly called JBL Battery.

Website: gui-uxdoccom.github.io/low-note, where you can scroll through a day on battery.

The menu bar shows a speaker icon, a little over half filled, next to 60% and a charging bolt. The open menu reads: JBL Go 4: 60%, charging, Last read 5:51 PM, Refresh Now, Forget This Speaker, Quit Low Note.

Why this exists

I keep a JBL speaker connected to my Mac and use it every day, including for meetings. The problem was that I never knew when it was about to run out of battery. macOS shows nothing for it, and the JBL Portable app only exists for phones, so the first sign of a low battery was the speaker going quiet in the middle of a call.

This app puts the battery level in the menu bar and sends a notification at 10%, so there is time to plug it in before that happens.

Notification: JBL Go 4 battery low. 10% remaining. Plug it in to keep listening.

Unofficial. This project is not affiliated with, endorsed by, or supported by JBL or Harman. "JBL" is a trademark of Harman International Industries. The app relies on undocumented behaviour that a firmware update could change.

Supported speakers

Model Status
JBL Go 4 Confirmed (firmware V1.25)
Other JBL Portable app speakers (Charge, Flip, Clip, Xtreme…) Not supported yet. They probably use the same protocol, but each model has to be confirmed on real hardware before it is added. See Adding a speaker model.
JBL headphones and earbuds Not supported. They use a different message format.

Install, step by step

You need a Mac running macOS 12 or later. The whole thing takes about five minutes, most of it waiting for step 1.

There is no ready-made download yet, because distributing a Mac app that opens without security warnings requires a paid Apple Developer account. For now you build the app on your own Mac. You do not need to know how to code; you only paste a few commands.

1. Install Apple's command line tools (one time)

Open the Terminal app (press ⌘ Space, type "Terminal", press Return) and paste:

xcode-select --install

Click Install in the window that appears and wait for it to finish. If it says the tools are already installed, move on.

2. Download the code

git clone https://github.com/gui-uxdoccom/low-note.git
cd low-note

3. Install the app

./install.sh

This one command builds Low Note, puts it in your Applications folder and opens it. After a few seconds it prints Installed and opened /Applications/Low Note.app.

The app has no window and no Dock icon. Look for a small speaker icon in the menu bar, at the top right of your screen.

4. Answer the two permission questions

  • "Low Note" would like to use Bluetooth: choose Allow. The app cannot read the speaker without it.
  • "Low Note" Notifications: this one appears as a banner at the top right of the screen. Move the pointer over it, click Options, then choose Allow if you want the low battery warning. The app works without it. If the banner disappears before you answer, you can turn notifications on later under System Settings > Notifications > Low Note.

macOS dialog: "Low Note" would like to use Bluetooth. Low Note connects to your JBL speaker for about a second at a time to read its battery level. Buttons: Don't Allow, Allow.

macOS banner: "Low Note" Notifications. Notifications may include alerts, sounds, and icon badges. The Options button is open, showing Allow and Don't Allow.

5. Check that it works

Turn your speaker on and keep it near your Mac. Within about 20 seconds the dash next to the speaker icon turns into a percentage, and the icon fills up to match.

6. Start it automatically (optional)

Open System Settings > General > Login Items and add Low Note, so it starts whenever you log in.

Reopening, updating and removing

  • Reopen it after quitting: press ⌘ Space, type "Low Note" and press Return, or open it from the Applications folder like any other app.
  • Update it: download the new code (git pull inside the low-note folder) and run ./install.sh again. Your permissions are kept.
  • Remove it: quit Low Note from its menu and drag it from Applications to the Trash.

If something does not work

What you see What to do
A dash (–) that never becomes a number Check the speaker is on, nearby, and one of the supported speakers. Close the JBL app on your phone, then choose Refresh Now.
! next to the icon Bluetooth access was denied. Turn it on under System Settings > Privacy & Security > Bluetooth.
No low battery banner Notifications may be off (the menu will say so), or a Focus mode is hiding banners. Alerts still land in Notification Center.
The wrong speaker is shown Choose Forget This Speaker, with only your speaker switched on nearby.

To turn the low battery warning on after the first launch, open System Settings > Notifications > Low Note and switch on Allow notifications:

System Settings, Low Note notifications page. The Allow notifications switch is on. Desktop, Notification Center and Lock Screen are ticked, and Alert Style is set to Temporary.

Using it

  • The menu bar shows a speaker icon and the percentage, for example 60% or 60%⚡ while charging. The speaker itself is the gauge: it is an empty outline when the battery is flat and fills up solid as it charges.
  • A dash (–) means the speaker is off, out of range, or has not answered yet.
  • Click the icon for details, Refresh Now, Forget This Speaker and Quit.
  • The app remembers the first supported speaker it finds, so a neighbour's speaker is ignored. Use Forget This Speaker to switch to a different one.
  • Readings refresh every three minutes.
  • When the speaker falls to 10% and is not charging, you get one notification. It will not repeat until the speaker has been charged.
  • Click the notification to open Low Note's menu with a fresh reading.
  • If macOS is blocking the app's notifications, the menu shows Low Battery Alerts Are Off. Open Notification Settings…, which takes you to the place to turn them on.

How it works

For each reading the app:

  1. Listens for the speaker's Bluetooth LE broadcast to find it.
  2. Connects for about a second and sends the same battery request the JBL Portable app uses.
  3. Reads the reply (percentage plus a charging flag) and disconnects.

Things worth knowing:

  • It does not touch your audio. The audio link to your Mac is a separate connection.
  • A second Bluetooth entry may flash in the macOS Bluetooth menu for a moment during a reading. That is the brief data connection, and it goes away by itself.
  • A reading can be missed if another device, such as the JBL app on your phone, is connected to the speaker at that moment. The app keeps the last value and tries again on the next cycle.

Privacy

The app talks only to your speaker over Bluetooth. It has no network access code, collects nothing, and stores one setting on your Mac: the identifier of the speaker it should follow.

Adding a speaker model

Each model identifies itself with a two-byte product ID in its Bluetooth broadcast. Supported IDs are listed in knownProducts in Sources/BatteryProtocol.swift.

To add one:

  1. Find the product ID with a Bluetooth LE scanner app: look for manufacturer data that starts with 57 00 (Harman); the next two bytes are the product ID.
  2. Add it to knownProducts, rebuild, and check that the percentage matches the JBL Portable app on your phone, both on battery and while charging.
  3. Open a pull request, or an issue with the model name, product ID and what you observed.

Development

./test.sh    # unit tests for the protocol parsing
./build.sh   # builds build/Low Note.app

The Bluetooth part itself is not covered by automated tests; it needs a real speaker.

To see the low battery notification without draining a speaker:

open "build/Low Note.app" --args --test-notification

There is no Docker setup, deployment or environment configuration: this is a native macOS app that runs only on the user's Mac and uses no secrets.

The version lives in VERSION and follows semantic versioning. Changes are recorded in CHANGELOG.md.

Credits

The battery request and reply format were documented by the hudsonbrendon/jbl-charge5 project, which mapped the protocol from the JBL Portable app and verified it on a Charge 5.

License

MIT. Anyone may use, copy, change and share this code, including commercially, as long as the copyright notice is kept. It comes with no warranty.

About

Unofficial macOS menu bar app that shows a JBL speaker's battery level and warns you before it runs out

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages