Background: I have a Pi Zero that I want to send music to my bluetooth speakers. This works nicely when I have a monitor and can use bluetoothctl to pair and trust my speakers and the volume-adjuster's right-click menu to select my speakers. Due to the particular constraints of my project, however, I would like to connect to (and stream music over) a set of bluetooth speakers with a known MAC address at the push of a button.
Using GPIO and Python, I can read when that button is pushed and have set up Python code to run my program as desired, but I have to fill in the code that says "#CONNECT TO SPEAKERS HERE" and I've been stumped for a while.
Question: Knowing that I cannot provide input (ie a PIN or confirmation that I'd like to connect etc), is there a way for me to connect to speakers with a known MAC address at the push of a button?