Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body Score isnt right - Zepp Life #53

Closed
AllanOricil opened this issue Apr 16, 2022 · 3 comments
Closed

Body Score isnt right - Zepp Life #53

AllanOricil opened this issue Apr 16, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@AllanOricil
Copy link

AllanOricil commented Apr 16, 2022

Describe the bug
Impedance values are really close to what I see in the app but the body score computed by your code is 16 points above.

Expected Body Score Value: 49
Actual Body Score Value: 65.21

Zepp Life (former xiaomi app) says my BMI is of someone who is overweight. So this should give me a body score deduction value, but it does not happen:

image

Every Impedance metric is extremely close to what I see in the app, so the body score should also be close enough.

I think these values are wrong

bmi_overweight = 28.0
bmi_obese = 32.0

And I also dont understand why maxMalues is lower than minMalus here. Isn't it inverted?

if self.bmi > bmi_overweight:
return self.getMalus(self.bmi, 28.0, 25.0, 5, 10) + 5.0

My bmi deduction score returns 0 because it reaches this line

but it should compute something in this one because my bmi is above 25 and below 30 (overweight)

return self.getMalus(self.bmi, 28.0, 25.0, 5, 10) + 5.0

@AllanOricil AllanOricil added the bug Something isn't working label Apr 16, 2022
@lolouk44
Copy link
Owner

Thanks. I'm away at the moment, coming back at the end of the month, I'll look at it then
As a disclaimer, I did not write the body measurement logic, I took it from a library that was extracted from the Xiaomi app about 3 years ago so it's highly likely the logic has changed and improved since.

@lolouk44
Copy link
Owner

lolouk44 commented Oct 5, 2022

Sorry not getting much time to look into this.
Since you've already identified where the code looks wrong, have you managed to change it for your needs / to make it work?
If so feel free to submit a PR. Please note I've recently rewritten the code to use the bleak library instead of the no longer supported bluepy one.

@x11x
Copy link

x11x commented Jan 12, 2023

Hi @AllanOricil,
Can I just ask how you are using body_score.py? It does not currently seem to be used anywhere in this repo, you have written your own code importing body_score to generate those tables?
Thanks

@AllanOricil AllanOricil closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants