tilmanginzel / alfred-bluetooth-workflow

Yet another Alfred workflow to connect / disconnect Bluetooth devices
MIT License
189 stars 8 forks source link

Notifcations not working #22

Closed a-rock-lobster closed 3 years ago

a-rock-lobster commented 3 years ago

Hi,

First, thank you for making the workflow. Very useful and time saving.

I find that there are no notifcations using the workflow. If I understand correctly there should be notifcations after (de)connecting, turning bt on and off etc.

I was prompted to allow notifcations for the terminal, which I didm but still nothing.

I also tried a reinstall to no effect.

Cheers,

tilmanginzel commented 3 years ago

Hi @a-rock-lobster, the workfow uses terminal-notifier for notifications. There are a couple of things you could check:

  1. Open the Alfred workflow settings
  2. Open the debug mode (CMD + D)
  3. Type a command like blt <your device>

When everything works, this should be printed:

[23:46:35.457] STDERR: Bluetooth Connector[Run Script] [debug] ./notify script triggered
[debug] Send notification (message: Connected to WH-1000XM3, image: -contentImage ../icons/success.png, command: )
[debug] Notification sent successfully

Can you paste your logs or do you spot something suspicious in the logs?

In addition, you could try to execute the notification command directly from the terminal to see if there are any issues:

  1. Open a terminal and go to the folder where the workflow is saved
  2. Execute the following command: ./terminal-notifier.app/Contents/MacOS/terminal-notifier -message "Test", does it work?

You also mentioned that you were prompted to allow notifications on first use, so you are probably on Catalina or Big Sur. Could you check if one of the comments here helps, for example this one? It's a long issue with many different workarounds, which unfortunately shows that the topic related to gatekeeper / notarization of binaries is still a mess...

Cheers :)

a-rock-lobster commented 3 years ago

Hiya,

Thanks for the info.

Here's the debug; it looks normal to me:

[13:41:50.756] STDERR: Bluetooth Connector[Run Script] [debug] ./notify script triggered
[debug] Send notification (message: Disconnected from MX Anywhere 2, image: , command: )
[debug] Notification sent successfully

I also tried executing the notification command directly from the terminal (having navigated to the folder). It appears to execute in the terminal, but nothing happens.

I'm on Big Sur. I did this already when installing. I also enabled notifcations for terminal-notifier. Everything worked no probs apart from no notifications.

Is it worth installing an older version and updating?

a-rock-lobster commented 3 years ago

Okay, I'm an idiot. Just found that 'Do Not Disturb' was set to permeanantly on… embarrasing. I'm so sorry for waisting your time…

tilmanginzel commented 3 years ago

Haha, no worries! :) Glad to hear that it's working now and that you found the root cause. 👍