vegardinho / alfred_bluetooth_controller

Alfred workflow for managing bluetooth settings and -connections
MIT License
95 stars 7 forks source link

Mac M1 toggle problem #14

Closed TiredTyler53 closed 2 years ago

TiredTyler53 commented 2 years ago

I am new to Alfred so please be kind. I downloaded this and imported it into Alfred and I can not set a favorite device as well as it will not toggle on or off. Is there something I need to do or change?

Screen Shot 2021-09-14 at 12.18.27 PM.pdf

vegardinho commented 2 years ago

I'm afraid I need a little more information than that. Click the little spider after selecting the workflow in Alfred, and paste the output text here, if you want some more help on it.

Captura de pantalla 2021-09-20 a las 21 12 24

TiredTyler53 commented 2 years ago

Okay I believe I downloaded and installed homebrew as well as the bluetooth connector to accomplish this. [08:57:46.962] Logging Started...[08:58:22.590] Bluetooth Controller[Script Filter] Queuing argument '(null)'[08:58:22.720] Bluetooth Controller[Script Filter] Script with argv '(null)' finished[08:58:22.723] ERROR: Bluetooth Controller[Script Filter] Code 1: Traceback (most recent call last):  File "./return_device_json.py", line 105, in     main()  File "./return_device_json.py", line 30, in main    js = check_output(cmd_args)  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 216, in check_output    process = Popen(stdout=PIPE, popenargs, kwargs)  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in init    errread, errwrite)  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child    raise child_exceptionOSError: [Errno 2] No such file or directoryThank you On Sep 20, 2021, at 2:15 PM, vegardinho @.> wrote:I'm afraid I need a little more information than that. Click the little spider after selecting the workflow in Alfred, and paste the output text here, if you want some more help on it.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.

abosnjakovic commented 2 years ago

Hey @TiredTyler53 I doubt this is related to Apple M1 chips as I am using one myself and cannot replicate this exact issue however I did notice toggle does not successfully disconnect my device. It does connect via favourite and toggle bt device. I think this is related to blueutil and not this alfred workflow.

skobylite commented 2 years ago

Hi - fantastic workflow! Since updating to monterey I am no longer to get the toggle bluetooth device to work accurately, have you had the same problem?

[15:42:52.509] Logging Started... [15:42:56.067] Bluetooth Controller[Script Filter] Queuing argument '(null)' [15:42:56.276] Bluetooth Controller[Script Filter] Script with argv '(null)' finished [15:42:56.278] STDERR: Bluetooth Controller[Script Filter] security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain. [15:42:56.279] Bluetooth Controller[Script Filter] {"items": [{"subtitle": "Disconnect", "uid": "04-52-c7-d3-82-8b", "title": "Bose Mini II SE SoundLink", "variables": {"uid": "04-52-c7-d3-82-8b"}, "autocomplete": "Bose Mini II SE SoundLink", "arg": "Bose Mini II SE SoundLink", "icon": {"path": "./icons/bt_icon_green.png"}}, {"subtitle": "Connect", "uid": "88-a4-79-e3-ba-d3", "title": "Y", "variables": {"uid": "88-a4-79-e3-ba-d3"}, "autocomplete": "Y", "arg": "Y", "icon": {"path": "./icons/bt_icon_blue.png"}}, {"subtitle": "Connect", "uid": "e8-07-bf-a8-09-6b", "title": "SoundBuds Slim", "variables": {"uid": "e8-07-bf-a8-09-6b"}, "autocomplete": "SoundBuds Slim", "arg": "SoundBuds Slim", "icon": {"path": "./icons/bt_icon_blue.png"}}, {"subtitle": "Connect", "uid": "f8-8a-3c-31-7b-8a", "title": "TOZO-NC2 Buds", "variables": {"uid": "f8-8a-3c-31-7b-8a"}, "autocomplete": "TOZO-NC2 Buds", "arg": "TOZO-NC2 Buds", "icon": {"path": "./icons/bt_icon_blue.png"}}, {"subtitle": "Connect", "uid": "88-a4-79-e3-ba-d3", "title": "Y", "variables": {"uid": "88-a4-79-e3-ba-d3"}, "autocomplete": "Y", "arg": "Y", "icon": {"path": "./icons/bt_icon_blue.png"}}]} [15:42:56.795] Bluetooth Controller[Script Filter] Processing complete [15:42:56.796] Bluetooth Controller[Script Filter] Passing output 'Bose Mini II SE SoundLink' to Arg and Vars [15:42:56.797] Bluetooth Controller[Arg and Vars] Processing complete [15:42:56.798] Bluetooth Controller[Arg and Vars] Passing output 'Bose Mini II SE SoundLink' to Post Notification [15:42:56.799] Bluetooth Controller[Arg and Vars] Passing output 'Bose Mini II SE SoundLink' to Run Script [15:42:56.799] Bluetooth Controller[Script Filter] Passing output 'Bose Mini II SE SoundLink' to Run Script [15:42:56.973] Bluetooth Controller[Run Script] Processing complete [15:42:56.981] Bluetooth Controller[Run Script] Passing output '-1 ' to Conditional [15:42:56.982] Bluetooth Controller[Conditional] Processing complete [15:42:56.983] Bluetooth Controller[Conditional] Passing output '-1 ' to Post Notification

vegardinho commented 2 years ago

Hi, and thanks!

From your output it seems the workflow can't find your favorite device. Try setting the device anew with btsetfavoriteand see if that fixes the issue.

If that doesn't work out, I'll have to upgrade myself and see if I can replicate the issue. Be aware though, that blueutil, which the workflow relies on, has not been upgraded to support Monterey yet, so you will have to expect errors until a new release arrives (#17).

vegardinho commented 2 years ago

Hey @TiredTyler53 I doubt this is related to Apple M1 chips as I am using one myself and cannot replicate this exact issue however I did notice toggle does not successfully disconnect my device. It does connect via favourite and toggle bt device. I think this is related to blueutil and not this alfred workflow.

@abosnjakovic if you happened to have upgraded to Monterey via beta, this is probably relevant for you as well (#17).

abosnjakovic commented 2 years ago

18 should fix this problem, thanks for the reference @vegardinho

tested on my macbook m1 air

vegardinho commented 2 years ago

Thanks for the pull request! Have merged #18 now. I can't actually test it, as my Apple won't allow me to update, so I'll just trust that it works out.

New release out in a minute.