Bluetooth Trigger?

Hi there. Didn't see a recent post on this. Is it possible to set bluetooth device as a trigger similar to USB. e.g. when bluetooth device named "YYY" is connected triggers a program.....

Check this:

If that's still a macOS limitation, then why don't you consider polling manually? How often do you need the polling to occur? This macOS command will list all paired BlueTooth devices:

system_profiler SPBluetoothDataType

Why not just issue that command every few seconds? That's what KM would have to do if macOS still doesn't issue events for new BlueTooth devices. I wouldn't want KM polling constantly if I don't really need that service.

I'm sure it wouldn't be too difficult to write a macro that polls the results of the above command every few seconds. (It's a very fast command. It probably wouldn't be a drain on your system's resources.)

Hi,

It's worth noting that this command:

system_profiler SPBluetoothDataType

Will list Connected devices and then Not Connected (but known, previously connected) devices, on my setup, anyway.

So here is the regex I use to examine the clipboard containing that profiler's output to determine whether my Bluetooth device (the Sensel Morph) is currently connected:

Morph-5631:(?s).*Not Connected:

If it's not connected, it appears after the string "Not Connected". If it is connected, it appears before the string "Not Connected." So either way, I have my answer.

Small edit for clarity and to un"correct" the spelling of a product name.

2 Likes