Closed anico64 closed 1 year ago
I am having the same exact problem.
I have the same issue. is anybody find the solution?
Same here with Xiaomi LYWSD03MMC Home Assistant 2022.8.6 Supervisor 2022.08.5 Operating System 8.5
I have the same problem with Xiaomi LYWSD03MMC.
Home Assistant 2022.9.0 Supervisor 2022.08.6
Any ideas how to connect?
xiaomi_ble documentation xiaomi_ble source (message by IssueLinks)
Hey there @jc2k, @ernst79, mind taking a look at this issue as it has been labeled with an integration (xiaomi_ble
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Some context. That device broadcasts infrequently (once every 10 minutes aiui). When testing if a bindkey isn't valid we check against the last data we received. Setting a bindkey doesn't cause a transmission. Leaving the flasher open and connected stops all transmissions.
So basically you set a new bind key but the form validation was checking against the old one.
So I guess: Do the Telink stuff first, write down the bind key, make sure the flasher app is disconnected. wait 10 minutes. Now go into HA and try and add the bind key.
Given you've already started the process to add an bindkey you could try restarting HA to make sure nothing has latched on to an old value.
A future HA release will hopefully be able to set a bindkey without the telink app.
Thank You @Jc2k 👍 I will check latter and let You know.
So I guess: Do the Telink stuff first, write down the bind key, make sure the flasher app is disconnected. wait 10 minutes. Now go into HA and try and add the bind key.
Given you've already started the process to add an bindkey you could try restarting HA to make sure nothing has latched on to an old value.
I followed these steps, and then HA accepted the bindkey. Thanks @Jc2k
Having this process automated and baked into HA would be amazing!
Tell me about it. It's a little fiddly but pretty sure we can do it, if I can find the time!
Some context. That device broadcasts infrequently (once every 10 minutes aiui). When testing if a bindkey isn't valid we check against the last data we received. Setting a bindkey doesn't cause a transmission. Leaving the flasher open and connected stops all transmissions.
So basically you set a new bind key but the form validation was checking against the old one.
So I guess: Do the Telink stuff first, write down the bind key, make sure the flasher app is disconnected. wait 10 minutes. Now go into HA and try and add the bind key.
Given you've already started the process to add an bindkey you could try restarting HA to make sure nothing has latched on to an old value.
A future HA release will hopefully be able to set a bindkey without the telink app.
Your solution helped. Now everything works :) Thank You @Jc2k
So now i've one sensor with bad bindkey but he dont ask me for a new one, what i need to do ?
As Xiaomi doesnt work for me i use BLE Monitor, i have to delete this integration ?
It should prompt you for a new bindkey the first time it sees an encrypted packet it can't decrypt. If it doesn't, it probably didn't pick one up yet.
We've seen that BLEM can interfere with bluez, and that bluez (the Linux bluetooth stack) has tougher stricter requirements of the Bluetooth hardware than BLEM does. So usually it's (1) turn BLEM off, (2) try to reduce interference (extension cable for Bluetooth dongle, no internal Bluetooth, etc) and (3) new dongle.
I had to get a new dongle to get stable Linux Bluetooth that was compatible with BlueZ. My old one would random stop working and in many bizarre ways - sometimes it would only be able to see a single Bluetooth device (my tv). Some of those failure modes are hard to automatically detect as it seems to be working.
If you don't want to use the integration, then of course just delete it..
Same problem on 2022.10.3 Maybe who know how resolve it?
If you have the same issue as the OP, then the steps in my first reply should help. If they don't, then it's probably a different issue and you should start another issue instead.
Some context. That device broadcasts infrequently (once every 10 minutes aiui). When testing if a bindkey isn't valid we check against the last data we received. Setting a bindkey doesn't cause a transmission. Leaving the flasher open and connected stops all transmissions.
So basically you set a new bind key but the form validation was checking against the old one.
So I guess: Do the Telink stuff first, write down the bind key, make sure the flasher app is disconnected. wait 10 minutes. Now go into HA and try and add the bind key.
Given you've already started the process to add an bindkey you could try restarting HA to make sure nothing has latched on to an old value.
A future HA release will hopefully be able to set a bindkey without the telink app.
Thank you! That helped me! Peace sky to all :)
Hi, those who encounter problems with the bind key, do not readd device in Xiaomi Home, because this bind key will be reset again. Success!
is it possible to increase the broadcast rate during setup? What is the most frequent period. Then after setup complete change it back to default for power savings?
Do the Telink stuff first, write down the bind key, make sure the flasher app is disconnected. wait 10 minutes. Now go into HA and try and add the bind key.
Works for me too, thanks!
@Jc2k We ( Like I am smart enough to do anything) any closer to getting this whole bindkey failing thing fixed in the integration? I am having the same issue, trying your fix from above. Since the flasher tool gives you a different bind key each time you run it and yes I have ran it WAY to many times now, BC...Stoopid. Should I just restart HA, wait and then don't run the flasher tool again and just keep trying to use the one I have until it takes? THX. Update 1 minute later- Yeah that worked. LOL.
is it possible to increase the broadcast rate during setup? What is the most frequent period. Then after setup complete change it back to default for power savings?
No, that isn't possible. the broadcasting interval is hardcoded by Xiaomi on the sensor and is 10 minutes (one message per 10 minutes). Nothing we can do about.
I think we can close this issue. solution is to get the bindkey by adding it to MiHome or TelinkFlasher, after that do not re-add it to MiHome or TelinkFlasher again to avoid creating a new bind key. Wait for more than 10 minutes, preferably 20 minutes. After that, you should be able to set the encryption key in HA.
is it possible to increase the broadcast rate during setup? What is the most frequent period. Then after setup complete change it back to default for power savings?
No, that isn't possible. the broadcasting interval is hardcoded by Xiaomi on the sensor and is 10 minutes (one message per 10 minutes). Nothing we can do about.
I think we can close this issue. solution is to get the bindkey by adding it to MiHome or TelinkFlasher, after that do not re-add it to MiHome or TelinkFlasher again to avoid creating a new bind key. Wait for more than 10 minutes, preferably 20 minutes. After that, you should be able to set the encryption key in HA.
Thanks. Also worked for me. You just have to be patient...
The problem
1-Power on the Xiaomi sensor (not reflashed) 2-Wait time until HA recognize the sensor 3-Wait time until HA show a warning with the request of the bindkey 4-Run Telink flasher. Do the connection. Do the activation to have the bindkey 5-Copy the bindkey created in Telink to HA 6-HA report that the bindkey is wrong
What version of Home Assistant Core has the issue?
2022.8.(0,1,2,3,4,5)
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Xiaomi BLE
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
The same hardware was working perfectly with ble_monitor.