2 BT MiJia thermometers - How to connect both with minimum hardware setup

Hi!
So I acquired 2 MiJia thermometers and humidifiers and they’re working fine, except that BT connectivity is limited and the 2 rooms they are in are quite apart from each others. What would be the best way to connect them to “a server” to get history tracking and be able to make comparison between upstairs and downstairs for example. One could be within reach of a server with a BT connector but the 2nd one is in the bedroom upstairs which has no computer except for a Mi Box S. I didn’t check if I could root it and install any scripting mechanism on it. How do you guys usually do that?
(I read people tend to install a Pi next to each sensor, I find this a bit overkill). Likewise I could also get a Mi bedside Lamp, but it defeats the purpose of having a small sensor and being forced to get a lamp with each and every one of them.
Thank you.

I did this

I tried that today and gave up.

Going to stick with my DHT22s.

Great! Thanks a lot for the fast answer. Just ordered and then I see Tom_I post… well let’s see how this goes then.

Which models did you order?

I have on trouble detecting the e-ink version with clock ( LYWSD02) it’s just the CGG1 (round e-ink, no clock) that I’m having trouble with.

Well I already have the 2 thermometers, the round ones presented in the video (no clock on it). So I order 1 MH-ET Live ESP32 and a micro-usb cable. I assume I’ll be able to connect the other thermometer directly from BT to the server.

Round LCD or E-ink ones though?

It could only be the e-ink ones that have the issue.

It’s the one on the video cover image (though those changes from time to time). So it’s this one here:
https://www.gearbest.com/automation-modules/pp_3009630609765309.html

That’s the first gen LCD type. Many people have had them working for quite some time. You should be good.

I had to go for the fancy new e-ink version, didn’t I?

Cool then! Thank you for the clarification. Anyway the ESP32 will take like 3 weeks to arrive here (if not more), so there will be some time before I can fiddle with it.
Fred

I couldn’t read in your previous posts, if you actually tried them. If so, how did you do that?

If you used the built-in component from HA, I would first suggest to try the custom_component for the Mija BT temps.

You can find it via HACS. :slight_smile: Here is the thread: Xiaomi Mijia bluetooth temperature & humidity sensor compatibility

I initially used the built-in component, and couldn’t get one of my sensors to work, I thought it must be the BT connectivity. It turned out to be the “not optimal” implementation from HA.

Try it, as it is a total different approach, it may be working for you… :wink:

Haven’t tried anything yet as I am waiting for the MH-ET Live ESP32. I however have the 2 MiJia thermometers…just no way to track the temperature over time and simultaneously.

Than try it! :slight_smile: :slight_smile: :slight_smile:

What do you have right now? HA is installed via (hass.io, docker)? If so, do you have HACS installed?

Right now I have just the 2 MiJia thermometers. I haven’t installed Home Assistant neither yet as I’m waiting to build my 2nd NAS with some Docker or VM to run HA. In the meantime I can connect from my laptop to one of the thermometer and I’m looking how I can extract the temp & humidity data and store it every x minutes into a light DB or spreadsheet. I can update you once I get this running if you’re interested.
Thank you.

I actually installed pygatt using pip (pip3 install pygatt) then you can write a (python) script doing:
gatttool -b < MAC Address > --char-write-req --handle=0x0010 --value=0100 --listen

and you get 12 readings giving something like this:
Notification handle = 0x000e value: 54 3d 33 31 2e 35 20 48 3d 36 32 2e 34 00

Value is in hexadecimal and needs to be converted to ASCII to get T=31.5 H=62.4 (T is in celcius). After what you do with the data is up to you :slight_smile:

I hope that will help you. For me it’s all temporary but at least I’m getting more familiar with everything little by little.

I use for my underfloor heating Homematic IP (hmip-fal230-c10) and I would like to use instead of the temperature sensors of Homematic IP that of Xiaomi.

Has one of you experiences how to do this with Home-assistant?
I Use Raspberrymatic as CCU3

Welcome to Home Assistant!

Sure it is possible, but has unfortunately not a lot to do with this thread / subject. My suggestion would be to take a search, and if nothing comes up, open a new thread.

In general, this is one the reasons you have HA. :slight_smile: From where you get your temp information doesn’t matter, as you use these values to tell your CCU what to do. But be aware, that underfloor heating doesn’t react fast on newly set temperatures, so you will be needing some kind of median or a thing like that to get a correct temp in the end.