Xiaomi MIjia YEELOCK integration

Hey!

Do you happen to have any update on this? Thanks!

About native HA integration? Still in progress, Iā€™m debugging why sometimes Yeelock does not respond and sends unknown notification codes. Iā€™ll release v1.1.0 soon.

3 Likes

I have controlled the YeeLock using few personal tricks,
My app product is live Smart Box - Apps on Google Play
also customized app development for a few people.
Please reach out for custom development.

Itā€™s custom development, not clone of YeeLock app.

I have developed a Docker container that can run over the top of the great work that everyone has done to date. This mostly works (sometimes the Bluetooth adapter gets locked by other processes) and can be connected to in HA. Iā€™m just waiting for the merge to be accepted.

I am pleased to announce that the Docker container is no longer required for Yeelock users with the introduction of a brand new HACS integration directly into Home Assistant for Yeelock. Please give it a go and let me know what you think.

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

This is my first time building a Bluetooth integration, so thank you to all who helped.

1 Like

Iā€™m happy to report back that the integration is working :slight_smile:

1 Like

Thanks for this. Very useful!

There are three filds to be populated when setting up the integration. What are they and how do we get them please?

You will still need to obtain the ble_sign_key to connect with your device first. You can do this by MITM the Yeelock app and looking for the ble_sign_key in the server API response. Hopefully we can make this more straightforward in the future as the API itself is extremely simple. Any help welcomed. Explained here.

Any more info on how to obtain the ble_sign_key with MITM? it doesnā€™t seem to be very easy. Iā€™m using android yeelock app.

@lerele Yes, in my repo (aso824/yeehack) there is script and command to do that - via yeehack.py fetch. You will need to enter login and password - there is no other way; if you have Python knowledge you can inspect my code to be sure thatā€™s secure (and maybe @codyc1515 want to confirm :smiley: )

Thanks for your patience. v2.0.0 adds support for cloud config flow. Because the QR code that comes with the device does not give us the ble_sign_key directly, you need to first register your device in the Yeelock app then you will be able to see your Yeelock auto-discovered in HA, click setup and enter your country code, phone number and password (thanks to aso824 for the boilerplate code for this). It should bring through your device name from the Yeelock app too.

Hold on a secā€¦ I was about to get some of these (and use a throwaway spare device to get the initial app data.)
The Yeelock app (and this integration) requires sharing your phone number to set up?

Yes, it is possible to use an email address too but I havenā€™t yet looked into that method.

I had a huge variety of issues with their app using the email method and ultimately had to break into the account with the recovery code and transfer the the devices out to a new account.

Anyway, you only need to login once on initial device setup to get these into HA forever.

All of the product links here are dead, is this the model thatā€™s supported by your integration @codyc1515 ?

Looks like the store I ordered from doesnā€™t have it now either. Such is the way of AliExpress. I just order from any given store and hope for the best! The device looks like the right one to me but to be honest, I think they are all using the same protocol (not that I have any evidence for that, mind you).

Im using the integration with this device:
https://www.aliexpress.com/item/32950963874.html?spm=a2g0o.productlist.main.21.7f7c2b1fpkX1Yd&algo_pvid=b5c45827-04a1-4f29-8e4c-55b8ce74a310&algo_exp_id=b5c45827-04a1-4f29-8e4c-55b8ce74a310-10&pdp_npi=4%40dis!USD!37.24!37.24!!!37.24!37.24!%40210318c317071237173852187eaafc!66251458216!sea!BG!123542022!&curPageLogUid=EChvBibTmRPQ&utparam-url=scene%3Asearch|query_from%3A

BTW, version 2.1.0 is troublesome for me so I reverted back to 2.0.1 which is working great.

Same model here, but I bought it cheaper 3 years ago (10 ā‚¬), working with versiĆ³n 2.1, but it only has 1 entity (lock/unlock) manually. With previous versiĆ³n it has another entity (quick_lock) wich was much better.

Really great work! Would it be possible to run this on an ESP32?

This is still available under the lock entity with the open button. Look for a small open icon.