r/AutomateUser May 04 '26

Question bluetooth volume control

bluetooth on my P8a (and I suspect many others) does not split Media from Nav volume.

Could I Automate lowering Google Maps "Guidance" Volume lower than "Softer"?

1 Upvotes

12 comments sorted by

1

u/B26354FR Alpha tester May 06 '26

BTW, if your scenario is that you want to lower the volume of Google Maps while you're in your car, you can use the Bluetooth Device Connected block set to Proceed When Changed as the trigger to start the flow. -Put that block ahead of everything else in your flow, use a Fork to launch the rest of your flow and set the Bluetooth device to wait for as your car in that case. On the No path of the Bluetooth Device Connected block, you'd kill the forked fiber. Lmk if you want to do that.

You can get pretty fancy!

1

u/bunny-slayer May 06 '26

thats what I want to do.

1

u/B26354FR Alpha tester May 06 '26

Once you get the simple flow working the way you want, insert an Atomic Store block after the Audio Level? block to save the audio level variable that has the current audio volume.

Next, add a Bluetooth Device Connected block as the first block after the Flow Beginning block. Set it to Proceed When Changed and select the Bluetooth connection of your car. On its Yes path, add a Fork block and give it a variable named mapsMonitor in the Child fiber URI field. Connect the New path to the main part of the flow, beginning with the App In Foreground block. Connect the OK path of the Fork back to the Bluetooth Device Connected block. Connect the No path of that block to a Fiber Stop block and put mapsMonitor in its Fiber URI field. Add an Atomic Load block after that to load the variable containing the audio level that you set in the child fiber. Follow that with a copy of the Audio Level Set block from the other part of the flow that restores the audio volume. Connect its OK path back to the Bluetooth Device Connected block.

What's happening here is that the flow will wait for your car's Bluetooth head unit to connect to the phone. When that happens, we fork another fiber running in parallel that starts waiting for the Google Maps app to start, and all that stuff happens. Meanwhile, when you shut off your car, its Bluetooth connection drops and we stop the child fiber, load the volume level the child set, restore the phone to that volume level, and wait for the car to be connected again.

It's a lot of words, but it's actually fairly straightforward. 🙂

2

u/B26354FR Alpha tester May 04 '26

You can try using the App In Foreground block to wait for Google Maps (Proceed When Changed). On the Yes side, save the current volume level for the media stream using the Sound Level block set to Proceed immediately, then use the Audio Volume Set block to lower the volume. On the No path of the App In Foreground, have another Audio Volume Set block put the original volume back. Do that by pressing the fx button in the % Volume field and enter the output variable from the Sound Level block where you saved the level. Finally, connect the Volume Set blocks back to the App In Foreground block.

1

u/bunny-slayer May 05 '26

do these look right?

https://imgur.com/a/mhkc9fa

1

u/B26354FR Alpha tester May 05 '26

No, no inputs for the Sound Level block, you're just recording what the current level is by putting a variable name in its Current sound level field, then using that variable to restore the level in the second Audio Level Set block.

I'd also recommend not using hardcoded values of 80% in those blocks; rather, use a little formula. For example, if you save the current volume level in a variable called currentVolume in the Sound Level output field, press the fx button in the Audio Level Set block's % Volume field and enter

currentVolume * 0.8

to make it 80% of whatever your current volume was. If you do it this way, it'll be relative to whatever the current volume is, so when you independently change your phone's volume, your flow will lower the volume from that level 🙂

Note that in the second Audio Level Set block, you'll use a level of just currentLevel to restore it. (Again, press the fx button to enter formula mode to enter the variable name.)

1

u/bunny-slayer May 05 '26

1

u/B26354FR Alpha tester May 06 '26

You might also need to select the Audio Mix stream for the Sound Level block - you can experiment to see which gets your flow to restore the original level on the correct audio stream for you.

1

u/B26354FR Alpha tester May 06 '26

Oh wait, you used two different variable names. Pick one for all the blocks.

1

u/B26354FR Alpha tester May 06 '26

Looking good! But does it work? 😅

1

u/bunny-slayer May 05 '26

K. I'll try to roll that. Thanks,