-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
[New Sensor]: Amazfit Smart Scale #910
Comments
Some first analysis
Can you make a longer log, preferably with some reported values like weight, etc. Whatever the app is reporting. This will help me comparing the numbers with actual measured data. |
Hi, i have genereted more log. so It showed me on the weight following information: Hope it helps
|
Hmmm. Can't make much sense out the the data. I tried to reproduce some measurement with a hex to dec converter, but I don't see an obvious relation between the data and the measurements. So, they probably have some complicated formula to decode the data. I copied the relevant data below, trying to find a relation. Most often, a measurement is 1 or 2 bytes long. Looking at the data, I suspect that they use big endian (= read the data from left to right), but not 100% sure.
|
Hi, Using the first data line as an example: #0-#6 byte - I dont know...#2-#6 maybe the timestamp The first 3 data rows are identical, the 4th and the last: no measurements were made, the 5th: 84,05kg and only weight was measured. |
Thanks for this info! Will add it in a couple of days. |
Sorry, it took so long, I forgot to finish this. I just released 10.7.0-beta could you give it a try? I use byte 9-11 to say if it is stabilized or not. If byte 9-11 are all 00, than it is not stabilized, otherwise, it is stabilized and it will report weight and pulse. Can you please verify that it works as expected? And please also check if a pulse sensor is created. |
Could #5-#6 / 10 be the impedance? ba82 e6c7 fc 3414 a442 bf46ec68000462bba30100 3414 little endian = 5172 / 10 = 517.2 Ω Would need additional height etc. to see if that might fit for calculating the other values like bmi, muscles, fat … |
I don't have the scale myself, so I have to rely on you guys for testing. I can add impedance, if you think this is correct. BTW. This integration can calculate all the other values for you, like BMI. |
I don't have it either, but impedance is usually the only other property transmitted for then calculating all the other values like bmi, muscle percentage, fat etc. when the gender, age and height are taken into account as well. Yes, as your linked example for the Xiaomi Mi Body Composition Scale shows. So @Mosher23 could see if an impedance value of 517.2 Ω would fit with gender, height and age, following the above linked calculations to get similar results for fat: 26,3% |
I have added the impedance to 10.7.1-beta. Lets just give it a try and let me know if the impedance makes sense. |
I will test it tomorrow/after tomorrow and give feedback here. Thank you in advance |
did you had a change to test it? |
Unfortunately, not yet. Unexpected hospital stay. Will do after I return home. |
Take your time. There are more important things that testing scales. Get well soon. |
Did you had a change to have a look if it works? |
Hi, |
Did you test with 10.7.1-beta. The more recent beta's do not have Amazfit support, only 10.7.1-beta. So install that specific version to try |
Strange. Didn't you get the "weight", "impedance" and "pulse" sensor? I only see the non-stabilized weight sensor in your print screen. Any errors in the logs? |
everything you see on the image is all i got. Here is an error log: Logger: homeassistant Error doing job: Task exception was never retrieved |
Thanks, I missed adding the stabilized parameter to the output, will create a new beta in a few minutes. |
10.9.2-beta is ready for testing. |
Thanks for testing. Released as final version in 10.9.2. |
Hi @Ernst79 and @Mosher23 not to dampen the integration, and admittedly not knowing too much about the general impedance values myself, the above value of 2321,8 Ohm seems very high to me, especially in the light of the previous raw data bytes give making me think that the the impedance could be 517,2 Ω. @Mosher23 - Was this weighing done barefoot or with socks or shoes on? What I thought would be the best way to verify if this is actually the impedance data, was to also install this integration, mentioned by Ernst above, to see if this assumed impedance value calculates the same BMI, muscles, fat etc. as the scale's own app. Currently I think my assumption might have been wrong and the integration of it might show totally wrong impedance values and related calculations from it. |
I have programmed it as byte 5-6 in little endian --> divide by 10 --> impedance, based on the assumption of @Mosher23. Not sure if the app reports back impedance, but the app of the scale might also report back the impedance. Perhaps @Mosher23 can compare this. Let me know if I have to change something. |
Actually I own also Xiaomi Composition Scale 2, they report impedance of 514Ohm. |
@DigiH I have bodymiscale integration and it calculates much different values than Zepp app which scales are connected to |
So my initial assumption of 517,2 Ω wasn't far off, but the new 2321,8 is way wrong ;) so these two bytes might not be the Amazfit scale impedance after all. |
I would possibly expect slightly different calculated values, as the Zepp app probably has a slightly different algorithm to calculate all the BMI, muscle, fat etc. values as the above linked to HA integration, but they shouldn't be very different. Is that the case for both the Amazfit and Xiaomi Mi Body Composition scale? |
Only for amazfit. It calculates basal age of my body as 80 years |
Or what could well be the case is that it is these two bytes, but they need to be masked by possibly & FFF, and then the remaining byte with its four bits actually indicating if the impedance recognition was correct, i.e. if the weighing was done barefoot and not with socks or shoes on, or something else. Similar to the Xiaomi Mi Body composition scale, which always reports the impedance, but the values are only ok to integrate if the impedance applicable bit is set to true. If it is false the reported impedance values are way off becuse of not being barefoot, and should not be taken into account. This would need a few more weighings reported with and without shoes giving the raw data, to see if there is a impedance applicable bit present in these bytes.
So definitely wrong in the latest case ;) |
The only way I could get close to the assumed 514 Ohm range was with < 1 &FFF. Too far fetched I would say. So bytes 5-6 likely don't have anything to do with the impedance :( |
Sensor Description
Amazfit Smart Scale
Additional information
Hello,
is it possible to add this sensor?
https://www.amazfit.com/de/amazfit-smart-scale.html
It is possible to see MAC-adress in the app.
thank you in advance
BLE advertisements
The text was updated successfully, but these errors were encountered: