Jump to content

Recommended Posts

  • 2 weeks later...
2 hours ago, godbout said:

might be the list of bluetooth devices connected then

 

This hint was good. It turns out that apb was somehow clashing with my third party Bluetooth mouse. After disconnecting the mouse, apb now correctly reads my AirPods battery levels, even after re-connecting my mouse. Not sure where the bug is though, as it's clearly looking for "Minor Type: Headphones" in the script.

Link to comment
34 minutes ago, SJ2K said:

 

This hint was good. It turns out that apb was somehow clashing with my third party Bluetooth mouse. After disconnecting the mouse, apb now correctly reads my AirPods battery levels, even after re-connecting my mouse. Not sure where the bug is though, as it's clearly looking for "Minor Type: Headphones" in the script.

 

well. probably if you restart your computer, you'll end up with the same issue. care to try? 😂

 

actually i've forked this from another workflow that wouldn't work for me. thought it was an AirPods Pro issue as the other workflow was for the normal AirPods. seems not. also my workflow work for both my iMac that has keyboard and trackpad connected, and my MacBook that has nothing... so, gonna have to investigate.

 

thanks for the report!

Link to comment

i had to dig into bash, unix, a couple of unix tools, and two books about scripting 😂

 

but there's a new version. i understand the code better now, cleaned it, and added the Case battery level if available: https://github.com/godbout/alfred-airpodspro-battery

 

have a look and let me know if you guys still have any issue with wrong data being printed out. thanks!

Link to comment
  • 3 months later...

Thanks for your hard work on this @godbout! I can't raise an issue on the Github repo but I'm having issues with the apb command. I've connected my AirPods Pro correctly but the workflow can't seem to pick up my battery when connected. I don't have any other Bluetooth connections and have already done a restart. Do you have any ideas what might fix this issue? 

 

apb.thumb.png.6a6f479aedc46051925be1a6a93a3899.png

Link to comment
On 9/14/2020 at 5:29 AM, 3raxton said:

Thanks for your hard work on this @godbout! I can't raise an issue on the Github repo but I'm having issues with the apb command. I've connected my AirPods Pro correctly but the workflow can't seem to pick up my battery when connected. I don't have any other Bluetooth connections and have already done a restart. Do you have any ideas what might fix this issue? 

 

apb.thumb.png.6a6f479aedc46051925be1a6a93a3899.png

 

can you run the following in your Terminal: 

 

grep -iA6 '"'"$(grep -B2 "Minor Type: Headphones" <<< $(system_profiler SPBluetoothDataType) | awk '/Address/{print $2}')"'"' <<< $(defaults read /Library/Preferences/com.apple.Bluetooth)

 

and show me the result at the end, close to your next prompt. should show something like the pic i'm attaching.

 

 

guill_Gs-Powerful-MacBook-III____Dropbox_Preferences_Alfred_Alfred_alfredpreferences_workflows_user_workflow_4B23A5FE-ADA5-4420-8439-74DEDFE8C9B5_and_battery_sh_—_legal-portal.jpg

Link to comment

Ran the original workflow and ended up with the first image. I have Bluetooth manager installed but still don't have any of the results expected. After running the prompt in Terminal this is the result. Thanks for taking the time to help me out with this!  

 

 

 

image.thumb.png.df9aa471e08510b2f105fd0873addecf.png

 

image.png

Edited by 3raxton
Pictures were giant
Link to comment

try this:

 

system_profiler SPBluetoothDataType 2>/dev/null | grep -B3 "Minor Type: Headphones"

 

you should get 4 lines as a result. first should be the name of your AirPods. please check and let me know. second is your AirPods MAC address.

 

this should tell us if the Workflow is grabbing the right MAC address. if yes then we need to dig deeper. 

Edited by godbout
Link to comment
  • 7 months later...
  • 6 months later...
  • 3 months later...

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...