Jump to content

Recommended Posts

  • 2 weeks later...

lol

 

interesting. might be the list of bluetooth devices connected then. not sure. will check.

 

could you guys send a screenshot of them, like below? thanks.

 

 

AppleBluetoothExtra_and_Item-0_and_Item-0.png

Link to post
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 post
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 post

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 post
  • 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 post
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 post

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 post

well i forked the original Workflow because it didn't work for me. maybe you need to fork mine and make your own 😂😂😂

 

ok i'll have a look, but might need some back and forth to debug, if you want this solved.

Link to post

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 post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...