Hi,
I’m now able to make it work using an ESP32, thank to this thread, some sample frames to lock/unlock : https://github.com/cnrd/yeelock and also the SDK.
I hope it will be clear enough :
here is a sample frame to send : 01505c84ff2f0099cf13d74d5b246c38eb6cf702 01 : unlock command 50 : admin identification mode (? maybe it meens i’m not using a shared key …) 5c84ff2f = 1552219951 = Sunday, March 10, 2019 12:12:31 PM (epoch time) 00 : unlock mode (unlock/wait/lock again) (01=unlock only) (02=lock only) 99cf13d74d5b246c38eb6cf702 : 14 first bytes of HMAC, using “ble_sign_key” as key and SHA-1 as variant (see https://www.liavaag.org/English/SHA-Generator/HMAC/)
ble_sign_key can be found with fiddler or mitmproxy with android device and maybe a not so recent app version.
On notification chanel you will probably receive an “APP_TX_SET_SYS_TIME_REQ” message, clock has to be set, in order to synchronise it (first byte of notification message=0x09)
In this case you have to send this kind of message before trying again : 08 : set time 40 : admin identification mode (?)
4 next bytes : epoch time in hexa
using my esp32, it works fine !!!
BLE uuid to send commands : 58AF3DCA-6FC0-4FA3-9464-74662F043A3B
BLE uuid to receive notifications : 58AF3DCA-6FC0-4FA3-9464-74662F043A3A
thanks for this! I have to admit, I have zero experience in Bluetooth development and knowledge in the protocol used (RFCOMM).
It seems you got it working, so you have a piece of code that can unlock / lock your Yeelock? Could you maybe share it, so I may test myself, plus maybe try to make an integration out of it for HA?
Nothing concrete, yet. But I got some hints from somebody how to maybe tackle it. But it will take me 1-2 months still, as I don’t have an ESP32 board yet to try it out. If I can get it working with an ESP32 board (and actually understand what’s going on), I start looking into it how to do it as a native HA plugin without an ESP board (obviously, only if the hardware that runs you HA has Bluetooth
I will post here as soon as I know something, but again: It may take 1-2-3 months
OK, but sadly same thing, different design in the end: Still only Bluetooth.
Will test it in the next 1-2 weeks to get it running with an ESP and then maybe just with an RPi… But chances are low that it will be easy…
Hello. Has anyone gotten any closer to get those to work with Home Assistant?
I own many of them and would love to be able to lock/unlock them in other ways apart from their app.
Thank you
I too would be appreciative of any updates. I have two of these ready to go into a liquor cabinet, and a teenage son who will be soon interested in it’s contents lol. Already have a bunch of ESP32s around the house managing my plants
To make an automation we will need a second device
Esp or android with tasker.
I guess no other options, HA does support any BLE hubs to control for now
I successfully ran my tool on RPi and connected with HA using NodeRED.
Now, I’ll try to write native HA integration, which will take a little time, because I want to use ESPHome device as remote BT adapter, and this will be my first HA integration
Feel free to open an issue in the repo if you’ll find any problems.