#Xiaomi Mi Bluetooth Thermometer and Hygrometer

1 messages Β· Page 1 of 1 (latest)

vale radish
#

Hi all! I dunno if this is the right place to ask and I apologize if it isn't, but I bought a couple of these sensors for testing after a colleague recommended them and I haven't managed to flash them with anything useful yet. One of them is even bricked. I've searched a lot and I'm really unsure what to do. My goal is to use it over Bluetooth with Home Assistant on a Raspberry Pi 4, which has working bluetooth. My colleague told me he could flash them OTN without issues, but I can't. Do these support flashing with normal serial or what's the deal? If so, what sort of serial adapter will I need? I know computers and rather a few operating systems well, but I haven't managed to crack this one. I saw there was way to use a Xiaomi Cloud Tokens Extractor, but honestly, I don't want that app on my phone in the first place. Is it possible, like my coworker said, to just flash them as they are?

safe linden
#

depending on whether you have a new or an old version of the sensors you need to temporarily register them with the xiaomi cloud to extract the tokens

vale radish
#

it said 1.5 on the pcb, but I have no idea what sort of firmware it has

safe linden
vale radish
#

I've tried from my mac, but no success

#

with google chrome

#

and from linux with google chrome

safe linden
#

I never tried anything other than my phone because it worked flawlessly

however I have to say that the newer versions are much harder to flash - with the old ones you just connected and installed a new firmware

#

but to answer your initial question: you don't have to open the case at all, flashing works OTA

#

you're talking abouth this thing, right?

vale radish
#

indeed

safe linden
#

you can connect to both the old and the new version without having to extract any codes
if that doesn't work something is wrong with your bluetooth setup/browser

vale radish
#

right, so I just need to use their app to register the sensors to extract those codes and then flash'em with a good firmware?

safe linden
#

to verify your setup works you don't have to do that yet

#

you will be prompted for the codes in case they are required, if you have a version with the old firmware you can skip that step

your issue exists earlier in the process

#

did you do this?

#enable-experimental-web-platform-features may be needed to read MAC (copy link: Chrome, Opera, Edge)

#

overall I really love those sensors, they're great
I have 21 of them πŸ™‚

vale radish
#

page says it requires registration in mi-home

safe linden
#

were you able to connect now?
this will also be indicated by little icon in the upper right of the sensor

vale radish
#

the bluetooth icon is there, yes

safe linden
#

if you get 3 fields where you have to enter values you need to register the device and extract the tokens

#

that process is tedious but it worked well for me

vale radish
#

I get those three field, yes

#

But nothing happens after I choose activate

safe linden
#

then you have a new version
did you extract the tokens and did you enter them?

vale radish
#

I guess I have to install that app, then. It wanted a truckload of permissions

safe linden
#

yes, and then you need to run the extractor script, the output looks like this:

vale radish
#

using an old Samsung S7 here for the job - it's slow :ΓΎ

safe linden
#

for extracting the codes you'll need to run a python script, you can't do that on the phone

vale radish
#

that's ok

#

I first installed my first Linux box back in 1994, so I've done a thing or two with coding as well πŸ˜‰

safe linden
#

it was just a little fiddly to get the depenencies installed but it's entirely manageable

#

just two small hints:

  • depending on where you want to install the device you might not need the display and can deactivate it - that'll save power
  • the sensor submits the readings very often (~ every 10 seconds) which will unnecessarily bloat your db, you can tweak how often the sensor sends data by increasing the "advertising Interval" - I've set it from 2500ms to 10000ms

if you only have one sensor you can leave it as is but when you have as many as I do it's significant

#

(also I kind of doubt you need a reading every 10s)

vale radish
#

right, seems I'm in, now, which firmware should I give it?

safe linden
#

Bthome

vale radish
#

got a link to that?

safe linden
#

Or the non zigbee one I think is what you mean

vale radish
#

non-zigbee is the thing

safe linden
#

I don't recall what it's called, there are 3 options? Zigbee, original and custom or something

vale radish
#

if there'll be a thread firmware, that'd be fine too πŸ˜‰

safe linden
#

You want the custom Bluetooth one

vale radish
#

any idea if that's downloadable from somewhere or if I have to build it myself?

#

I've already bricked one, so I don't really want to brick another

#

…and it works

#

Thanks a lot πŸ™‚

safe linden
#

You're welcome

limber cairn
#

I have a lot of them and I love it also, but the success of the flashing it depends in my case of the device hardware version

safe linden
#

I was able to flash all of them so far. 20 of my sensors where the old version where you could just flash, the most recent one I had to get the tokens but then it worked as well

limber cairn
#

I'll save this post to do it in some newer devices I have. Thanks again for sharing useful info πŸ˜‰

vale radish
#

Anyone that knows a seller on ali or something that sells the old ones?