Jump to content

Dente Azul — Toggle bluetooth and paired device connectivity


Recommended Posts

2 hours ago, msa said:

didn't seem to connect for some reason to the blueutil located in the shared_resources directory (…) I installed blueutil via homebrew as you recommended 

 

I’ve changed the order of the instructions; rm should have come first. My suggestion wasn’t to install blueutil via Homebrew, but rather to upgrade it if it was already installed (because that’s what _shared_resources looks for first). Removing blueutil from the _shared_resources directory should be enough to have it reinstall when invoking the Workflow. It works for me, but if you can still reproduce I’m interested, yes.


To reproduce you’d brew uninstall blueutil; rm "${HOME}/Library/Application Support/Alfred/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/blueutil" then call the Workflow (version 1.2.0). If it doesn’t work, I’d like to know the result of "${HOME}/Library/Application Support/Alfred/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/blueutil" --version.

Link to comment
  • 1 year later...
  • vitor changed the title to Dente Azul — Toggle bluetooth and paired device connectivity
  • 2 months later...

Hi @vitor

 

I have an issue with Dente Azul and was hoping you could help!

I have installed Dente Azul today, but unfortunately using the btd command to disconnect a connected bluetooth headphone does not work.

 

I have a bluetooth headphone connected to my M1 Mac. Using the btd command successfully shows the headphone, and shows it as enabled/connected.

But pressing "enter" with the headphone selected does not disconnect the headphone as expected.

Strangely, when I disconnect the headphone via the Bluetooth menu in MacOS, using the btd command does work to connect to the headphones. 
Using blueutil via the terminal to directly issue the disconnect command to the device's address works fine, so it's not a compatibility issue with the headphone. 

The device address that Dente Azul passes to the script is the correct address. 
 

I have the latest version of blueutil installed via HomeBrew (2.9.1). (I also removed it and used Alfred's dependency manager to install it, but no dice).

I also have the latest version of Dente Azul (v2023.1)

I am running MacOS Ventura 13.2.1 

Alfred Version: 5.0.6 


Attached is the debug output of running the btd command and pressing enter.

Entering "blueutil --disconnect 30-53-c1-61-9c-c6" in the terminal disconnects the headset as intended.

 

If you can provide any help with troubleshooting, that would be awesome as this is a really cool extension! 

 

Screenshot 2023-03-15 at 14.44.44.png

Link to comment

I actually fixed the issue in the script myself. 

 

I noticed that the correct address was passed to the script that runs the bluetooth command. 

I placed an echo in front of the $address value, which correctly spits out the address in the Alfred debugger.

Then I placed an echo in front of the $connected value. However, this spits out a "1" instead of a "true" value.

The script starts by comparing the $connected value to 'true', but since the value is 1, the condition is false and the disconnect command is never run.

 

Changing the script from

 [[ "${connected}" == 'true' ]] 

to 

[[ "${connected}" == '1' ]] 

fixed the issue. 

 

Attached is the script as working for me. 

 

Adding the Echoes to observe the values

Screenshot2023-03-15at15_45_21.thumb.png.d30862a7f7fe3a7956ea9814bc99ca63.png|

Output of the script with the echoes. See that the "$Connected" value is 1. 

Screenshot2023-03-15at15_45_36.thumb.png.0b8930c786caf34d1f308583c03cdd88.png

 

Changing the script to compare the value of $Connected to '1' instead of 'true' like so fixes the issueScreenshot2023-03-15at15_41_15.thumb.png.3350638cfac81e31e414c81ccf36cda7.png

Link to comment
  • 4 weeks later...
  • 2 weeks later...
Just now, gingerbeardman said:

Sorry for the delay

 

No worries. I thought you might’ve missed the previous message since it was soon after your request.

 

1 minute ago, gingerbeardman said:

I have just released a new video game project so have been busy.

 

Do tell! Can you share some details or a link?

Link to comment
  • 6 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...