Closed mouth4war closed 7 years ago
Thanks for this, I don't have any v8 to test myself but I'm glad to hear you solved it !
Could you make a pull request ?
Already have (staging #29 )
Background:
I'm able to connect to all the bulbs with gatttool but not magicblueshell (exceptions are thrown for 2 bulbs of the 5 - ERROR:magicblue.magicblueshell:Unexpected error with command "connect...). The other 3 connect using magicblueshell just fine (INFO:magicblue.magicblueshell:Connected).
The exception seems to be coming from blue.py using addr type Public instead of Random. bluepy.btle.BTLEException Failed to connect to peripheral XXXXXX, addr type: public
The function def _figure_addr_type needs to have a check for v8 and setting addr type to random. I have made this change locally and now I'm able to connect to all 5 bulbs.
FYI I got it to work from homeassistant too. Had to modify the file manually in the deps folder.
@mouth4war Thank you, I just merged your changes and deployed a new version 0.4.3
on pypi
The fix is to have addr type set to random if version is 8.
Commit has been tested locally and it works.