Contribute
Register

Workaround for Bluetooth Mouse/Keyboard Battery Drain

Status
Not open for further replies.
Ok, '600' did the trick. I didn't pick that up from steps above. Maybe update line 9?
Thanks!
 

Attachments

  • Screen Shot 2020-12-26 at 8.27.31 PM.png
    Screen Shot 2020-12-26 at 8.27.31 PM.png
    268.3 KB · Views: 67
Hello !

I'd love to use your script, but it doesn't seem to work unfortunatly...
First I have the same issue as djzmaj, i have to add "600" at the end of the command for the script to run.
And when it runs (if it really does, but it seems to), nothing happens and the keyboard and mouse doesn't disconnect (I've put TIME_BEFORE_DISCONNECT_SEC=120 and CHECK_INTERVAL_SEC=20).

I use Big Sur.
Thanks !
 
Last edited:
Hello !

I'd love to use your script, but it doesn't seem to work unfortunatly...
First I have the same issue as djzmaj, i have to add "600" at the end of the command for the script to run.
And when it runs (if it really does, but it seems to), nothing happens and the keyboard and mouse doesn't disconnect (I've put TIME_BEFORE_DISCONNECT_SEC=120 and CHECK_INTERVAL_SEC=20).

I use Big Sur.
Thanks !
Here's some troubleshooting you can do. Type the following in the terminal.
/usr/local/bin/blueutil --paired
You should see a list of devices. Now type.
/usr/local/bin/blueutil --disconnect xx-xx-xx-xx-xx-xx
Use one of your devices instead of xx...
It should be disconnected. Lastly, please post the output of
/usr/local/bin/blueutil --paired | awk '{print $2}' | cut -c 1-17
 
Thanks, I’ll try that and let you know !
 
Yes, everything works this way.
Here is the output of the last command :

c8-db-26-04-c3-56
00-26-bb-7a-4c-33
00-25-bc-fb-75-7c

EDIT. To be more precise , when I use "/usr/local/bin/blueutil --disconnect 00-25-bc-fb-75-7c", it disconnects my Apple Keyboard the right way.
 
SORRY !
The script works !

I just hadn't understood the role of the "600" in the end of the command :)
I wasn't waiting long enough :)

Thank you Fu1tl1ty for your help and for this nice script !
 
One little advice to anyone who would like to launch the script at login using the plist file : use the « script » folder as described in the first post, or another one but watch out, some folders like « Documents » or « Desktop » are kind of protected by the system and the .sh doesn’t execute if it’s placed into it.

But now everything is working perfectly for me with Big Sur. Thanks again for this nice little script who kinds of contribuate to save a bit the planet :)
 
I have updated the script to work with macOS Monterey. In addition, you should update blueutil to the latest version by typing
brew upgrade blueutil
 
Status
Not open for further replies.
Back
Top