bodymiscale icon indicating copy to clipboard operation
bodymiscale copied to clipboard

visceral fat different from the one computed by xiaomi app

Open alinelena opened this issue 3 years ago • 10 comments

i really do not know where the formulae come from for this but the numbers are different between xiaomi app and what is computed in python for me for example app gives 13 and the ha component 17.

this is odd since all the rest are more or less the same

alinelena avatar Aug 17 '21 06:08 alinelena

happy to look into it if the re process is described somewhere

alinelena avatar Aug 17 '21 06:08 alinelena

file retrieval from the net.

dckiller51 avatar Aug 18 '21 01:08 dckiller51

do you have a source for that? I can look into it and check the formulae. practically this and body score seem to be the only ones which are off compared with the scale...

alinelena avatar Aug 18 '21 08:08 alinelena

Source example source 1 https://github.com/lolouk44/xiaomi_mi_scale/tree/master/src

source 2 https://github.com/oliexdev/openScale problem https://github.com/oliexdev/openScale/issues/597 interesting information https://github.com/oliexdev/openScale/issues/412

One should look at the latest mifit apk and search libBodyfat.so

I watch tonight on my way home

dckiller51 avatar Aug 18 '21 08:08 dckiller51

thanks I think I may get it what is wrong, I will go through the code and try to fix it...

alinelena avatar Aug 18 '21 09:08 alinelena

ok so I looked into this https://github.com/oliexdev/openScale/blob/master/android_app/app/src/main/java/com/health/openscale/core/bluetooth/lib/MiScaleLib.java

and seems to have implemented the same formula, I suspect openscale will have the same issue.

alinelena avatar Aug 18 '21 16:08 alinelena

Another calculation here

https://github.com/oliexdev/openScale/blob/2935191e05d5faa12c353094385aaebf7dc7395e/android_app/app/src/main/java/com/health/openscale/core/bluetooth/lib/YunmaiLib.java#L118

dckiller51 avatar Aug 19 '21 00:08 dckiller51

personally I think these numbers tend to be gibberish but if we want them to match the scales we need to match the the mi fit app... I extracted the apk yesterday but formulae are a little bit too much I never did for java stuff.

alinelena avatar Aug 19 '21 08:08 alinelena

Found huge difference between yours and MIScale data weight 56.7 kg impedance 607 height 162 cm born year 1967 female

visceral_fat Mi - 6.0 sensor.xxxx_visceral_fat 1

and few other differences

body_fat 27.73 29.2

muscle 38.9 38.03

moisture 49.58 50.5

score 83 91

metabolic age 42 40

protein 19.02 16.5

FredFreegroup avatar Sep 03 '22 08:09 FredFreegroup

Yeah, me too, for example the metabolic age. There is no change and very diferrent from the app . Also, the real age shows "Not Avilable"

adolfonovo avatar Sep 12 '22 07:09 adolfonovo

I got here since integration is not working anymore since last update to 2023.7.0 but other long standing problem is that the value for 'Visceral fat' just can't be right. This has been bugging me for quite a while. For me it reads 20 or 21 which just can't be right at all. I had been trying to Google some time ago to see if Xiaomi had a different definition but I now suspect there is something wrong with the calculations done in this integration.

menloperk avatar Jul 07 '23 05:07 menloperk

update v3.1.2

dckiller51 avatar Oct 15 '23 09:10 dckiller51