ESP32 BLE Scale support

Is the Xiaomi Scale required any authorization like PIN code with the Android or Apple application?

Here is some information that should help me supporting the Yunmai if equal to Mi Scale V2:

Thank you I will take a look

With the information provided in this link I should be able to integrate both versions of mi scale, once done if you could test it, you will enable to validate the code.

Yes I’m willing to help with testing.

I have updated the code with Xiaomi Scale V2 implementation:

If you can test it and post your serial monitor/MQTT output it would be nice.

Here is the serial monitor/MQTT output :

— Miniterm on COM5 115200,8,N,1 —
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
mounting FS…
mounted file system
reading config file
opened config file
parsed json
*WM: [3] allocating params bytes: 20
*WM: [2] Added Parameter: server
*WM: [2] Added Parameter: port
*WM: [2] Added Parameter: user
*WM: [2] Added Parameter: pass
*WM: [1] AutoConnect
*WM: [2] ESP32 event handler enabled
*WM: [2] Connecting as wifi client…
*WM: [1] STA static IP:
*WM: [2] setSTAConfig static ip not set
*WM: [3] WIFI station disconnect
*WM: [1] Connecting to saved AP: xxxxxxx
*WM: [3] Using Password: xxxxxx
*WM: [3] WiFi station enable
*WM: [2] 5000 ms connectTimeout set
*WM: [2] 5000 ms timeout, waiting for connect…
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] AutoConnect: SUCCESS
*WM: [1] STA IP Address:
connected…yeey :slight_smile:
saving config
{“mqtt_server”:“”,“mqtt_port”:“xxxx”,“mqtt_user”:“xxxx”,“mqtt_pass”:“xxxxxx”}*WM: [3] freeing allocated params!
*WM: [3] unloading
OpenMQTTGateway mac:
OpenMQTTGateway ip:
Connecting to MQTT by IP adress
BLEinterval btw scans
ZgatewayBT multicore ESP32 setup done
Setup OpenMQTTGateway end
BT Task running on core 0
client disconnected
MQTT connection…
Connected to broker
Subscription OK to the subjects
Creating BLE buffer
device detected
Pub json into:
Pub json into:

It seems that yunmai scale are not advertising the weight per service data (contrary to the xiaomi ones) meaning that it will not be easy to add them.

Does someone could tests the xiaomi scale v2 implementation ?