Reviving and old thread
Auto Connect Bluetooth Headset
I have some Sennheiser (HD 4.40 BT) headphone en route, so I have been reading up on what I am up against in using them.
After reading the thread above I am vague on various points.
First, are they setting up a button on a remote control to force the BT reconnect, or is it a control button on the headphone?
Second, what is the filename and location where this line is added to?
<key id="0x07">RunScript(/storage/autoConnect.py)</key>
Third, I guess there is a map for these key id numbers available somewhere in case I need something other than key 7?
Fourth, after reading to the end of the thread and making the suggested edits, is this the correct final code for the python file (understanding that I am going to insert my bt mac add.)?
import xbmc
import os
from subprocess import call
call('echo -e "connect ##YOUR-BT-MAC##\nexit" |
bluetoothctl', shell=True)
current.close()
Finally, I suppose even more MAC addys could be added to the code for BT keyboards, mice, etc, to have the whole crew reconnect, if needed? Or assign a different button for each device and have a custom python file for every button/device combo?
Many thanks LE community!