Bluetooth disconnect device not working?
Hi,
I want a Task that will disconnect my headphones. So I created a Bluetooth Connection Task as you'd expect but when I execute it, the headphones are still connected.
Any tips on what I should be doing? I've tried matching by MAC address and name to no avail.
Exported XML:
<TaskerData sr="" dvi="1" tv="5.9.2">
<Task sr="task21">
<cdate>1581970422342</cdate>
<edate>1581981740940</edate>
<id>21</id>
<nme>Disconnect BT</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>340</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%bt_address
Address
Bluetooth device's MAC address</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%bt_battery_level
Battery Level
% of battery available, or not set if unavailable. (Android 9+)</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%bt_paired
Paired
true if there is at least one encrypted connection to this device, false otherwise</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3>%bt_class
Class
The device's bluetooth class ID</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES4>%bt_class_name
Class Name
The device's bluetooth class name</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES4><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES5>%bt_connected
Connected
true if the BT device is connected, false otherwise</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES5><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES6>%bt_encrypted
Encrypted
true if there is at least one encrypted connection to this device, false otherwise</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES6><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES7>%bt_major_class
Major Class
The device's major bluetooth class ID</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES7><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES8>%bt_major_class_name
Major Class Name
The device's major bluetooth class name</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES8><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES9>%bt_name
Name
Bluetooth device's name</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES9><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES10>%bt_signal_strength
Signal Strength
Strength of the connection in dBm. Only available for connected and scanned devices.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES10><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES11>%bt_type
Type
Could be 'classic', 'le', 'dual' or 'unknown'</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES11></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Int sr="arg1" val="1"/>
<Str sr="arg2" ve="3">M&D MW07 PLUS R</Str>
<Int sr="arg3" val="60"/>
</Action>
<Img sr="icn" ve="2">
<nme>mw_device_bluetooth_disabled</nme>
</Img>
</Task>
</TaskerData>
Any help appreciated!