Jump to content

Bluetooth Device Battery


Recommended Posts

I only confirmed that it works with connected Apple devices. Other devices I briefly connected for testing were not found by ioreg or the system profiler, or the battery information was simply not there. If you have a device that you think should show up but doesn't, you can print a log to Alfred's debug window by typing -btb. If you see battery status information that the workflow ignores, feel free to send me those logs. That way I can try to fine-tune the parser.

 

The same goes for specific information about older AirPods and case versions. If you let me know what uniquely identifies them, they can get proper representation.

Link to comment
52 minutes ago, zeitlings said:

 

They come from Apple's SF Symbols. They are available through the macOS System Font (SF Pro), so technically they're not icons or images and can be used in the subtitles for that reason 😁

Dang! I thought I missed an update and Alfred expanded its capabilities! Either way, this helps me with my workflow update!

You've got great workflows btw. Thanks

Link to comment
  • 2 weeks later...
  • 2 weeks later...

I'm trying this out and this is the first time I'm trying to troubleshoot a workflow. Here's what I have from the debug:

 

[13:50:30.728] Logging Started...
[13:50:42.658] Device Battery[Script Filter] Queuing argument '(null)'
[13:50:43.264] Device Battery[Script Filter] Script with argv '(null)' finished
[13:50:43.266] Device Battery[Script Filter] {"items":[{"title":"No Bluetooth devices connected"}],"rerun":4}
[13:50:47.273] Device Battery[Script Filter] Queuing argument '(null)'
[13:50:47.588] Device Battery[Script Filter] Script with argv '(null)' finished
[13:50:47.590] Device Battery[Script Filter] {"items":[{"title":"No Bluetooth devices connected"}],"rerun":4}
[13:50:51.596] Device Battery[Script Filter] Queuing argument '(null)'
[13:50:51.929] Device Battery[Script Filter] Script with argv '(null)' finished
[13:50:51.931] Device Battery[Script Filter] {"items":[{"title":"No Bluetooth devices connected"}],"rerun":4}
[13:50:55.937] Device Battery[Script Filter] Queuing argument '(null)'
[13:50:56.215] Device Battery[Script Filter] Script with argv '(null)' finished
[13:50:56.217] Device Battery[Script Filter] {"items":[{"title":"No Bluetooth devices connected"}],"rerun":4}

 

I currently have my AirPods Pro connected.

Link to comment

Hey @vurte

The debug info you shared shows what happens when you use the keyword "btb". To see device logs you can just prefix the keyword with a minus sign: "-btb".

This will show what information macOS provides through the channels that the workflow uses to find the device's battery information.

 

There is an update available that should accommodate more devices. However, the way AirPods are handled hasn't changed.

If your device is still not showing up, feel free to share the log that you get when typing "-btb".

 

 

v1.1.0

  • Added support for more devices
  • Added headphones icon

 

Link to comment
  • 5 months later...

               Debug Info
------------------------------------------
Alfred:         v5.1.4 (2195)
Device Battery: v1.1.0
==========================================
System Profiler: 
==========================================
Bluetooth:

      Bluetooth Controller:
          Address: 14:98:77:40:A6:3A
          State: On
          Chipset: BCM_4378
          Discoverable: Off
          Firmware Version: 21.1.527.3719
          Product ID: 0x4A00
          Supported services: 0x392039 < HFP AVRCP A2DP HID Braille LEA AACP GATT SerialPort >
          Transport: PCIe
          Vendor ID: 0x004C (Apple)
      Connected:
          Kasti:
              Address: 28:11:A5:75:67:74
              Vendor ID: 0x009E
              Product ID: 0x4020
              Firmware Version: 4.8.1
              Minor Type: Headphones
              Services: 0x800019 < HFP AVRCP A2DP ACL >
      Not Connected:
          Macbook Air:
              Address: DE:AF:A1:A1:4F:27
              RSSI: -35

==========================================
ioreg Device Info:
==========================================

image.png.453d583164c051d939dfad6978307395.png

Link to comment
5 hours ago, vitor said:

Make sure Alfred is added to System Preferences → Privacy & Security → Bluetooth. That seems to now be required in Sonoma.

I have, that was the first thing i thought of. However no luck still my headphones won't show up. I attach you again below the debug console.
I even tried restoring to defaults and  reinstalling the workflow, still no change.

 

==========================================
               Debug Info
------------------------------------------
Alfred:         v5.1.4 (2195)
Device Battery: v1.1.0
==========================================
System Profiler: 
==========================================
Bluetooth:

      Bluetooth Controller:
          Address: 14:98:77:40:A6:3A
          State: On
          Chipset: BCM_4378
          Discoverable: Off
          Firmware Version: 21.1.527.3719
          Product ID: 0x4A00
          Supported services: 0x392039 < HFP AVRCP A2DP HID Braille LEA AACP GATT SerialPort >
          Transport: PCIe
          Vendor ID: 0x004C (Apple)
      Connected:
          Kasti:
              Address: 28:11:A5:75:67:74
              Vendor ID: 0x009E
              Product ID: 0x4020
              Firmware Version: 4.8.1
              Minor Type: Headphones
              Services: 0x802018 < AVRCP A2DP Braille ACL >
      Not Connected:
          Macbook Air:
              Address: DE:AF:A1:A1:4F:27
              RSSI: -36

==========================================
ioreg Device Info:
==========================================

image.png

image.png

Edited by kaeos
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...