How to exclude a Bluetooth device from being recognized as a Bluetooth device

delta

New member
A little background here: I drive a different range of fleet vehicles for work. I connect to new Bluetooth "devices" (vehicles) everyday.

I recently bought a smartwatch and it's been messing up my macros because they have constraints that are set to "all Bluetooth devices".

I want to disable my watch from being detected as a Bluetooth device at all for the purposes of macros. Is there a way to do this?

EDIT: Figured out a workaround for now. In the global macro constraints: "OR" -> "Watch Connected" + "Watch Disconnected".

Screenshot_20210509-180007615 (1).jpg
 
Last edited:

Pseudocyclic

Well-known member
You could try a strategy something like this:

T: if Bluetooth device connected - any device
A: if Bluetooth device connected - smartwatch
A: cancel macro actions - this macro
A: end if
A: actions related to other devices start here
 

SuperDaniel

New member
is it not better to use two Bluetooth triggers, one every device and one for the watch?

Than use the action trigger fired, choose the watch, action cancel this macro, the empty action are your old macro code


With Pseudocyclics code the watch blocks every time the rest from the macro
 

Attachments

  • Screenshot_20210416_160840_com.arlosoft.macrodroid.jpg
    Screenshot_20210416_160840_com.arlosoft.macrodroid.jpg
    431.6 KB · Views: 12

Pseudocyclic

Well-known member
Note that if you use two Bluetooth triggers, one for every device and one for the watch, then when the watch connects, the macro will run twice, the last trigger fired will be different each time, and it may not be possible to reliably predict which trigger will fire first.

There are many ways to tackle this, the best solution will depend on what the rest of the macro looks like.
 

delta

New member
You could try a strategy something like this:

T: if Bluetooth device connected - any device
A: if Bluetooth device connected - smartwatch
A: cancel macro actions - this macro
A: end if
A: actions related to other devices start here
This won't work, I've already tried it. The problem would be when both the watch is connected AND "all devices".

The watch will always be connected, thus negating the rest of the macro. Macrodroid further includes the watch as a Bluetooth device when triggering "all devices", it causes the macro to run twice, once as a negation and once for the "all devices".

is it not better to use two Bluetooth triggers, one every device and one for the watch?

Than use the action trigger fired, choose the watch, action cancel this macro, the empty action are your old macro code


With Pseudocyclics code the watch blocks every time the rest from the macro
This faces the same issues as the poster before. The point isn't to trigger two different macros as both devices will be connected at once.

For example, when I connect to a fleet vehicle ("all devices"). I want my phone to be at 100% volume. When I'm disconnected from all bluetooth devices, I want my phone to be at 25% volume. I can't manually add all my fleet vehicles to my phone, that's impractical and completely defeats the purpose. Currently, Macrodroid is not running my "low volume" macro because my watch is registering as the bluetooth device.
 

thisismyshine

New member
Hey sorry, didn't see this before. I was just trying to offer other ways of thinking through the logic to make your macro work. Sometimes you can figure it out a different way which helps you determine what you were missing to make it work the original way, etc. Sometimes it just gets you thinking in other ways which also helps you figure out where the problem lies.
 

Dm114

Well-known member
Have you tried this:
T: BT connected - Any device
A: BT_volume at 100%
C (global constraint): NOT (logical MD operator)→BT connected - 'your watch'

In case the constraint wouldn't recognize 'your watch' at trigger firing time (too early), try this:
T: BT connected - Any device
A: Set 'string_variable'=[bluetooth_device_name]
A: If 'string_variable' != 'your_watch_name' then
A: BT_volume at 100%
A: ...
A: endif
 
Top