Add a Bluetooth device after deletion

Hi folks,

I’ve bought a Xiaomi temperature sensor and added a bluetooth dongle to my setup. After a while the sensor was found and I was able to add it as a device. The only reading I got was the signal strength so I started to investigate.
These sensors do encryption, but thanks to a nice guy [1] it is quite easy to flash a new firmware to get it to work. I did so and everything went fine, but HA did not see new values from the device. I thought it might be a great idea to delete the device from HA and add it again, but after I pressed the delete button I’m not able to find the device anymore.
I also tried removing the Bluetooth integration but that did not help.

Is there a config file where this device might be blacklisted? Any recommendation where to look for further debugging information?

I use a fresh install of HA in Docker, there is not much configured at the moment.

Thanks in regards,

hjjg

[1] Telink Flasher

1 Like

Additional Information: the device is sending data (used bluetoothctl on the host system):

[CHG] Device A4:C1:38:XX:XX:XX ServiceData Key: 0000181a-0000-1000-8000-0080XXXXXXXX
[CHG] Device A4:C1:38:XX:XX:XX ServiceData Value:
  a4 c1 38 XX XX XX 00 d0 3d 64 0c 50 37           ..8-#...=d.XX

There is nothing in the log file (datapath/homeassistant.log)

It looks like auto discovery don’t work twice so for a device which has been deleted before.
I read some other users which had the same unfortunate experience.

If you only need to use it in Home Assistant, you could use GitHub - pvvx/ATC_MiThermometer: Custom firmware for the Xiaomi Thermometers and Telink Flasher via USB to Serial converter instead.
Then you will be able to change the advertising mode to BTHome and use it with the BTHome integration, maybe autodiscovery will find it or your could try to add it again using this link and find the right mac address.

1 Like

@Nardol Thank you very much, that was a great workaround. Works like a charm!

If someone knows where this auto discovery information is saved, so deleted devices cannot be recognized again… would be nice!

@hjjg I just ran into the same problem you described, but didn’t choose to yet use another firmware …
What I did was “add integration” → “Xiaomi BLE”, and the old sensor just popped up to be added again, and worked like it should.

I have the same problem and unable to find it back by add integration → xiaomi ble, it says no device found in the network.
I would like to know where to save the deleted device too.

Same problem. Switchbot device was added to the system automatically and worked well. I had to delete that device and now I can’t add it again

Sorry for somewhat resurrecting, but I’m having this same issue. I’m using the BTHome integration, deleted the temp sensor, and now nothing I do makes it come back. I even stopped HA, renamed the configuration of a working sensor to match the MAC address of the deleted one and it STILL won’t see it! somewhere deep in the system bowels it’s being disabled permanently. Please help!

Has anyone found a work around for this…I added a Xiaomi Temp sensor, but only power and signal entities came thru to BTHome, so I deleted it thinking I would reflash and readd it. I did the reflash but can’t add it back into BTHome? BTHome either doesn’t see it or thinks it is already configured.

Unfortunately here the same with an Eufy BT scale. Got interrupted (scale auto power-off was pretty fast) in initial setup and now the scale does not connect anymore :frowning:
Device and Integration deleted, but :man_shrugging:

Same issue here with an Xiaomi BLE sensor. Hopefully there will be a solution.

Same issue with some BLE LED Lights

Having the same issue with BTHome and Shelly door / window device. After deletion its gone. There must be a way to solve this?

Same issue - in my case, a BTHome Xiaomi never came back after a battery change. Tried switching the advertising mode, never did pick up.

This still seems to be an issue for me.

I have two devices, I deleted one and it is never to be seen again. I know it work as I can see it advertising itself when I check bluetoothctl devices in a HA terminal.

It also adds itself as a Xiaomi BLE device if I configure the advertising mode as mijia in pvvx custom firmware. I just can’t get it to advertise (again) to HA BTHome.

[EDIT]

OK, so I have found a FIX … the issue os NOT that the device flashed with e.g. custom firmware LYWSD03MMC from pvvx (or whoever) using BTHome as the advertising type is not working in your Xiaomi H&T Sensor (all text for future searchers…), it is simply that at some stage you (like me) have “Dismissed” or ignored adding a device and BTHome smple remembers that.

Note that this applies to other integrations where things do not get added back in or found again…

So:

  1. Fire up WinSCP (assuming you have FTP Access to your HA IP Address). I attach some screenshots from the Terminal & SSH Addon but will leave you to figure that out.
  2. Navigate to /homeassistant/.storage and find the file core.config_entries.
  3. Open it in a text edtor and carefully (without deleting or changing any other text) search for either BTHome (or if you are having other items ignored, try “source”: “ignore” (this one with quotes “”) or just ignore.
  4. Amend ignore (provided it is a bluetooth device that is being ignoed !!) to bluetooth.
  5. SAVE the file. Exit WinSCP. Exit HA or restart it. Go back in and check the BTHome integration. it shoudl have added your device back in.
  6. IF in the interim you added the device using a DIFFERENT advertising type (or integration), it MAY show the device under BTHome as having TWO integrations AND ALSO under e.g. Xiaomi BLE, TWO integrations. Just delete the oine you do not want (in my case Xiaomi BLE) and oit will shows a single advertsining type device under BTHOME.

HTH as it has taken me four days to find this out; I thought my device was stuffed. It wasn’t. HA was just doing what you told it to do… and forgot :-).

[EDIT] It has been pointed out to me by pvvx there is an easier way to “Show ignored integrations”, see last pic below, from Settings, Devices and Services, Drop-Down Menu Top Right, which you should try FIRST. I am pretty sure this was not available on my HA system, so the above should still work.

k.






1 Like