Xiaomi Bluetooth MHO-C401 bindkey?

When I try to fix the xiaomi bluetooth connection I get the bindkey using telink flasher


I get the error

The provided bindkey did not work, sensor data could not be decrypted. Please check it and try again.

Unfortunately it is of Azarton variety so I can’t use firmware with BThome protocol with it :frowning:

https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html

same result :frowning:

I have same issue when add, Xiaomi BLE ,Temperature/Humidity Sensor 2
The provided bindkey did not work, sensor data could not be decrypted. Please check it and try again.

I have the same problem also with Xiaomi BLE ,Temperature/Humidity Sensor 2 and the Bindkey from Telink Flasher.
“The provided bindkey did not work, sensor data could not be decrypted. Please check it and try again.”

@DexterYao and @oveb I got the same error. Restarting HA made it work.

Restarting HA many times did not fix the error for me…

Same problem for me

I flash the Sensor by Telink Flasher v4.8
then “Passive BLE Monitor” can auto connect it without setting

But then it is not using xiaomi integration really :man_facepalming:

Also, it seems that most recent models (at least from November 22) have a few hardware changes, so flashing them will freeze the screen (same as when flashing Azarton copies).

BTW for anyone interested in these devices: Azarton firmware with bthome (and others) support can be built, but that does not fix new mho-c401s

The suggestion by the developers of the Passive BLE Integration is to move to the current core Bluetooth capability as eventually Passive BLE will be deprecated. I have a number of ESPHome Bluetooth proxies and I am attempting to flash the MiThermometer back to stock firmware and use the Xiaomi Integration. The Xiaomi integration finds the device but bindkey generated using TeLink Flasher application is not working. What is the solution?

Found it. Make sure you get the bindkey from Telink Flasher before adding to the Xiomi Integration

Next question to the Xiomi BLE Core integration team. Is there a way to change the Temp display on the unit from C to F? The measurement is correct in the dashboard

I have just purchased 3 of these from Aliexpress https://www.aliexpress.com/item/1005003803504082.html

The instruction leaflet is in Chinese but had a QR code which took me to the Google play store to download Xiaomi Home, which I did.

From reading various threads, it sounds like I need to pair it with an app before I can go any further with integrating into HA.

So I tried scanning for it but it wasn’t found. I then tried to add it manually but couldn’t find it in the devices listed. I tried setting the region to Chinese Mainland and scanning still didn’t work. However I did find a Zenmeasure device that looked very like it in the devices. I tried that and still no success.

I also tried scanning for it by using Telink Flasher from my phone. Something called MHO-C401 popped up after many tries but I couldn’t connect to it and the log showed that it tried 5 times before giving up.

The LightBlue BT Scanner app found it eventually, but it doesn’t stay for long before greying out.

Can anyone give any pointers on how to get it to pair with an app?


Update: after leaving the Xiaomi Home app scanning for many minutes it did eventually pick up the device and prompt me to select it. I did this and it tried to pair, but the pairing repeatedly timed out.

After many retries it appeared to pair then took me to an “Add device” page with a circular progress bar. This too repeatedly timing out.


Update 2: I was using a Samsung A42 5G phone to try to connect to the MHO-401 using the Xiaomi Home app which repeatedly failed. I then tried a Samsung S8 which worked on the first attempt.

However, I now have the same issue as the OP - the bindkey is not accepted.

But then I followed the advice here Xiaomi BLE LYWSD03MMC / bindkey not accepted · Issue #76898 · home-assistant/core · GitHub by closing the telink tab in my browser and waiting 10mins before trying again and it worked!

So this worked for me:

  1. Install Xiaomi Home app on your phone
  2. Add device (+ in top corner of home page). If your BT is working and the device is right next to the phone and it won’t connect, try using another phone!
  3. Once it has gone through it’s connecting. Close the app properly so it disconnects.
  4. Launch Telink Flasher from your phone or PC and click Connect. Once MHO-C401 appears, pair with it.
  5. Once connected click the Do Activation button and wait for a few seconds for the Bind Key to appear in its text box.
  6. Copy it somewhere safe and close the tab to disconnect it.
  7. In HA it should auto find the device and raise a Notification for your to configure it - don’t, wait 10 minutes.
  8. After 10 minutes follow the notification to enter the bind key.
  9. That should work, but if you got impatient you will probably need to restart HA and try again with the same bind key you saved earlier.
2 Likes

I had the same problem with The Xiaomi LYWSD03MMC. The Bindkey from Telink would not work.
I followed the instructions on the HA URL. Xiaomi BLE - Home Assistant (home-assistant.io)
I then used the Token Extract tool and that Bindkey worked.
" * Extract the keys from Xiaomi Cloud using a token extractor tool."

But i do not have or want account with xiaomi smart home …

It keeps asking for the bind key 20min after i added a sucessfully, and then the bind key doesnt work.

The only thing that works 100% is flash custom FW available for multiple devices here.
Flash process is verry easy and revertible, device will not be usable in the Xiaomi ecosystem anymore but that is the point :slight_smile: HA BLE proxy or Bluetooth integration works fine.
Web flasher available here, no need to download FW or anything, will be autodetected for MHO-C401.

So this worked for me:

  1. Install Xiaomi Home app on your phone
  2. Add device to Xiaomi app, after successful connection close Bluetooth of phone to be sure is disconnected.
  3. Launch Telink Flasher from your PC and click Connect. Once MHO-C401 appears, pair with it.
  4. Once connected click the Do Activation button and wait for a few seconds for the Bind Key to appear in its text box.
  5. Select “custom FW” and push “Start Flashing”, wait to finish device will reboot at the end.
  6. Connect back to the device (name will change) select Advertising type: to MIJIA (MiHome) and push “send config” (feel free to play with options) and then Disconnect.
  7. In HA if you have Bluetooth proxy it will show as new detected device after a few minutes.
  8. Optional!! cleanup in the Xiaomi App by removing the device and uninstalling the App :slight_smile: