[Request] Tasker Disable Bluetooth & The ballad of getting my car stereo to work - Tasker Tips & Tricks

Hey everyone,
You may have seen my previous BT Issue and potential solution posted here a couple of days ago. The gist of it was:
If my car is in the 2nd key position (Accessories, stereo, etc is ON) and the phone is connected via Bluetooth. If the car is then started, power cuts out for a second, the stereo reboots. On LL my phone would automatically reconnect after a couple of second, since the upgrade, something during the reconnect glitches. After this, I have to reboot the stereo AND the phone to get them to connect to each other properly.
After exhausting many other options, I feel as though it is possible that the stereo reconnects "too early" in MM, causing some kind of BT error. I can turn off auto-reconnect on the stereo, and perhaps if I let MM handle it, it would be better.
Anyway it seems like my STEREO is not reconnecting too early, but the PHONE is trying to connect to it too early. The stereo turns on so fast, I feel as though the phone didn't fully disconnect, causing some sort of glitch where I have to restart it. My car profile's exit task always runs successfully however
Then I thought I had the perfect idea : I have a state profile (bluetooth connected to car stereo) with enter/exit tasks. My idea was to use the exit task, turn off BT, wait 5 seconds, and then turn it back on.
Click to expand...
Click to collapse
For some reason, I am having NO luck with this. It just simply doesn't turn off bluetooth. The icon does not disappear. The command is the first one before WiFi On. I attached a log, and lo and behold, the command is not even in there for some reason. HOWEVER, when I manually run it using the "play" button, it executes as expected.
Does anyone have any ideas? The basics would be to turn bluetooth off, and then back on as soon as the connection is lost. The problem is that it must execute quickly, before the stereo turns back on (Which takes a couple of seconds at most)
HERE is a picture of the exit tasks (Turning Bluetooth back ON is cut off, but it is the last one)
The log is below. The bolded parts are part of other profiles. As you can see in the log, it does not even acknowledge the existence of the BT off task. I have obviously deleted, re-created the task, even set an IF statement to turn BT off if %BLUE = on, but that still resulted in nothing
20160729 10.30.04 P Inactive ID4 Car Profile
20160729 10.30.04 P Active ID17 Auto Off Unpaired Bluetooth
20160729 10.30.05 E Start ID0:0.0 TaskService
20160729 10.30.05 T Running ID-86 System
20160729 10.30.05 T Running ID5:2 Car Profile Exit
20160729 10.30.05 A OK ID-86.1 Anon.BT Voice Volume
20160729 10.30.05 T Running ID15:3 Anon
20160729 10.30.05 A OK ID-86.2 Anon.System Volume
20160729 10.30.05 T ExitOK ID-86 System
20160729 10.30.06 A OK ID5:2.1 Car Profile Exit.WiFi
20160729 10.30.06 A OK ID5:2.2 Car Profile Exit.Silent Mode
20160729 10.30.06 A OK ID5:2.3 Car Profile Exit.Media Volume
20160729 10.30.06 A OK ID5:2.4 Car Profile Exit.Notification Volume
20160729 10.30.06 A OK ID5:2.5 Car Profile Exit.com.intangibleobject.securesettings.plugin\n***\n*!&$*;com.intangibleobject.securesettings.plugin.Activities.TabsActivity
20160729 10.30.13 A OK ID5:2.6 Car Profile Exit.Wait
20160729 10.30.13 A OK ID5:2.7 Car Profile Exit.Ringer Volume
20160729 10.30.13 T ExitOK ID5:2 Car Profile Exit
20160729 10.32.47 A OK ID15:3.1 Anon.Wait
20160729 10.32.47 P Inactive ID24 BT Raise Idle CPU
20160729 10.32.47 A OK ID15:3.2 Anon.Bluetooth
20160729 10.32.47 T ExitOK ID15:3 Anon
20160729 10.32.47 P Inactive ID17 Auto Off Unpaired Bluetooth
20160729 10.32.47 T Running ID26:4 CPU Down Idle
20160729 10.32.47 T Running ID16:5 Anon
20160729 10.32.47 A OK ID26:4.1 CPU Down Idle.CPU
20160729 10.32.47 A OK ID16:5.1 Anon.Bluetooth
20160729 10.32.47 T ExitOK ID16:5 Anon
20160729 10.32.47 A OK ID26:4.2 CPU Down Idle.CPU
20160729 10.32.47 T ExitOK ID26:4 CPU Down Idle
20160729 10.32.48 E Stop ID0:0.0 TaskService
Click to expand...
Click to collapse
Any ideas or help, XDA?

Export that profile and post it here.

I would try factory reset.
I don't experience your bluetooth reconnection problem on MM. My phone successfully reconnects to my car audio after every car stop-restart.

GrippingSphere said:
I would try factory reset.
I don't experience your bluetooth reconnection problem on MM. My phone successfully reconnects to my car audio after every car stop-restart.
Click to expand...
Click to collapse
My phone did NOT have this issue in LOLLIPOP, but it does in MM. I have tried factory resetting the stock ROM (unmodified), switching to other ROMs, etc. Always have this issue. However in this thread, I am trying to get this workaround to function.

Sukarn said:
Export that profile and post it here.
Click to expand...
Click to collapse
Here is the exported profile description. I suspect this is what you wanted, not the XML, correct?
Code:
Profile: Car Profile (4)
State: BT Connected [ Name:KDC-BT3**U Address:00:1D:86:92:12:F3/00:1D:86:92:12:F3 ]
Enter: Car Profile Connect (2)
Abort Existing Task
A1: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
A2: WiFi [ Set:eek:ff ]
A3: Silent Mode [ Mode:Vibrate ]
A4: BT Voice Volume [ Level:15 Display:eek:ff Sound:eek:ff ]
A5: System Volume [ Level:15 Display:eek:ff Sound:eek:ff ]
A6: Media Volume [ Level:15 Display:eek:n Sound:eek:ff ]
A7: Secure Settings [ Configuration:Location Mode/High Accuracy Timeout (Seconds):0 Continue Task After Error:eek:n ]
Exit: Car Profile Exit (5)
A1: Wait [ MS:5 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A2: Bluetooth [ Set:eek:ff ] If [ %BLUE ~ on ]
A3: WiFi [ Set:eek:n ]
A4: Silent Mode [ Mode:eek:ff ]
A5: Media Volume [ Level:15 Display:eek:ff Sound:eek:ff ]
A6: Notification Volume [ Level:15 Display:eek:ff Sound:eek:ff ]
A7: Secure Settings [ Configuration:Location Mode/Location Off Timeout (Seconds):0 Continue Task After Error:eek:n ]
A8: Wait [ MS:0 Seconds:6 Minutes:0 Hours:0 Days:0 ]
A9: Ringer Volume [ Level:15 Display:eek:ff Sound:eek:ff ]
A10: Bluetooth [ Set:eek:n ]

EUREKA! A BREAKTHROUGH!
If I disable bluetooth PRIOR to starting the car, everything works as expected! I am currently using the "shake" command gesture (when connected to the car) to turn BT off for 5 seconds and turn it back on! It works flawlessly! Now if only there was a better way to do this, like triple pressing the home button.
For some reason, the exit task that cycle bluetooth on/off just won't work properly, no matter what I do. So I am looking into alternatives. Does anyone have any suggestions?

Related

toggle 'mute connected phone'

scenario :
- during the day, I want 'mute connected phone' active
- at night, I want my phone to ring, as I usually remove my watch at home ..
is there a way to do this automatically .. been trying to find it using tasker, no go ..
You could use any scheduling app, such as Trigger. To have the phone sound profile set to Priority/Mute during daytime hours and ring at night.
hmm .. that's not my idea .. but It does gave me another idea .. thanks ..
I use something similar to Trigger, but the "mute connected phone" option in Android Wear overrides any profile settings. I have to disconnect my watch when I get home as this is the only solution I can find.
I keep my phone on my desk at work and pre-L I used a profile manager to mute my phone; but keep my watch vibrating. With L as soon as I mute my phone the watch also mutes.
solved with Tasker
I solved this with tasker :
made several profile :
- home, night -> medium volume
- day, watch connected (bt connected)-> silent
- day, no watch connected (bt not connected)-> loud
and on the android wear apps, I don't enable mute phone while watch connected option, so all volume control is in Tasker

Wifi Near profile doesn't switch off vibrate mode

I have a WiFi Near profile which activates if the CELLA variable is equal 1 and my home wifi is near.
It turns on the wifi which is working fine and there is a command Silent mode OFF which is not working for some unknown reason. I have also tried to replace this command with the Ringer volume set to 5 command but this also doesn't work.
I can feel one vibration if this profile becomes active so I think this maybe working but after that it is immediately turns in to vibrate mode.
What could be the problem?

Tasker & BT Media Volume Automation

Has anyone got any experience with automating sound settings with Tasker on the Huawei P10?
I have a task that should turn off the WiFi & turn up the BT volume when connected to my car's WiFi. My WiFi gets turned off as expected when I connect, but the volume stays at 0.
This task worked flawlessly with my Sony Xperia I upgraded from.
I have experience with tasker service getting killed every few days on my p10. I have no idea why.
Ally153 said:
Has anyone got any experience with automating sound settings with Tasker on the Huawei P10?
Click to expand...
Click to collapse
Some actually! I've used Tasker for several years on the P10, P9, HTC M9, M8 M7 etc etc and have similar profiles running to turn off WiFi, read out SMS's etc when I connect to my car.
Firstly is Phone Audio & Media Audio both turned on in the settings of the paired device (car) in Bluetooth settings?
What volume are you trying to change, phone call, media or both? (In Tasker... BT Voice Volume or Media Volume?)
I've just tested my P10 in Tasker, while connected to my car, and both BT Voice and Media change volume up and down with no issues.
I'm on L09C432B133
frgo said:
I have experience with tasker service getting killed every few days on my p10. I have no idea why.
Click to expand...
Click to collapse
On the Phone: Settings, Apps, Settings, Special Access, Ignore Optimisations, All Apps at top, Allow Tasker
In Tasker: Preferences, Monitor tab, Run in Foreground (Probably ticked already)
colthekid said:
On the Phone: Settings, Apps, Settings, Special Access, Ignore Optimisations, All Apps at top, Allow Tasker
In Tasker: Preferences, Monitor tab, Run in Foreground (Probably ticked already)
Click to expand...
Click to collapse
Thanks, but everything is already set.
frgo said:
Thanks, but everything is already set.
Click to expand...
Click to collapse
OK, how about this bit then (shouldn't make any difference if you've allowed Tasker to ignore optimisations, but you never know!)...
Settings, Apps, Tasker, Battery, Power Intensive prompt & Close after screen locked both off
While I've not specifically noticed Tasker being killed, I've noticed the P10 (& my P9 before it) would sometimes randomly close things anyway, nevermind what ignore options were ticked! But they did usually restart of their own accord soon after. May just be a "glitch" with EMUI/Huawei phones!
colthekid said:
Settings, Apps, Tasker, Battery, Power Intensive prompt & Close after screen locked both off
Click to expand...
Click to collapse
Yep, both are already off. And it's the same for dropbox. Photos just won't upload anymore after few days.
Looks like huawei really is overly enthusiastic in closing background apps
colthekid said:
Some actually! I've used Tasker for several years on the P10, P9, HTC M9, M8 M7 etc etc and have similar profiles running to turn off WiFi, read out SMS's etc when I connect to my car.
Firstly is Phone Audio & Media Audio both turned on in the settings of the paired device (car) in Bluetooth settings?
What volume are you trying to change, phone call, media or both? (In Tasker... BT Voice Volume or Media Volume?)
I've just tested my P10 in Tasker, while connected to my car, and both BT Voice and Media change volume up and down with no issues.
I'm on L09C432B133
On the Phone: Settings, Apps, Settings, Special Access, Ignore Optimisations, All Apps at top, Allow Tasker
In Tasker: Preferences, Monitor tab, Run in Foreground (Probably ticked already)
Click to expand...
Click to collapse
My task is set to turn the media volume to max (15) then adjust the BT volume to max (again, 15) before turning the phones WiFi off. I've also tried to use the app Volume Profile, which has a Tasker plugin. I don't know if I need to set a delay? My old phone worked without one, but I remember I had timing issues in the past with other phones.
frgo said:
Yep, both are already off. And it's the same for dropbox. Photos just won't upload anymore after few days.
Looks like huawei really is overly enthusiastic in closing background apps
Click to expand...
Click to collapse
I had similar problems, they seemed to go away over time. I remember reading in reviews that Huawei uses machine learning to optimise app response and battery, so I don't know if that's influenced things improving over time. I remember my phone mysteriously revoking notification access I granted apps.
Ally153 said:
My task is set to turn the media volume to max (15) then adjust the BT volume to max (again, 15) before turning the phones WiFi off. I've also tried to use the app Volume Profile, which has a Tasker plugin. I don't know if I need to set a delay? My old phone worked without one, but I remember I had timing issues in the past with other phones.
Click to expand...
Click to collapse
Don't think you need a delay, mine certainly doesn't, just done a test again changing both at the same time without a delay...no problems
This is the task I just tested....
Tester (50)
A1: BT Voice Volume [ Level:8 Display: On Sound: Off ]
A2: Media Volume [ Level:8 Display: On Sound: Off ]
Try it on yours. The "Display" bit just shows it's worked. You don't actually need it, but it's a good "bug check" as would be the Sound option, to make sure the task is actually working. The 50 is just the number of my task.
Ally153 said:
I had similar problems, they seemed to go away over time. I remember reading in reviews that Huawei uses machine learning to optimise app response and battery, so I don't know if that's influenced things improving over time. I remember my phone mysteriously revoking notification access I granted apps.
Click to expand...
Click to collapse
Yes you may be right, certainly Huawei does seem to mess about with permissions etc that other android phones don't!

Android auto Call change to private mode (phone) but hold s/k is working.

Title- Android auto Call change to private mode (phone) but hold s/k is working.
Phone- Any AA supported phone.
Pre-condition- AA connected.
Step to reproduce-
1.AA active call.
2.Press BT icon to change AA call to Handset or speaker.
3.Press AA hold s/k or mute s/k.
Expected result-
When Call is change to handset mode, these function should not be work. and softkeys should be disable or inactive.
Actual result-
Call change to Handset mode, But AA infotainment s/k is working for hold and mute.

Tasker sleep profile - vibrating

I am trying to set up a profile for sleeping where my volume is off and no vibrate. I have it set up to trigger when I plug it in for charging and that works fine, but the action is evading me.
If I use dnd then when it "wakes up" (turns off dnd in the exit side) it plays my current notification sound which wakes up my wife.
If I try to set volume to 0 I still cannot turn off vibrate.
My phone (s8+) has a "sound mode" with sound/vibrate/mute but I can't find the corresponding tasker action to set this.
My desire is to have both ringer volume and notification volume 0 with no vibration. I don't want any sound or beep or vibration to happen when I end this profile. (If something causes a notification at that moment I understand that it will beep - what I am trying to avoid is the beep which is generated automatically exiting from the profile).
Does the "audio -> vibrate mode" action not work?
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers

Categories

Resources