drndos / mikettle

Xiaomi Mi Kettle Bluetooth Library
MIT License
54 stars 23 forks source link

Only connect and authenticate once #5

Open mgedmin opened 4 years ago

mgedmin commented 4 years ago

My Viomi Smart Kettle SK-152A (product ID 1116, yunmi.kettle.v7) doesn't like it when you try to connect too frequently, resulting in bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral XX:XX:XX:XX:XX:XX, addr type: public.

Reusing the same connection makes demo.py work fine.

See #4.

annadorottya commented 3 years ago

This PR helped with my connectivity issue as well, I have a Xiaomi Smart Kettle (productID 275). Thanks @mgedmin