godbout Posted April 25, 2020 Share Posted April 25, 2020 (edited) another fork: https://github.com/godbout/alfred-airpods-pro-battery the original Workflow doesn't work for me (wrong arguments; left ear gets right ear data and right ear gets nothing). currently only available on GitHub. will put on Packal later... :)))))) Edited May 10, 2020 by godbout Removed jabs jeffbyrnes and JJJJ 2 Link to comment
godbout Posted May 4, 2020 Author Share Posted May 4, 2020 available on Packal now: http://www.packal.org/workflow/alfred-airpods-pro-battery enjoy! ☀️ Link to comment
SJ2K Posted May 7, 2020 Share Posted May 7, 2020 For some reason it doesn't work for me. The 0% reading for the left ear is certainly not right. Any ideas? Link to comment
godbout Posted May 10, 2020 Author Share Posted May 10, 2020 interesting. i had the same issue with the original repo that i've forked. have a try maybe? https://github.com/BeneathCloud/AirpodsBattery if you don't mind letting me know what version of macOS you're running that might help too. and you're having the AirPods Pro or the normal ones? Link to comment
Raspbian Posted May 11, 2020 Share Posted May 11, 2020 Just tried it right now. For me, the R one is 0%. Airpods Pro. MacOS Catalina 10.15.4. Link to comment
godbout Posted May 12, 2020 Author Share Posted May 12, 2020 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. Link to comment
SJ2K Posted May 12, 2020 Share Posted May 12, 2020 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
godbout Posted May 12, 2020 Author Share Posted May 12, 2020 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
godbout Posted May 17, 2020 Author Share Posted May 17, 2020 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! JJJJ 1 Link to comment
3raxton Posted September 13, 2020 Share Posted September 13, 2020 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? Link to comment
godbout Posted September 14, 2020 Author Share Posted September 14, 2020 ah yes, issues were not enable by default sorry. probably coz it's a fork. fixed. can you try the original Workflow and see if you have the issue too: https://github.com/BeneathCloud/AirpodsBattery which version of macOS are you on? thanks. Link to comment
godbout Posted September 15, 2020 Author Share Posted September 15, 2020 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? 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. Link to comment
godbout Posted September 15, 2020 Author Share Posted September 15, 2020 On 9/14/2020 at 2:56 PM, choc said: Works fine, thanks. good! glad it helps. Link to comment
3raxton Posted September 19, 2020 Share Posted September 19, 2020 (edited) 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! Edited September 19, 2020 by 3raxton Pictures were giant Link to comment
godbout Posted September 20, 2020 Author Share Posted September 20, 2020 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 comment
godbout Posted September 21, 2020 Author Share Posted September 21, 2020 (edited) 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 September 21, 2020 by godbout Link to comment
3raxton Posted September 21, 2020 Share Posted September 21, 2020 Yes, it is grabbing the right address and it now working after installing it again. Not sure why that worked but it did. Thanks for your help! Link to comment
godbout Posted September 22, 2020 Author Share Posted September 22, 2020 it probably got scared and understood correctly it'd better behave. Link to comment
forgetfulfellow Posted May 17, 2021 Share Posted May 17, 2021 @godbout works for me! Thanks for writing this, that's a pretty gnarly script you have going on for retrieving the bluetooth info 😀 Link to comment
godbout Posted May 18, 2021 Author Share Posted May 18, 2021 hey @forgetfulfellow, thanks. it's a ripoff of another workflow, just changed the icons and kept it up to date. stealing all the glory. cost me two weeks of ban i think, but hey, i'm taking the love! Link to comment
godbout Posted November 26, 2021 Author Share Posted November 26, 2021 quite a few changes in bluetooth output commands in Monterey. Workflow is now updated for it: https://github.com/godbout/alfred-airpodspro-battery/releases Southgirl 1 Link to comment
Southgirl Posted March 3, 2022 Share Posted March 3, 2022 This workflow is exactly what I was looking for. Works wonderfully, thanks! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now