Xiaomi Mi Temperature Humidity Sensor (MJ_HT) + ESP32 + Blynk

@Jannik please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

@Blynk_Coeur - yes, this is a Xiaomi Bluetooth sensor
MJ address is correct, I see the Bluetooth icon on the device, as soon as the ESP32 is trying to reach it.
I used the UUID from the original code mentioned here (according to @kaosss this is fine). But the sketch will fail even if I remove the battery of the sensor. So it will fail regardless of the sensor information mentioned in the sketch
I use stock firmware. I can change it to custom, if needed.

1 Like

@Jannik this is not the same device I use, and so, as suggested by @Blynk_Coeur, you have to find the UUID that fit your sensor. Also, as the sensor is different, there might be some changes to do from the original sketch.

1 Like

accoring to this post, the mentioned error message is a known issue - strange thing is that you are not experiencing the same:

Even if I use the UUID of my sensor and even if I use dummy data and the sensor is turned off, the sketch will fail. I don’t think that this is related to my sensor. I can use the same data as in the example mentioned above. For sure, it will not give me any results, since the sensor cannot be found but the sketch should not crash. In my case it always crashes, no matter what

You might be right, if the UUID is not the issue, it might be related to the BLE Library. I suggest you to find out on Github, Stackoverflow or esp32 forums if there is any solution to your issue.
If it can help, I uploaded the version of the library I used : https://we.tl/t-Sn9rQ62O1N