How to help to integrate/support new BLE child themometer

Hi there community and developers.
Firs of all GREAT DIY solution.
I am using it from several weeks, (have my attention from second release)
I want to ask you , how could I help to integrate new (not in compatible sheet) device - an XIAOMI CHILD THERMOMETHER.
https://www.gearbest.com/thermometers/pp_621880.html
The device is BLE enabled and I can see true MQTT that it is discovered and some data are read from it, but does now how/have any idea how to proceed forwards.
I am able to send/post all data read from the device or any other info from it if you need it .
My idea for it is that if my child have high temperature (lets say in the middle of the night) true OMG and HASS the lights to be switched on.
Bit again I cannot read/decode the data.
Point of directions to start ??
Thanks
P.S. Am I writing in the correct sub-forum/topic?

Here is the MQTT message send to the server
{“id”:“b0:91:22:e8:ad:b1”,“name”:“MMC-T201”,“rssi”:-61,“distance”:1.274439,“servicedata”:“7122db00d2b1ade82291b0050023056709f27f17”,“servicedatauuid”:“0000fe95-0000-1000-8000-00805f9b34fb”}

Thanks in the name of all the contributors :slightly_smiling_face:

Yes perfect

The idea is to note the service data and the sensors values in the mean time. Once done of at least 5 different values, you try to find the changing part of the service data. Usually it is by set of 4 bytes. By converting the 4 bytes (reversed 2 by 2) you can convert it to decimal and see if you fall back on your feets.
Once done you can post the results and I will continue the guidance.

Great, I will gether the data later tonight.
Not sure will I be able to log the data presented in the stock reading app with those from the OMG simultaneously but I will try.

Unfortunately I was unable to log simultaneously the data from the mi home app (miaomioace app) and the OMG ble data.
But I logged only ble data when not connected to phone/app
The range should be between 35.50-36.00 degrees Celsius.
Here is the data:
{“id”:“b0:91:22:e8:ad:b1”,“name”:“MMC-T201”,“rssi”:-82,“distance”:11.4949,“servicedata”:“7122db002fb1ade82291b005002305620c9c0b1d”,“servicedatauuid”:“0000fe95-0000-1000-8000-00805f9b34fb”}
{“id”:“b0:91:22:e8:ad:b1”,“name”:“MMC-T201”,“rssi”:-81,“distance”:10.46739,“servicedata”:“7122db004ab1ade82291b0050023059e0c1d0c1d”,“servicedatauuid”:“0000fe95-0000-1000-8000-00805f9b34fb”}
{“id”:“b0:91:22:e8:ad:b1”,“name”:“MMC-T201”,“rssi”:-84,“distance”:13.81901,“servicedata”:“7122db0063b1ade82291b005002305c70c6b0c1d”,“servicedatauuid”:“0000fe95-0000-1000-8000-00805f9b34fb”}
{“id”:“b0:91:22:e8:ad:b1”,“name”:“MMC-T201”,“rssi”:-81,“distance”:10.46739,“servicedata”:“7122db007eb1ade82291b005002305ea0c9e0c1d”,“servicedatauuid”:“0000fe95-0000-1000-8000-00805f9b34fb”}
{“id”:“b0:91:22:e8:ad:b1”,“name”:“MMC-T201”,“rssi”:-78,“distance”:7.85288,“servicedata”:“7122db009fb1ade82291b0050023052e0dfc0c1d”,“servicedatauuid”:“0000fe95-0000-1000-8000-00805f9b34fb”}
{“id”:“b0:91:22:e8:ad:b1”,“name”:“MMC-T201”,“rssi”:-82,“distance”:11.4949,“servicedata”:“7122db0007b1ade82291b0050023056a0d630d1d”,“servicedatauuid”:“0000fe95-0000-1000-8000-00805f9b34fb”}
{“id”:“b0:91:22:e8:ad:b1”,“name”:“MMC-T201”,“rssi”:-83,“distance”:12.61001,“servicedata”:“7122db0037b1ade82291b0050023056d0d3b0d1d”,“servicedatauuid”:“0000fe95-0000-1000-8000-00805f9b34fb”}

Now you can extract the service data on a spreadsheet or text editor, align them and check the changing parts.
When you determine the changing parts try to convert it to decimal by group of 2.
Example if you see : ad3c on service data.

You can try to convert 3cad in decimal (15533 ) and see if with some division it corresponds to a sensor value you ve retrieved.

Something like that?
7122 db00 2fb1 ade8 2291 b005 0023 0562 0c9c 0b1d
7122 db00 4ab1 ade8 2291 b005 0023 059e 0c1d 0c1d
7122 db00 63b1 ade8 2291 b005 0023 05c7 0c6b 0c1d
7122 db00 7eb1 ade8 2291 b005 0023 05ea 0c9e 0c1d
7122 db00 9fb1 ade8 2291 b005 0023 052e 0dfc 0c1d
7122 db00 07b1 ade8 2291 b005 0023 056a 0d63 0d1d
7122 db00 37b1 ade8 2291 b005 0023 056d 0d3b 0d1d
The bold ones are the only close to a real reading. Maybe some conversions in place.

1 Like

Yes like that, now reverse them 2 by 2 and you can try to convert it to decimal.

Unfortunately is not “reversing” successfully .
I will continue testing and I hope I get it.
Some other advice from you?

And if you take:
7122 db00 2fb1 ade8 2291 b005 0023 0562 0c9c 0b1d -> 3170
instead of :
7122 db00 2fb1 ade8 2291 b005 0023 0562 0c9c 0b1d
is ti more corresponding to real values?

I did dispensar for a wile :slight_smile:
After more tests i did find out that:
7122 db00 49b1 ade8 2291 b005 0023 05c1 0ff9 0d23
0ff9 is the value of the sensor in the thermometer sensor transmitted via BT service data.
Unfortunately the relationship between sensor data and real body temperature reported by the app goes true some conversion.
I am unable to figure that out without taking all data and writing them down, but to do that I need stable climate/temperature environment and i do not have access to such one.
I did try to contact the manufacturer (and I did ) but they ware non-cooperative.

Hi,

You could for instance put your sensor on a glass of ice to take 0 as the reference value?

I did think about it, but it is out of the range of the sensor by it self.
It does not meter below +30 and above +50
Also I did observe non-linear dependency between sensor data (raw) and the body temperature reported by the app.
I have to sleep on it.
I have an idea/plan to do test with hot water and secondary (thermometer). I have access to calibrated thermometers. The problem is that the BT thermometer have to be submerged in water, but it is not IP68 rated. If I encapsulate it in something will temper with the data/readings.

Answering here since this thread popped up when I was trying to read it from a raspi.

In my thermometer, handle 0x22 contains four bytes with two temperature readings. (a b c d -> b * 2.56+a * 0.01, d * 2.56+c * 0.01), ie [86, 14, 252, 13] -> 36.7 °C, 35.8 °C

In python, only a connect and read_handle is needed.

Range is abysmal. I need to have the raspi a few meters away tops.

Hi there.
Could you clarify little bit more, or give a direction/idea to continue my research.

Hi,

The question is for @Mirar ? Or for me?

Sorry. The question was intended for Mirar

Unfortunately more test did not reveal new stuff.
If we take those 2 new readings:
7122 db00 8db1 ade8 2291 b005 0023 054f 0db7 0c64
7122 db00 a7b1 ade8 2291 b005 0023 0554 0dc1 0c64
And following the method of Mirrar it does not resolve. Maybe her/his thermometer is deferent from my MMC-T201
Lets get 0db7 . Direct conversion form Hex to Dec gives 3511
If we do 0d x 2.56 + b7 x 0.01 = 13x2.56 + 183 x 0.01 = 33.28+1.83= 35.11 exactly as the direct HEX to DEC. I have made several conversions and it is all the same.
:frowning: Hope someone will give more ideas

I think @Mirar is not using advertized data, but a connection.
To verify this you may use nRF connect , scan, connect to the thermometer.
Once done look for the different services and characteristics. And see if you find this handle 0x22. If yes you could verify the hypothesis given.

Again no success.
I feel like I have hit a brick wall :slight_smile: