Jump to content

Dente Azul — Toggle bluetooth and paired device connectivity


Recommended Posts

  • 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...
  • 3 months later...

I am having trouble getting Dente Azul to work on my machine running Sonoma 14.3. I've given Alfred all the necessary permissions... running the debugger comes back with this:

 

[18:58:56.553] Dente Azul[Script Filter] Queuing argument '(null)'
[18:58:56.631] Dente Azul[Script Filter] Script with argv '(null)' finished
[18:58:56.631] STDERR: Dente Azul[Script Filter] env: blueutil: No such file or directory
[18:58:56.632] Dente Azul[Script Filter] {"items":[{"title":"Bluetooth is On","subtitle":"Action to turn it off","arg":"off","icon":{"path":"icon.png"}}]}
[18:58:57.223] Dente Azul[Script Filter] Processing complete
[18:58:57.224] Dente Azul[Script Filter] Passing output 'off' to Run Script
[18:58:57.225] Dente Azul[Script Filter] Passing output 'off' to Conditional
[18:58:57.232] ERROR: Dente Azul[Run Script] /Users/harrison/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/B12C6B6E-4113-443D-9615-22DCFA030A50:1: command not found: blueutil

 

 

Thanks in advance for any help or insight.

Link to comment
  • 4 weeks later...

This workflow has been using blueutil since it was created in 2017 (7 years ago). blueutil does not have an option to show battery status, but if they add it I can add it to the workflow too.


The alternative is rewriting the whole workflow from scratch. Which I’m not against and have considered it before but zero promises.

Link to comment

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...